Skip to content Skip to navigation

DeepPavlov

DeepPavlov is "a conversational artificial intelligence framework that contains all the components required for building dialogue systems"[1]. It utilizes recent advances in deep bidirectional transformer models. If you've heard of BERT, this is RuBERT.  There is also SlavicBERT for Bulgarian, Czech, Polish, and Russian. DeepPavlov contains models for context question answering, classification, morphological tagging, named entity recognition, neural ranking, spelling correction and other tasks.   

 

Example for named entity recognition:

$ pip install deeppavlov
$ python -m deeppavlov install ner_rus_bert

 

from deeppavlov import configs, build_model


ner_model = build_model(configs.ner.ner_rus_bert, download=True) #This will download the model if not present

text = 'Однажды весною, в час небывало жаркого заката, в Москве, на Патриарших прудах, появились два гражданина.'

result = ner_model([text])

for i in range(len(result[0][0])):

     print(result[0][0][i], result[1][0][i])

The result will mark the beginning (B) and inner parts of entitites (I) that are longer than one token.  For example, "Патриарших прудах" becomes "Патриарших", B-LOC and "прудах", I-LOC.

 

*/

*/
Type: 
Tool
Tool functionality: