I'm working with Gensim to extract keywords from HTML or text. My environment is Centos 7 / Python 3.6 / Pip3. After checking Gensim source code, I found that Gensim Keywords API in Summarization module depends on pattern.
Keywords.py: def keywords(text, ratio=0.2, words=None, split=False, scores=False, pos_filter=('NN', 'JJ'), lemmatize=False, deacc=True):
The pos_filter and lemmatize feature depend on pattern. If no pattern module avaiable, pos_filter is set to None, no filtering.
textcleaner.py:
HAS_PATTERN is set by pattern.en module. In my system, only pattern3 is available, pattern is only available for python2.7.
How to fix this problem?
Thanks and regards.
Aucun commentaire:
Enregistrer un commentaire