0
from bulstem.stem import BulStemmer

PRE_DEFINED_RULES = ['stem-context-1', 
                     'stem-context-2',
                     'stem-context-3']
for i, rules_name in enumerate(PRE_DEFINED_RULES, start=1):
    stemmer = BulStemmer.from_file(rules_name, min_freq=2, left_context=i)
    print(i, stemmer.stem('вторият'))

stemmer = BulStemmer.from_file('stem_rules_context_2_utf8.txt', min_freq=2, left_context=i)
stemmer.stem('вторият') 
stemmer.stem('вероятен') 

and it gives me

File "D:\data\bulstem test.py", line 8, in from bulstem.stem import BulStemmer

ModuleNotFoundError: No module named 'bulstem'

I have installed it with pip install bulstem and I see it in the site-packages of python folder Why I can not import it?

  • If you're using an IDE like PyCharm, you'll need to pip install the package within the IDE instead of using the system install. – Andy Feb 03 '21 at 16:40
  • yes, thank you, I use anaconda and when I installed it through anaconda prompt it worked! – Daniela Petrova Feb 03 '21 at 16:51

0 Answers0