Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"category" field in Token should be "categories" #615

Open
falquaddoomi opened this issue Mar 1, 2022 · 0 comments
Open

"category" field in Token should be "categories" #615

falquaddoomi opened this issue Mar 1, 2022 · 0 comments

Comments

@falquaddoomi
Copy link
Contributor

falquaddoomi commented Mar 1, 2022

In ontobio.model.nlp (https://github.com/biolink/ontobio/blob/master/ontobio/model/nlp.py#L19) the field category is always empty, since SciGraph appears to the return the field as categories. I can't find precisely where or when in the SciGraph commit history the field was named categories, but you can see from this query that the returned field name is currently categories:

curl -X POST "https://scigraph-ontology.monarchinitiative.org/scigraph/annotations/entities" -H  "accept: application/json" -H  "content-type: application/x-www-form-urlencoded" -d "content=male&minLength=4&longestOnly=false&includeAbbrev=false&includeAcronym=false&includeNumbers=false"

The result being:

[
  {
    "token": {
      "id": "UBERON:0003101",
      "categories": [
        "anatomical entity"
      ],
      "terms": [
        "male organism"
      ]
    },
    "start": 0,
    "end": 4
  },
  {
    "token": {
      "id": "PATO:0000384",
      "categories": [
        "quality"
      ],
      "terms": [
        "male"
      ]
    },
    "start": 0,
    "end": 4
  },
  {
    "token": {
      "id": "WBbt:0007850",
      "categories": [
        "anatomical entity"
      ],
      "terms": [
        "male"
      ]
    },
    "start": 0,
    "end": 4
  }
]

If this is in fact a mislabeled field, both the field in ontobio.model.nlp.Token and the field in biolink.datamodel.serializers (https://github.com/biolink/biolink-api/blob/master/biolink/datamodel/serializers.py#L336) will need to be corrected.

(This issue comes from investigating monarch-initiative/biolink-api#387.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant