Hanja and Sino-Korean reading dictionary: Sino-Korean word search and Hanja/Hangeul conversion
Bareun has a built-in Hanja reading dictionary, hanja-dict.fb, to handle Chinese characters (Hanja) and Sino-Korean words.
It holds the reading of a single Chinese character and the Hangeul spelling of Sino-Korean words of two or more characters,
and is used as the basis for analyzing sentences mixed with Chinese characters and for converting Sino-Korean words into Hangeul.
This dictionary is packaged in builds that include the spell checker.
Two units: Char and Word
The Hanja dictionary has two lookup units: the reading of a single character, and the Hangeul spelling of a word.
| Lookup unit | Input | Output | Example |
|---|---|---|---|
Char | 1 Chinese character | The reading of that character | 韓 → 한 |
Word | Sino-Korean word of 2 or more characters | The Hangeul spelling of the word | 韓國 → 한국 |
Why split characters and words
The same Chinese character can be read with a different sound depending on the word.
The character-level reading alone makes it hard to get the spelling of a whole Sino-Korean word right.
So Bareun keeps both a character unit (Char) and a word unit (Word),
and looks up the Hangeul spelling of Sino-Korean words by word unit for more accuracy.
The flow of Hanja/Hangeul conversion
When a sentence has Chinese characters mixed in, Bareun first looks for the Hangeul spelling by Sino-Korean word, and if it cannot find it at the word level, it falls back on character-level readings.
graph TD
IN[Eojeol containing Hanja] --> W{Is the word in Word?};
W -- Yes --> WR[Word-level Hangeul spelling];
W -- No --> C[Per-character reading from Char];
C --> CR[Combine character readings];
A Hanja morpheme is classified as Hanja (SH) in POS tagging, and this dictionary serves as the basis
when converting that Hanja into Hangeul or searching for Sino-Korean words.
What it is used for
- Sino-Korean word search: Recognizes words written in Chinese characters by linking them to their Hangeul spelling.
- Hanja/Hangeul conversion: Provides reading information when converting notation mixed with Chinese characters into Hangeul.
Frequently asked questions
Q. How does the Hanja dictionary distinguish a single character from a word?
Char holds the reading of a single Chinese character, and Word holds the Hangeul spelling of Sino-Korean words of two or more characters.
Looking up Sino-Korean words by word unit is more accurate, so both are kept.
Q. Are sentences mixed with Chinese characters analyzed too?
Yes. Chinese characters are classified as Hanja (SH) in POS tagging, and the Hanja dictionary supplements the reading and spelling information.
Q. Which builds include the Hanja dictionary?
The Hanja dictionary is included in builds that include the spell checker. It is not in the default build that uses morphological analysis only.
Q. When converting a Sino-Korean word into Hangeul, which is looked up first: the word or the character?
It first looks up the Sino-Korean word at the word level (Word) to get the Hangeul spelling, and if it cannot find it at the word level,
it falls back on character-level (Char) readings. The same Chinese character sounds different depending on the word,
so putting the word unit first makes the spelling of the whole Sino-Korean word more accurate.