com.hankcs.hanlp.seg.Other
类 CommonAhoCorasickSegmentUtil
java.lang.Object
com.hankcs.hanlp.seg.Other.CommonAhoCorasickSegmentUtil
public class CommonAhoCorasickSegmentUtil
- extends Object
一个通用的使用AhoCorasickDoubleArrayTrie实现的最长分词器
- 作者:
- hankcs
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommonAhoCorasickSegmentUtil
public CommonAhoCorasickSegmentUtil()
segment
public static <V> LinkedList<ResultTerm<V>> segment(char[] charArray,
AhoCorasickDoubleArrayTrie<V> trie)
- 最长分词,合并未知语素
- 类型参数:
V
- 类型- 参数:
charArray
- 文本trie
- 自动机
- 返回:
- 结果链表
segmentReverseOrder
public static <V> LinkedList<ResultTerm<V>> segmentReverseOrder(char[] charArray,
AhoCorasickDoubleArrayTrie<V> trie)
- 逆向最长分词,合并未知语素
- 类型参数:
V
- 类型- 参数:
charArray
- 文本trie
- 自动机
- 返回:
- 结果链表
Copyright © 2014–2015 码农场. All rights reserved.