【发布时间】:2020-04-19 07:05:44
【问题描述】:
我有一个词汇列表['Human', 'interface', 'machine', 'binary', 'minors', 'ESP', 'system', 'Graph'] 和一个句子列表["Human machine interface for lab abc computer applications", "A survey of user opinion of computer system response time", "The EPS user interface management system", "Relation of user perceived response time to error measurement", "The generation of random binary unordered trees", "The intersection graph of paths in trees", "Graph minors IV Widths of trees and well quasi ordering", "Graph minors A survey"]。
我使用 'sklearn' 中的 'CountVectorizer' 根据八个单词将句子拟合到一个稀疏矩阵中。我在下面得到一个输出。
[[0 0 0 0 0 1 0 1]
[0 0 0 0 1 0 0 0]
[0 0 0 0 1 0 0 1]
[0 0 0 0 1 0 0 0]
[0 0 0 0 0 0 0 0]
[1 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0]
[0 1 0 0 0 0 0 0]
[0 1 0 0 0 0 0 0]]
现在我试图找出矩阵中这八个单词的序列。任何帮助将不胜感激。
【问题讨论】:
标签: python scikit-learn text-classification