A way to determine the primary (or "semantic") radical of a Chinese character or get the set of
characters with a given semantic radical. The information was extracted from the
Unihan database with a script and then converted into the string format below.
the primary radical (also a char) or '.' if char has no radical
public static java.util.Set getChars(char ch)
What are the Characters with this primary radical?
ch - a Chinese character, interpreted as a radical
the Set of chars with this as primary radical
public static void main(java.lang.String args)
The main function reads a list of characters and outputs the list with corresponding
radicals. If the input character is not Chinese or has no radical (like punctuation)
the symbol '.' is output.
The flag -infile specifies a file to read characters from.
The -encoding flag can be used to specify the input encoding.
Any other arguments on the command line will be interpreted as characters to translate.