Class Hanzi

java.lang.Object
  |
  +--Hanzi
All Implemented Interfaces:
Encoder

public class Hanzi
extends java.lang.Object
implements Encoder

This is an experimental back-converter from pinyin to Unicode hanzi. It is intended to complement the Pinyin class, and to provide rudimentary support for entering Chinese characters via Romanization in Arboreal. If multiple possibilities exist, an interactive character-picker is displayed.

Version:
$2004-07-10 01:35:10 mdh$
Author:
Malcolm D. Hyman

Field Summary
static int CHOICES_AT_A_TIME
           
 
Constructor Summary
Hanzi()
           
 
Method Summary
 java.lang.String encode(java.lang.String s)
          Converts pinyin to Unicode hanzi.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHOICES_AT_A_TIME

public static final int CHOICES_AT_A_TIME
Constructor Detail

Hanzi

public Hanzi()
Method Detail

encode

public java.lang.String encode(java.lang.String s)
Converts pinyin to Unicode hanzi. Groups that appear to represent morphosyllables are passed to the getCharacter() method. Anything else is spat out verbatim.
Specified by:
encode in interface Encoder
Parameters:
s - input string
Returns:
transcoded string
See Also:
#getCharacter