• 大小: 29KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-10
  • 语言: Java
  • 标签: JAVA  kmeans  文本聚类  

资源简介

算法思想:提取文档的TF/IDF权重,然后用余弦定理计算两个多维向量的距离来计算两篇文档的相似度,用标准的k-means算法,整个工程可以直接运行,

资源截图

代码片段和文件信息

package com.sws.text.cluster;

import java.util.List;



 /// 
    /// 分词器接口
    /// 

    public interface ITokeniser
    {
        List partition(String input);
    }

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-07-03 15:48  textcluster\
     文件         340  2011-07-03 15:48  textcluster\.classpath
     目录           0  2011-07-03 15:48  textcluster\.myeclipse\
     文件         306  2011-07-03 15:48  textcluster\.mymetadata
     文件        1013  2011-07-03 15:48  textcluster\.project
     目录           0  2011-07-03 15:55  textcluster\src\
     目录           0  2011-07-03 15:49  textcluster\src\com\
     目录           0  2011-07-03 15:49  textcluster\src\com\sws\
     目录           0  2011-07-03 15:49  textcluster\src\com\sws\text\
     目录           0  2011-07-03 15:54  textcluster\src\com\sws\text\cluster\
     文件         823  2011-07-03 15:55  textcluster\src\com\sws\text\cluster\input.txt
     文件         221  2011-07-03 15:54  textcluster\src\com\sws\text\cluster\ITokeniser.java
     文件        3710  2011-07-03 16:02  textcluster\src\com\sws\text\cluster\Program.java
     文件        1201  2011-07-03 15:54  textcluster\src\com\sws\text\cluster\StopWordsHandler.java
     文件        1404  2011-07-03 15:54  textcluster\src\com\sws\text\cluster\TermVector.java
     文件        6944  2011-07-03 15:54  textcluster\src\com\sws\text\cluster\TFIDFMeasure.java
     文件        1534  2011-07-03 15:54  textcluster\src\com\sws\text\cluster\Tokeniser.java
     文件        1647  2011-07-03 15:54  textcluster\src\com\sws\text\cluster\WawaCluster.java
     文件        6038  2011-07-03 15:54  textcluster\src\com\sws\text\cluster\WawaKMeans.java
     目录           0  2011-07-03 15:48  textcluster\WebRoot\
     文件         831  2011-07-03 15:48  textcluster\WebRoot\index.jsp
     目录           0  2011-07-03 15:48  textcluster\WebRoot\meta-INF\
     文件          39  2011-07-03 15:48  textcluster\WebRoot\meta-INF\MANIFEST.MF
     目录           0  2011-07-03 15:48  textcluster\WebRoot\WEB-INF\
     目录           0  2011-07-03 15:55  textcluster\WebRoot\WEB-INF\classes\
     目录           0  2011-07-03 15:53  textcluster\WebRoot\WEB-INF\classes\com\
     目录           0  2011-07-03 15:53  textcluster\WebRoot\WEB-INF\classes\com\sws\
     目录           0  2011-07-03 15:53  textcluster\WebRoot\WEB-INF\classes\com\sws\text\
     目录           0  2011-07-03 15:55  textcluster\WebRoot\WEB-INF\classes\com\sws\text\cluster\
     文件         823  2011-07-03 15:55  textcluster\WebRoot\WEB-INF\classes\com\sws\text\cluster\input.txt
     文件         260  2011-07-03 15:54  textcluster\WebRoot\WEB-INF\classes\com\sws\text\cluster\ITokeniser.class
............此处省略9个文件信息

评论

共有 条评论