2019-02-08 13:14:49 +00:00
|
|
|
# coding: utf8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2019-02-07 20:05:11 +00:00
|
|
|
from ..ru.lemmatizer import RussianLemmatizer
|
|
|
|
|
|
|
|
|
|
|
|
class UkrainianLemmatizer(RussianLemmatizer):
|
2019-02-08 13:14:49 +00:00
|
|
|
def __init__(self, pymorphy2_lang="ru"):
|
2019-02-07 20:05:11 +00:00
|
|
|
try:
|
2019-02-08 13:14:49 +00:00
|
|
|
super(UkrainianLemmatizer, self).__init__(pymorphy2_lang="uk")
|
2019-02-07 20:05:11 +00:00
|
|
|
except ImportError:
|
|
|
|
raise ImportError(
|
2019-02-08 13:14:49 +00:00
|
|
|
"The Ukrainian lemmatizer requires the pymorphy2 library and dictionaries: "
|
|
|
|
'try to fix it with "pip install git+https://github.com/kmike/pymorphy2.git pymorphy2-dicts-uk"'
|
|
|
|
)
|