Search code examples
deep-learningnlpnamed-entity-recognition

Runnig DeepPavlov Named Entity Recognition


How I can run NER from DeepPavlov?

I have an input file with sentences "sentences.txt" and need to put results in "result.txt".


Solution

  • There are several choices to do named-entity recognition with DeepPavlov

    The Pythonic way

    from deeppavlov import configs, build_model
    
    ner_model = build_model(configs.ner.ner_ontonotes, download=True)
    ner_model(['Computer Sciences Corp. is close to making final an agreement to buy Cleveland Consulting Associates'])
    

    and from the command line

    python deeppavlov/deep.py interact ner_ontonotes [-d]