spacy - 如何使POS标签工作俄语?

时间:2018-05-03 04:37:16

标签: spacy

russian language中,类变量tag_map已正确设置,pymorphy2提供详细的语法标记,但以下示例不起作用:

import spacy
nlp = spacy.load('ru')
doc = nlp('Я люблю яблоки')
print(doc[0].pos_, doc[0].tag_) # prints '', ''

有关环境的信息:

Models             en, ru
spaCy version      2.0.11
Platform           Linux-4.4.0-116-generic-x86_64-with-Ubuntu-16.04-xenial
Python version     3.5.2
Location           /usr/local/lib/python3.5/dist-packages/spacy

1 个答案:

答案 0 :(得分:0)

您可以从this project下载和使用俄语模型do_shortcode。它将起作用。