inception-project / inception-external-recommender

Get annotation suggestions for the INCEpTION text annotation platform from spaCy, Sentence BERT, scikit-learn and more. Runs as a web-service compatible with the external recommender API of INCEpTION.
Apache License 2.0
40 stars 17 forks source link

Recommendation for Custom NER pipe #39

Open roeyzaw1 opened 1 year ago

roeyzaw1 commented 1 year ago

There is an issue with external recommendations for custom-trained NER pipes. At first, when we loaded the pipe under wsgi.py we got zero recommendations. The only thing that solved the problem was manually changing ariadne/contrib/spacy.py @ line 29 to:

for named_entity in self._model(doc).ents:

instead of:

for named_entity in doc.ents:

I haven't further investigated as to why this changes the outcome, but it did for us. Spacy version is v3.4.1