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

ExactMatchDictionaryNER can only annotate for one class at a time #4

Open
sujitpal opened this issue Oct 28, 2019 · 2 comments
Open

Comments

@sujitpal
Copy link

The nerds.core.model.ner.dictionary.ExactMatchDictionaryNER class allows tagging against a single class. The constructor forces us to specify a path to the dictionary file and a class label. This is most likely driven by the misconception that the pyahocorasick module can only support a single class at a time, which is incorrect.

Proposal here is to build an additional nerds.core.model.ner.dictionary.ExactMatchMultiClassDictionaryNER implementation that can handle dictionary lookup against multiple entity classes.

@sujitpal
Copy link
Author

Pull request created:
#5

@sujitpal sujitpal reopened this Oct 28, 2019
@sujitpal
Copy link
Author

Also added a pseudo fit method that allows the ExactMatchMultiClassDictionaryNER to be used similar to other NER models (i.e., fit with Xtrain, transform with Xtest, rather than load automaton from provided dictionary during construction and then calling transform thereafter.

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