简体   繁体   English

用Lucene将文档表示为矢量。

[英]Represent a document to a vector by Lucene.

I want to build document vector for SVM text categorization. 我想为SVM文本分类建立文档向量。 I have indexed my documents to 2 POSITIVE and NEGATIVE documents. 我已将我的文档编入2个积极和消极的文档中。 And I selected my features space with IG method. 然后我用IG方法选择了特征空间。

How can I represent a documents become a vector with tf-idf weight term by Lucene. 我该如何表示文档成为Lucene使用tf-idf权重术语的向量。

Thanks ! 谢谢 !

Best regard! 最良好的问候!

Apache Mahout is a machine learning library in Java. Apache Mahout是Java中的机器学习库。 It has utilities to create document vectors from lucene index (created from raw text). 它具有从lucene索引 (从原始文本创建) 创建文档向量的实用程序。 You can adopt the code as per your requirement. 您可以根据需要采用代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM