com.hankcs.hanlp.seg.Other
类 AhoCorasickDoubleArrayTrieSegment

java.lang.Object
  继承者 com.hankcs.hanlp.seg.Segment
      继承者 com.hankcs.hanlp.seg.DictionaryBasedSegment
          继承者 com.hankcs.hanlp.seg.Other.AhoCorasickDoubleArrayTrieSegment

public class AhoCorasickDoubleArrayTrieSegment
extends DictionaryBasedSegment

使用AhoCorasickDoubleArrayTrie实现的最长分词器
需要用户调用setTrie()提供一个AhoCorasickDoubleArrayTrie

作者:
hankcs

字段摘要
 
从类 com.hankcs.hanlp.seg.Segment 继承的字段
config
 
构造方法摘要
AhoCorasickDoubleArrayTrieSegment()
           
 
方法摘要
 Segment enableCustomDictionary(boolean enable)
          是否启用用户词典
 AhoCorasickDoubleArrayTrie<CoreDictionary.Attribute> getTrie()
           
protected  List<Term> segSentence(char[] sentence)
          给一个句子分词
 void setTrie(AhoCorasickDoubleArrayTrie<CoreDictionary.Attribute> trie)
           
 
从类 com.hankcs.hanlp.seg.DictionaryBasedSegment 继承的方法
enablePartOfSpeechTagging
 
从类 com.hankcs.hanlp.seg.Segment 继承的方法
atomSegment, combineByCustomDictionary, enableAllNamedEntityRecognize, enableIndexMode, enableJapaneseNameRecognize, enableMultithreading, enableMultithreading, enableNameRecognize, enableNumberQuantifierRecognize, enableOffset, enableOrganizationRecognize, enablePlaceRecognize, enableTranslatedNameRecognize, mergeNumberQuantifier, quickAtomSegment, seg, seg, seg2sentence, simpleAtomSegment
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

AhoCorasickDoubleArrayTrieSegment

public AhoCorasickDoubleArrayTrieSegment()
方法详细信息

segSentence

protected List<Term> segSentence(char[] sentence)
从类 Segment 复制的描述
给一个句子分词

指定者:
Segment 中的 segSentence
参数:
sentence - 待分词句子
返回:
单词列表

enableCustomDictionary

public Segment enableCustomDictionary(boolean enable)
从类 Segment 复制的描述
是否启用用户词典

覆盖:
Segment 中的 enableCustomDictionary

getTrie

public AhoCorasickDoubleArrayTrie<CoreDictionary.Attribute> getTrie()

setTrie

public void setTrie(AhoCorasickDoubleArrayTrie<CoreDictionary.Attribute> trie)


Copyright © 2014–2015 码农场. All rights reserved.