|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.wohenchan.convert.SystranConverterTable
Wrapper around the translation service at systransoft.com
Field Summary | |
private static java.lang.String |
SOURCE
|
Constructor Summary | |
SystranConverterTable()
|
Method Summary | |
static java.lang.String |
bytearrayencode(byte[] b)
|
private void |
fireEntryFound(ConverterListener listener,
ConverterEntryInterface entry)
|
void |
lookupByChinese(java.lang.String chinese,
java.lang.String languagepair,
ConverterListener listener)
|
void |
lookupByEnglishSubstring(java.lang.String str,
ConverterListener listener)
Locates ConverterEntryInterface objects corresponding to a given case insensitive English string. |
void |
lookupByPinyin(java.lang.String pinyin,
ConverterListener listener)
Does nothing -- Sytsran does not pinyin lookups |
void |
lookupBySimplifiedChinese(java.lang.String chinese,
ConverterListener listener)
Looks up a converter table entry by simplified chinese characters |
void |
lookupByTraditionalChinese(java.lang.String chinese,
ConverterListener listener)
Looks up a converter table entry by traditional chinese characters. |
private void |
parseChineseToEnglish(ConverterListener listener,
java.io.Reader reader,
java.lang.String chinese)
Parses the chinese->english dictionary output for gb2312 and Big5 |
private void |
parseEnglishToGB(ConverterListener listener,
java.io.Reader reader,
java.lang.String english)
Parses the chinese->english dictionary output for gb2312. |
private static java.lang.String[] |
split(java.lang.String string,
java.lang.String separator)
|
java.lang.String |
toString()
|
private java.lang.String |
urlEncode(byte[] bytes)
Encodes a byte array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final java.lang.String SOURCE
Constructor Detail |
public SystranConverterTable()
Method Detail |
private void fireEntryFound(ConverterListener listener, ConverterEntryInterface entry) throws AbortSearchException
AbortSearchException
private static java.lang.String[] split(java.lang.String string, java.lang.String separator)
private void parseChineseToEnglish(ConverterListener listener, java.io.Reader reader, java.lang.String chinese) throws java.io.IOException, AbortSearchException
java.io.IOException
AbortSearchException
public void lookupByPinyin(java.lang.String pinyin, ConverterListener listener)
lookupByPinyin
in interface ConverterTableInterface
pinyin
- The input string is specified in pinyin.
The string may be composed of the letters 'a'-'z' (lower case
only), the numbers '1'-'5' and space (' ').
The string is composed of at least 1 space-separated pinyin
syllables. Syllables are separated with exactly one space.
There is no leading or trailing space.
Each syllable is composed of at least two letters followed by
exactly one digit. The neutral tone is expicitly specified with
'5'.
u w/ umlaut (as in luu2 (donkey, palm tree), or luu3 (drizzle)
is specified with uu.listener
- the ConverterListener to which this object
should send its resultsprivate java.lang.String urlEncode(byte[] bytes)
public static java.lang.String bytearrayencode(byte[] b)
public void lookupByChinese(java.lang.String chinese, java.lang.String languagepair, ConverterListener listener)
chinese
- the chinese input textlanguagepair
- "zh_en" or "zt_en"listener
- the object to which to return resultspublic void lookupBySimplifiedChinese(java.lang.String chinese, ConverterListener listener)
lookupBySimplifiedChinese
in interface ConverterTableInterface
public void lookupByTraditionalChinese(java.lang.String chinese, ConverterListener listener)
lookupByTraditionalChinese
in interface ConverterTableInterface
private void parseEnglishToGB(ConverterListener listener, java.io.Reader reader, java.lang.String english) throws java.io.IOException, AbortSearchException
java.io.IOException
AbortSearchException
public void lookupByEnglishSubstring(java.lang.String str, ConverterListener listener)
lookupByEnglishSubstring
in interface ConverterTableInterface
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |