π€ π All APIs are in alpha, and can change at any moment. We give early access for your benefit.
Version | 0.0 |
Endpoint | /-api/metrics/v0 |
Project Stats
Annotation Stats
Stats for the (master) annotations, such as the count for a document labelβs specific value, number of anncomplete (confirmed) documents, top normalizations for an entity type, etc.
Endpoint | /-api/metrics/v0/search_stats?owner=...&project=... |
Method | GET |
Output | JSON |
Input Parameters
Defined as URL query parameters.
Name | Default | Example | Description |
---|---|---|---|
search |
- | * |
Document search, allowing any usual search parameter. Common is to just search for * to get all the project's (documents) statistics. |
Coding examples
curl -u 'yourUsername:yourPassword' 'https://www.tagtog.com/-api/metrics/v0/search_stats?project=yourProjectName&owner=yourUsername&search=*'
Response example json
, search stats
{
"numDocuments": 4101,
"numAnnotatedDocuments": 14,
"numConfirmedDocuments": 5,
"allDocumentLabelsTotalCount": 7,
"allEntitiesTotalCount": 12,
"e_21": {
"name": "Component",
"numDocuments": 6,
"numDocumentsMissing": 4095,
"percentage": 75,
"topNormalizations": [
{
"dictionaryId": "n_23",
"dictionaryName": "ComponentDictionary",
"entityId": "Window",
"numDocuments": 3
},
{
"dictionaryId": "n_23",
"dictionaryName": "ComponentDictionary",
"entityId": "Brakes",
"numDocuments": 2
},
{
"dictionaryId": "n_23",
"dictionaryName": "ComponentDictionary",
"entityId": "Trunk",
"numDocuments": 1
}
],
"totalCount": 9
},
"e_22": {
"name": "Status",
"numDocuments": 2,
"numDocumentsMissing": 4099,
"percentage": 25,
"topNormalizations": [],
"totalCount": 3
},
"m_24": {
"name": "isRelevant",
"numDocuments": 4,
"numDocumentsMissing": 4097,
"type": "boolean",
"values": [
{
"count": 2,
"percentage": 50,
"value": "true"
},
{
"count": 2,
"percentage": 50,
"value": "false"
}
]
},
"m_25": {
"name": "OverallRisk",
"numDocuments": 3,
"numDocumentsMissing": 4098,
"type": "enum",
"values": [
{
"count": 1,
"percentage": 33.33,
"value": "high"
},
{
"count": 2,
"percentage": 66.67,
"value": "medium"
},
{
"count": 0,
"percentage": 0,
"value": "low"
}
]
},
"m_28": {
"name": "Comment",
"numDocuments": 0,
"numDocumentsMissing": 4101,
"topValues": [],
"type": "string"
}
}
IAA
Get individual IAA for a pair of members
Endpoint | /-api/metrics/v0/iaa?owner=...&project=... |
Method | GET |
Output | JSON |
Input Parameters
Defined as URL query parameters.
Name | Default | Example | Description |
---|---|---|---|
member1 |
- | yourUsername | Username of the first member of the members pair to get the IAA for. |
member2 |
- | Laura | Username of the second member of the members pair to get the IAA for. |
anntaskId |
- | e_21 | The id (anntaskId) of one of your annotation types in the project |
metric |
- | exact_v1 |
The name of the metric you want, typically exact_v1 (this is the same metric used in the default IAA visualizations). Possible values: {exact_v1, overlapping_v1, documentlevel_v1} |
Coding examples
curl -u 'yourUsername:yourPassword' 'https://www.tagtog.com/-api/metrics/v0/iaa?project=yourProjectName&owner=yourUsername&member1=yourUsername&member2=Laura&anntaskId=e_21&metric=exact_v1'
Response example json
, IAA for a pair of members
{
"f1": 0.8333333333333333,
"overNumDocs": 2
}