Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

проблема с pymorphy2_dicts_ru.get_path() #148

Open
etongkeji opened this issue Sep 2, 2021 · 1 comment
Open

проблема с pymorphy2_dicts_ru.get_path() #148

etongkeji opened this issue Sep 2, 2021 · 1 comment

Comments

@etongkeji
Copy link

проблема с pymorphy2_dicts_ru.get_path()

import pymorphy2
morph = pymorphy2.MorphAnalyzer()
morph.parse('мировой войны')

выводит:

Traceback (most recent call last):
File "D:\etong\cn02.py", line 2, in
morph = pymorphy2.MorphAnalyzer(lang='ru')
File "C:\Users\俄通科技\AppData\Local\Programs\Python\Python39\lib\site-packages\pymorphy2\analyzer.py", line 203, in init
self.dictionary = opencorpora_dict.Dictionary(path)
File "C:\Users\俄通科技\AppData\Local\Programs\Python\Python39\lib\site-packages\pymorphy2\opencorpora_dict\wrapper.py", line 18, in init
self._data = load_dict(path)
File "C:\Users\俄通科技\AppData\Local\Programs\Python\Python39\lib\site-packages\pymorphy2\opencorpora_dict\storage.py", line 59, in load_dict
words = dawg.WordsDawg().load(_f('words.dawg'))
File "src/dawg.pyx", line 507, in dawg.BytesDAWG.load
File "src/dawg.pyx", line 398, in dawg.CompletionDAWG.load
OSError: It's not possible to read file stream

@insolor
Copy link
Member

insolor commented Sep 2, 2021

  1. pymorphy2 не парсит предложения или словосочетания, только отдельные слова.
  2. Попробуйте переустановить Python по пути не содержащем иероглифов, например в C:\Python39, потом на него установить pymorhphy2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants