I have a question about this piece of a program:

from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer, ENGLISH_STOP_WORDS

pattern ='(?u)\\b[A-Za-z]{3,}'

stop_words = set(list(ENGLISH_STOP_WORDS) + ['test'])

cv = CountVectorizer(token_pattern=pattern, stop_words=stop_words, ngram_range=(1, 2))

what does (?u)\\b stand for? I have tried to delete it but nothing is changed


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.