com.hankcs.hanlp.dictionary.py
类 PinyinDictionary
java.lang.Object
com.hankcs.hanlp.dictionary.py.PinyinDictionary
public class PinyinDictionary
- extends Object
- 作者:
- hankcs
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pinyins
public static final Pinyin[] pinyins
PinyinDictionary
public PinyinDictionary()
get
public static Pinyin[] get(String key)
convertToPinyin
public static List<Pinyin> convertToPinyin(String text)
- 转为拼音
- 参数:
text -
- 返回:
- List形式的拼音,对应每一个字(所谓字,指的是任意字符)
convertToPinyin
public static List<Pinyin> convertToPinyin(String text,
boolean remainNone)
convertToPinyinArray
public static Pinyin[] convertToPinyinArray(String text)
- 转为拼音
- 参数:
text -
- 返回:
- 数组形式的拼音
getSearcher
public static BaseSearcher getSearcher(char[] charArray,
DoubleArrayTrie<Pinyin[]> trie)
segLongest
protected static List<Pinyin> segLongest(char[] charArray,
AhoCorasickDoubleArrayTrie<Pinyin[]> trie)
- 用最长分词算法匹配拼音
- 参数:
charArray - trie -
- 返回:
segLongest
protected static List<Pinyin> segLongest(char[] charArray,
AhoCorasickDoubleArrayTrie<Pinyin[]> trie,
boolean remainNone)
Copyright © 2014–2015 码农场. All rights reserved.