hyphenate_SDK3.0  3.0.1
hyphenatejavaIMSDK
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
com.hyphenate.util.HanziToPinyin Class Reference

Classes

class  Token
 

Public Member Functions

ArrayList< Token > get (final String input)
 

Static Public Member Functions

static HanziToPinyin getInstance ()
 

Static Public Attributes

static final char[] UNIHANS
 
static final byte[][] PINYINS
 

Protected Member Functions

 HanziToPinyin (boolean hasChinaCollator)
 

Detailed Description

An object to convert Chinese character to its corresponding pinyin string. For characters with multiple possible pinyin string, only one is selected according to collator. Polyphone is not supported in this implementation. This class is implemented to achieve the best runtime performance and minimum runtime resources with tolerable sacrifice of accuracy. This implementation highly depends on zh_CN ICU collation data and must be always synchronized with ICU.

Currently this file is aligned to zh.txt in ICU 4.6

Member Function Documentation

ArrayList<Token> com.hyphenate.util.HanziToPinyin.get ( final String  input)

Convert the input to a array of tokens. The sequence of ASCII or Unknown characters without space will be put into a Token, One Hanzi character which has pinyin will be treated as a Token. If these is no China collator, the empty token array is returned.

Member Data Documentation

final byte [][] com.hyphenate.util.HanziToPinyin.PINYINS
static

Pinyin array.

Each pinyin is corresponding to unihans of same offset in the unihans array.

final char [] com.hyphenate.util.HanziToPinyin.UNIHANS
static

Unihans array.

Each unihans is the first one within same pinyin when collator is zh_CN.


The documentation for this class was generated from the following file: