com.hankcs.hanlp.corpus.dictionary
类 SuffixDictionary

java.lang.Object
  继承者 com.hankcs.hanlp.corpus.dictionary.SuffixDictionary

public class SuffixDictionary
extends Object

后缀树词典

作者:
hankcs

构造方法摘要
SuffixDictionary()
           
 
方法摘要
 void add(String word)
          添加一个词语
 void addAll(String total)
           
 void addAll(String[] total)
           
 boolean endsWith(String word)
          词语是否以该词典中的某个单词结尾
 Set<Map.Entry<String,Integer>> entrySet()
          键值对
 int get(String suffix)
          查找是否有该后缀
 int getLongestSuffixLength(String word)
          获取最长的后缀
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

SuffixDictionary

public SuffixDictionary()
方法详细信息

add

public void add(String word)
添加一个词语

参数:
word -

addAll

public void addAll(String total)

addAll

public void addAll(String[] total)

get

public int get(String suffix)
查找是否有该后缀

参数:
suffix -
返回:

endsWith

public boolean endsWith(String word)
词语是否以该词典中的某个单词结尾

参数:
word -
返回:

getLongestSuffixLength

public int getLongestSuffixLength(String word)
获取最长的后缀

参数:
word -
返回:

entrySet

public Set<Map.Entry<String,Integer>> entrySet()
键值对

返回:


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