What model is used in NER demo?

Hello!
When I tried demo of NER version, I got many entities there. But when I used it in my own project it didn’t work correctly. I use ner_ontonotes_bert_mult_torch and work mostly with Russian language. Sometimes it can be English.

from deeppavlov import configs, build_model
deeppavlov_model = build_model(configs.ner.ner_ontonotes_bert_mult_torch, download=True)

And I get in two times less entities then in demo version. What do I do wrong?
If it really need, I can show some examples of the text.

2 Likes

I also have the same doubt.

Hi,

English and multilanguage model is ner_ontonotes_bert_mult. Russian NER Demo model is ner_rus_bert.

For some reason i cannot reproduce the same result using deeppavlov installed on my environment:

from deeppavlov import configs, build_model

ner_model = build_model(configs.ner.ner_ontonotes_bert_mult_torch, download=True)

ner_model([‘Brasil cria 136,1 mil empregos em março.’])

Result from Model:
[‘B-GPE’, ‘O’, ‘B-CARDINAL’, ‘B-CARDINAL’, ‘B-CARDINAL’, ‘I-CARDINAL’, ‘O’, ‘O’, ‘B-DATE’, ‘O’]

Result from Demo web site:

Finally a conclusion: using Google Colab environment with “ner_ontonotes_bert_mult_torch” does not work, but using “ner_ontonotes_bert_mult” it does. Follow the code for reference:

!pip install -q deeppavlov

!python -m deeppavlov install ner_ontonotes_bert_mult

from deeppavlov import configs, build_model

ner_model = build_model(“ner_ontonotes_bert_mult”, download=True)