Workarounds for assigning multiple entity labels to one token? #13719
Replies: 2 comments
-
You probably want to take a look at |
Beta Was this translation helpful? Give feedback.
-
Hello, this task is not completely NER. You wouldn't wanna generate lots of tokens per entity anyway, you only need the tags that refer to the narrowest type. You can get the most specialized tags of entities. Then you can link this tag to your external knowledgebase (preferably an ontology or taxonomy). From the taxonomy you can extract all the parent classes. Have a look at this library: https://pypi.org/project/taxonomy/ , also you can train spaCy linker as teh above answer suggests. One again getting the tags is a sentence level semantics task. Then associating those tags with external knowledge of the world is a second task. So separating these two tasks/concepts should be your starting point. I'd train nd checkpoint the NER first, then do the linking. Good luck in your project! |
Beta Was this translation helpful? Give feedback.
-
Hi all, I understand that SpaCy by default only recognizes one entity given a Token or Span;
Is there any workaround for this? I have a good idea of why SpaCy only recognizes one entity, but say I have a project where given an instance of an animal, I'd like to not only label its taxonomic class (Mammalia), but also its family, genus, and species, etc..
Is a project like this outside the purview of SpaCy's capabilities (and if so, would someone be willing to redirect me elsewhere)?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions