1
ImportError: Pattern library is not installed. Pattern library is needed in order to use lemmatize function

This is what the error was shown while i'm using python.

def process_texts(texts):
    texts = [[word for word in line if word not in stops] for line in texts]
    texts = [bigram[line] for line in texts]
    texts = [[word.decode("utf-8").split('/')[0] for word in lemmatize(' '.join(line), allowed_tags=re.compile('(NN)'), min_length=5)] for line in texts]
    return texts

import re
train_texts = process_texts(list_of_simple_preprocess_data)

I had used install pattern3 but still I was facing the same error .

sophros
  • 14,672
  • 11
  • 46
  • 75
  • Do you mean `pip install pattern3`? What OS are you at? which python version do you run your code under? – sophros Nov 30 '20 at 18:07

0 Answers0