Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
scikit-learn のテキストCountVectorizerまたはパラメーターを使用して、テキスト ドキュメントから !、?、" および ' の句読点を保持する方法はありますか?TfidfVectorizer
CountVectorizer
TfidfVectorizer
token_patternベクトライザーをインスタンス化するときは、パラメーターをカスタマイズする必要があります。例えば:
token_pattern
vent = CountVectorizer(token_pattern=r"(?u)\b\w\w+\b|!|\?|\"|\'")