Source Files
Source files are files that contain things you want to annotate. V1 currently only supports text files. Later versions may support document, image, and video formats.
post
https://api.annolab.ai
/v1/source/create-text
Create Source Text
This code shows how to create a new text file source
Python
import requests
ANNO_LAB_API_KEY = 'XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'
source = {
'projectIdentifier': 'New NER Project',
'directoryIdentifier': 'Wikipedia Subset',
'sourceName': 'athens.txt'
'text': 'Athens (Greek: Αθήνα, Athína), is the capital city of Greece with a metropolitan population of 3.7 million inhabitants.'
}
headers = {
'Authorization': 'Api-Key '+ANNO_LAB_API_KEY,
}
url = 'https://api.annolab.ai/v1/source/create-text'
response = requests.post(url, headers=headers, json=source)
print(response.json())
Copy link