2

I tried to run the snippet of code from the tutorial about NER from deeppavlov.

Link tutorial

First I run command:

python -m deeppavlov install ner_ontonotes_bert_mult
python -m deeppavlov interact ner_ontonotes_bert_mult [-d]

Then

from deeppavlov import configs, build_model 
ner_model = build_model(configs.ner.ner_ontonotes_bert_mult, download=True)
ner_model(['World Curling Championship will be held in Antananarivo'])

Catch this error:

ImportError: cannot import name 'convert_examples_to_features'

So if paste code in VSCode, line

configs.ner.ner_ontonotes_bert_mult

will give a signal that "Instance of 'Struct' has no 'ner' member"

(Config is Struct)

How I can fix it? Google didn 't find an answer

com
  • 2,606
  • 6
  • 29
  • 44
  • Welcome to SO Sambr The Slayer! Please edit your question and include a [Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example). Without it it may be hard to get the answer you are searching for. You shouldn't expect other people to follow the tutorial. – machnic Mar 09 '20 at 13:57
  • 2
    but I wrote the example, step-by-step. The link to the tutorial is just a code source. – Sambr The Slayer Mar 09 '20 at 14:05
  • Well, when I'm trying to reproduce it with a fresh environment, using your example code then `python -m deeppavlov interact ner_ontonotes_bert_mult [-d]` fails as long as `-d` is in brackets. Running the code below, doesn't give me the `ImportError`. From my perspective it's just not reproducible. – machnic Mar 09 '20 at 15:22
  • @SambrTheSlayer Please make sure you are using the latest version of DeepPavlov. In addition there are maybe some issue with requirements, please make sure that `install` went well. – com Apr 08 '20 at 15:32

0 Answers0