Open falquaddoomi opened 2 years ago
In addition to renaming category
to categories
in ontobio.model.nlp.Token
, the matching serializer class in biolink also needs to be updated in the same way: https://github.com/biolink/biolink-api/blob/master/biolink/datamodel/serializers.py#L336.
To add clarity why this is needed for the frontend:
It causes the annotations here to have (?) icons, because I dont know the category of each annotation, because that field is blank.
When querying against
/nlp/annotate/entities
, the returned"category"
field for each token is always an empty list.For example,
results in (partial result):
Querying directly against Scigraph Ontology's API, e.g. via:
produces (again, in part):
I'm not sure, but it seems likely that this is because the field in
Token
(https://github.com/biolink/ontobio/blob/31658ad37eb02f0e061ca5c4de36618cab6ea02b/ontobio/model/nlp.py#L14) is namedcategory
, notcategories
as SciGraph's API is returning.To fix this, we'd need to modify the
category
field name inontobio.model.nlp.Token
to becategories
, update biolink's ontobio dependency to this new version, then redeploy biolink.