- SearchTestForCPU - org.apdplat.word.test中的类
-
比较词典查询算法的性能(比较运算速度)
#分别运行10次测试,然后取平均值
LinkedList 10000次查询 cost time:48812 ms
ArrayList 10000次查询 cost time:40219 ms
HashSet 10000次查询 cost time:8 ms
HashSet 1000000次查询 cost time:258 ms
HashSet 100000000次查询 cost time:28575 ms
Trie 10000次查询 cost time:15 ms
Trie 1000000次查询 cost time:1024 ms
Trie 100000000次查询 cost time:104635 ms
TrieV1 10000次查询 cost time:16 ms
TrieV1 1000000次查询 cost time:780 ms
TrieV1 100000000次查询 cost time:90949 ms
TrieV2 10000次查询 cost time:50 ms
TrieV2 1000000次查询 cost time:4361 ms
TrieV2 100000000次查询 cost time:483398 ms
- SearchTestForCPU() - 类 的构造器org.apdplat.word.test.SearchTestForCPU
-
- SearchTestForMemory - org.apdplat.word.test中的类
-
比较词典查询算法的性能(比较内存占用)
- SearchTestForMemory() - 类 的构造器org.apdplat.word.test.SearchTestForMemory
-
- seg(String, boolean, char...) - 类 中的静态方法org.apdplat.word.recognition.Punctuation
-
将一段文本根据标点符号分割为多个不包含标点符号的文本
可指定要保留那些标点符号
- seg(String) - 类 中的方法org.apdplat.word.segmentation.impl.AbstractSegmentation
-
默认分词算法实现:
1、把要分词的文本根据标点符号进行分割
2、对分割后的文本进行分词
3、组合分词结果
- seg(String) - 接口 中的方法org.apdplat.word.segmentation.Segmentation
-
- seg(String, SegmentationAlgorithm) - 类 中的静态方法org.apdplat.word.WordSegmenter
-
对文本进行分词,移除停用词
可指定其他分词算法
- seg(String) - 类 中的静态方法org.apdplat.word.WordSegmenter
-
对文本进行分词,移除停用词
使用双向最大匹配算法
- seg(File, File, SegmentationAlgorithm) - 类 中的静态方法org.apdplat.word.WordSegmenter
-
对文件进行分词,移除停用词
可指定其他分词算法
- seg(File, File) - 类 中的静态方法org.apdplat.word.WordSegmenter
-
对文件进行分词,移除停用词
使用双向最大匹配算法
- segImpl(String) - 类 中的方法org.apdplat.word.segmentation.impl.AbstractSegmentation
-
- segImpl(String) - 类 中的方法org.apdplat.word.segmentation.impl.BidirectionalMaximumMatching
-
- segImpl(String) - 类 中的方法org.apdplat.word.segmentation.impl.BidirectionalMaximumMinimumMatching
-
- segImpl(String) - 类 中的方法org.apdplat.word.segmentation.impl.BidirectionalMinimumMatching
-
- segImpl(String) - 类 中的方法org.apdplat.word.segmentation.impl.MaximumMatching
-
- segImpl(String) - 类 中的方法org.apdplat.word.segmentation.impl.MinimumMatching
-
- segImpl(String) - 类 中的方法org.apdplat.word.segmentation.impl.ReverseMaximumMatching
-
- segImpl(String) - 类 中的方法org.apdplat.word.segmentation.impl.ReverseMinimumMatching
-
- Segmentation - org.apdplat.word.segmentation中的接口
-
分词接口
Word Segmentation Interface
- SegmentationAlgorithm - org.apdplat.word.segmentation中的枚举
-
中文分词算法
Chinese word segmentation algorithm
- SegmentationFactory - org.apdplat.word.segmentation中的类
-
中文分词工厂类
根据指定的分词算法返回分词实现
- segWithStopWords(String, SegmentationAlgorithm) - 类 中的静态方法org.apdplat.word.WordSegmenter
-
对文本进行分词,保留停用词
可指定其他分词算法
- segWithStopWords(String) - 类 中的静态方法org.apdplat.word.WordSegmenter
-
对文本进行分词,保留停用词
使用双向最大匹配算法
- segWithStopWords(File, File, SegmentationAlgorithm) - 类 中的静态方法org.apdplat.word.WordSegmenter
-
对文件进行分词,保留停用词
可指定其他分词算法
- segWithStopWords(File, File) - 类 中的静态方法org.apdplat.word.WordSegmenter
-
对文件进行分词,保留停用词
使用双向最大匹配算法
- set(String, String) - 类 中的静态方法org.apdplat.word.util.WordConfTools
-
- setPerfectCharCount(int) - 类 中的方法org.apdplat.word.corpus.EvaluationResult
-
- setPerfectLineCount(int) - 类 中的方法org.apdplat.word.corpus.EvaluationResult
-
- setSegmentationAlgorithm(SegmentationAlgorithm) - 类 中的方法org.apdplat.word.corpus.EvaluationResult
-
- setSegSpeed(float) - 类 中的方法org.apdplat.word.corpus.EvaluationResult
-
- setText(String) - 类 中的方法org.apdplat.word.segmentation.Word
-
- setTotalCharCount(int) - 类 中的方法org.apdplat.word.corpus.EvaluationResult
-
- setTotalLineCount(int) - 类 中的方法org.apdplat.word.corpus.EvaluationResult
-
- setWrongCharCount(int) - 类 中的方法org.apdplat.word.corpus.EvaluationResult
-
- setWrongLineCount(int) - 类 中的方法org.apdplat.word.corpus.EvaluationResult
-
- show(char) - 类 中的方法org.apdplat.word.corpus.GramTrie
-
- show() - 类 中的方法org.apdplat.word.corpus.GramTrie
-
- show() - 类 中的方法org.apdplat.word.dictionary.impl.Trie
-
- show() - 类 中的方法org.apdplat.word.dictionary.impl.TrieV1
-
- show() - 类 中的方法org.apdplat.word.dictionary.impl.TrieV2
-
- show() - 类 中的方法org.apdplat.word.dictionary.impl.TrieV3
-
- show(char) - 类 中的方法org.apdplat.word.dictionary.impl.TrieV4
-
- show() - 类 中的方法org.apdplat.word.dictionary.impl.TrieV4
-
- showConflict() - 类 中的方法org.apdplat.word.corpus.GramTrie
-
统计根节点冲突情况及预分配的数组空间利用情况
- showConflict() - 类 中的方法org.apdplat.word.dictionary.impl.TrieV4
-
统计根节点冲突情况及预分配的数组空间利用情况
- StopWord - org.apdplat.word.recognition中的类
-
停用词判定
通过系统属性及配置文件指定停用词词典(stopwords.path)
指定方式一,编程指定(高优先级):
WordConfTools.set("stopwords.path", "classpath:stopwords.txt");
指定方式二,Java虚拟机启动参数(中优先级):
java -Dstopwords.path=classpath:stopwords.txt
指定方式三,配置文件指定(低优先级):
在类路径下的word.conf中指定配置信息
stopwords.path=classpath:stopwords.txt
如未指定,则默认使用停用词词典文件(类路径下的stopwords.txt)
- StopWord() - 类 的构造器org.apdplat.word.recognition.StopWord
-