Вы можете идентифицировать эти документы, используя build_analyzer()
. Попробуйте это!
from sklearn.feature_extraction.text import CountVectorizer
corpus = [
'This is the first document.',
'This document is the second document.',
'And this is the third one.',
'Is this the first document?',
'this is to',
'she has'
]
analyzer = CountVectorizer(stop_words='english').build_analyzer()
filter_condtn = [True if analyzer(doc) else False for doc in corpus ]
#[True, True, False, True, False, False]
P.S. : Я слишком смущен, чтобы увидеть все слова в третьем документе в стоп-словах.