com.hankcs.hanlp.seg.Other
类 LongestBinSegmentToy<V>
java.lang.Object
com.hankcs.hanlp.seg.Other.LongestBinSegmentToy<V>
public class LongestBinSegmentToy<V>
- extends Object
最长分词玩具
- 作者:
- hankcs
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LongestBinSegmentToy
public LongestBinSegmentToy(BinTrie<V> trie)
seg
public List<Map.Entry<String,V>> seg(String text)
reset
public void reset(String text)
- 将分词器复原或置为准备工作的状态
- 参数:
text - 待分词的字串
next
public Map.Entry<String,V> next()
getOffset
public int getOffset()
- 获取当前偏移,如果想要知道next分出的词string的起始偏移,那么用 getOffset() - string.length 就行了。
- 返回:
Copyright © 2014–2015 鐮佸啘鍦�/a>. All rights reserved.