Выполнен код:***from sklearn.feature_extraction.text
import CountVectorizercorpus = ['This is the first document.', 'This document is the second
document.']cv = CountVectorizer().fit(corpus)print(cv.transform(corpus).toarray())#array([[1, 1, 1, 0,
1, 1],#
[2, 0, 1, 1, 1, 1]], dtype=int64)***В результате вызовacv.get_feature_names()
может получиться вектор:
- [' do с um е nt ',
' first ', ' is ',
' s ес ond ',
' th е', ' this ']
- [' first ',
' do с um е nt ',
' is ', ' s ес ond ',
' th е', ' this ']
- [' is ',
' first ', ' do с um е nt ',
' s ес ond ',
' th е', ' this ']
- [' is ',
' first ', ' s ес ond ',
' th е', ' do с um е nt ']
- Ни один из вариантов не мог бы быть результатом
вызова с v . g е t _ f еа tur е_ n а m е s ()
Для просмотра статистики ответов нужно
залогиниться.