Hangul/Hanja Conversion Method

applies to OpenOffice.org 1.1
status: Final, last modified: 5. Jan. 2005

Version History

02년 11월 28일 Thursday	FT	Falko Tesch	first
18/12/02	VP	Vincent Park	Comment
18/12/02	FT	Falko Tesch	pointing out still unclear issues
10/01/03	FT	Falko Tesch	Complete re-write
02/04/03	EM	Elizabeth Matthis	UI string review and changes
04/02/03	FT	Falko Tesch	revision
07/02/03	FT	Falko Tesch	technical revision w/ Thomas Lange
06/06/03	FT	Falko Tesch	added support for Calc and impress/Draw (see iBIS 109443 and 110125)
26.03.04	FT	Falko Tesch	Added all missing features for OO.o 2.0 related tasks, reworked strings for publishing on OO.org. Updated to status Final
16.04.2004	FT	Falko Tesch	Some additional small glitches fixed

Abstract

In Korean apart from Hangul (Korean alphabet) Hanja (Chinese characters) is often used for writing. Since all Hanja words have a transliteration in Hangul Koreans often first write a word in Hangul and convert it then to Hanja.

MS Word and Hancom 97/2002 provide special functionality to address this issue. To stay competitive on the Korean market OpenOffice.org 1.1 will need to have such feature, too.

(According to SunONE Korea this feature is regarded as a show stopper in case of not-having it!)

All of this spec has 1.1 Beta as a goal, apart from the sections that are marked “Goal '2.0'”.

Current iBIS tasks: 105688 , 109443, 110125 and 110117

Contents

1 Hangul/Hanja Conversion	3

1.1 Initial Behaviour	3

1.2 Menu Structure	4

1.3 “Hangul/Hanja Conversion” options	5

1.4 “Hangul/Hanja Options” options (Goal OO.o 2.0)	8

1.5 Modified “New Hangul/Hanja Dictionary” dialogue (Goal OO.o 2.0)	9

1.6 Modified “Edit Hangul/Hanja Custom Dictionary” dialogue (Goal 'OO.o 2.0)	9

2 Definition of Conversion Dictionaries (Goal OO.o 2.0)	10

2.1 User-defined Dictionary Definition	11

3 Screen Shots (mock-ups)	11

4 String List	14

Hangul/Hanja Conversion

The Hangul/Hanja Conversion works in both directions!

This means that any selected Hangul word or syllable (for better distinction instead of syllable character will be used from now on) will be checked for its Hanja counterpart. There can be no, one, or even multiple counterparts from Hangul to Hanja.

It means that also any selected Hanja word or character can be checked for it possible Hangul counterpart. There can be one or multiple counterparts from Hanja to Hangul.

By checking a case-sensitive option the user can switch the conversion functionality to a unidirectional one (based on from where he/she starts). For details please refer to Conversion Hangul onlyHanja only

There are two new and two updated dialogues:

NEW: “Hangul <-> Hanja conversion” (see Figure 1)
This one serves the user to address the conversion itself.

NEW: “Hangul <-> Hanja options” (see Figure 2)
This one gives the user various option on conversion method(s).

UPDATED: “New Dictionary” (see Figure 4)
This is a stripped down version for Hangul/Hanja conversion matters.

UPDATED: “”Edit Custom Dictionary” (see Figure 5)
This is an enhanced version for Hangul/Hanja conversion matters.

Initial Behaviour

No selection is made

If no selection is made the Hangul/Hanja conversion will start exactly at the cursor's location. Per default the current word where the cursor resides (beginning, end or within) is chosen for conversion. It will be displayed as “Original”.

In case of multiple-script/language selections/words only the Korean part will be selected for conversion. If necessary it will shrink to the fist Korean part.

If a word does not contain any Korean characters the dialogue will not appear at all!
Exception: If “Replace by character” is activated the next character that follows the cursor position will be chosen for conversion.
If the cursor resides at the end of a document the conversion starts all over from the beginning (like the spell checker does) and the next available word/character on the beginning of the document will be chosen. If the next character is a space the next available word/character after space will be chosen.

In case of a checked Conversion Hangul only/Hanja only all Hangul or Hanja words/characters will be ignored by default.

When the Hangul/Hanja conversion is invoked on a non-convertible Hangul(Hanja)character the dialogue will start with an empty “Suggestions” list and the functions/buttons “Replace” and “Always Replace” are disabled. Pressing “Ignore” or “Ignore all” will jump to the next convertible Hangul/Hanja character.

In case none is found the dialogue will exit.

A single selection is made

Hangul/Hanja conversion will use this selection for conversion. Depending on the replacement setting (by word or by character) progressing (step by step) suggestions will be made until the end of selection.
If the initial and/or end part of the selection is made within a word conversion will still treat those “half” words as normal full words.

Meanwhile the document view will updated live.

A multiple selection is made:

Same like single selection but conversion will “jump” after finishing selection to next selection until end.

General: If selection mode is active no matter where the cursor stands the conversion will always start at the beginning of the (first) selection and will end at the end of the (last) selection.

Again the document view will updated live.

In case of a checked Conversion Hangul only/Hanja only all Hangul or Hanja words/characters will be ignored by default.

General Close Behaviour

When travelling through the document/selection word-by-word or character-by-character pressing Ignore, Always Ignore, Replace or Always Replace the dialogue will close automatically.

In other words: Once there's nothing more to do, HHC exits.

Note: This behaviour copycats MS Word's Hangul/Hanja conversion feature.

Menu Structure

This dialogue will be invoked by choosing “Tools – Hangul/Hanja conversion”

Writer

Tools

---------------------------------------

Spellcheck >

Hangul/Hanja Conversion...Ctrl+Shift+F7

Thesaurus

Hyphenation

---------------------------------------

...

Calc

Tools

---------------------------------------

Spellcheck >

Hangul/Hanja Conversion...Ctrl+Shift+F7

Hyphenation

Detective

---------------------------------------

...

Impress/Draw

Tools

---------------------------------------

Spellcheck >

Hangul/Hanja Conversion...Ctrl+Shift+F7

Hyphenation

---------------------------------------

...

This entry will be only visible if “Asian language support” is enabled and will be available in all applications.

“Hangul/Hanja Conversion” options

This dialogue will be invoked by choosing “Tools – Hangul/Hanja Conversion” from OpenOffice.org main menu (see Figure 1).

These are formatting options for the document view.

Note: In case Hangul and Hanja are mixed in a selection there will be no suggestion for replacement possible.

Exception:

see Ignore post-positional words

Original (see Initial Behaviour)

Displays current selection.

Replace with

Displays (first) replacement suggestion from dictionary [see Dictionary]. This dialogue is also editable. See "Find".

Find

Activates individual search within dictionary. This function will be only active once the user replaced or added information to the already existing suggestion in “Replace with”.

Pressing “Find” will search within the dictionary for replacements for the user input.

While “Find” is in use “Always Ignore”, “Replace” and “Always Replace” buttons are disabled. Only “Ignore” will be still active. Pressing “Ignore” will abort the “Find” action and will return to the previous search action.

Example: The user is not satisfied with the suggested replacement. He/she can now replace or add information to this suggestion made in the “Replace with” field. In 99% of all cases this will be done in Hangul. But the user wants actually to replace Hangul with Hanja. Therefore he/she needs to look up the individual Hangul input with Hanja suggestions. “Find” will activate exactly this and will replace the user input (in Hangul) with Hanja suggestion (see Replace with)

Suggestions

Grid or list* of all available replacements found in dictionary. This will also apply when “Find” is pressed.

Grid: A grid will be used when “Replace by character” is enabled, since there are multiple (many) single characters as suggestion available.

List: A list will be used when the method uses full word replacements since a) words do not fit into a grid and b) in most cases there are only 1-3 different suggestions t a time.

* the mock-up shows only the grid and shows erroneously “Replace by character” off.

Format

Radio buttons since only one selection can be active at the time.

Hanja/Hangul

Simple conversion (replacement) from Hangul into Hanja resp. Hanja into Hangul.

Hanja (Hangul)

Formats conversion by putting the Hangul part in brackets after the Hanja part.

Hangul (Hanja)

Formats conversion by putting the Hanja part in brackets after the Hangul part.

Hangul Hanja

Puts the Hanja part as Ruby text above (Position: Top, Alignment: Center) the Hangul part. The Ruby part will use the style settings from default Ruby style for formatting .

Note: As long as Draw and calc do not support Ruby formatting this formatting will not be available in Impress/Draw , Calc and text in objects.

Hangul Hanja

Puts the Hanja part as Ruby text below (Position: Bottom, Alignment: Center) the Hangul part. The Ruby part will use the style settings from default Ruby style for formatting

Note: As long as Draw and calc do not support Ruby formatting this formatting will not be available in Impress/Draw , Calc and text in objects.

Hanja Hangul

Puts the Hangul part as Ruby text above (Position: Top, Alignment: Center) the Hanja part. The Ruby part will use the style settings from default Ruby style for formatting .

Note: As long as Draw and calc do not support Ruby formatting this formatting will not be available in Impress/Draw , Calc and text in objects.

Hanja Hangul

Puts the Hangul part as Ruby text below (Position: Bottom, Alignment: Center) the Hanja part. The Ruby part will use the style settings from default Ruby style for formatting .

Note: As long as Draw and calc do not support Ruby formatting this formatting will not be available in Impress/Draw , Calc and text in objects.

Conversion: Hangul only/Hanja only

While Hangul/Hanja Conversion is normally (see default below) a content sensitive bidirectional converter the user might want to use it one-way-only.

Example: A user has a mixed Hangul/Hanja document but wants to convert Hangul-to-Hanja only but leave all Hanja untouched then checking the Conversion: Hangul only option will accomplish this goal.

Depending on the underlying characters from where the dialogue is invoked Hangul only or Hanja only is in/active:

Dialogue is invoked starting with Hanja then Hanja only is active (and unchecked) and Hangul only is inactive.

Dialogue is invoked starting with Hangul then Hangul only is active (and unchecked) and Hanja only is inactive.

Default (for every new invocation of this dialogue): off

Ignore

No changes will be made to current selection and next word/character will be selected for conversion.

Always Ignore

No changes will be made to current selection and every time the same selection is detected is will be automatically skipped (without user interaction). Conversion will proceed to the next selection.

But ignoring AF must not lead to ignore the AF within CAFE (unless “Replace by character” is activated).

The ignore list will be active for the current document only and will not be saved permanently.

Replace

Replaces the selection with the selected suggestion according to the set format options and proceed to the next word/character.

Replace All

Replaces the selection with the selected suggestion and every time the same selection is detected it will automatically replace it (without user interaction). Conversion will proceed to the next selection.

But replacing AF must not lead to replace the AF within CAFE (unless “Replace by character” is activated).

The replace list will be active for the current document only and will not be saved permanently.

Replace by character

If activated the Hangul/Hanja conversion will not “move” word-to-word but character-to-character.

Default setting is off.

Options

Invokes the “Hangul/Hanja Options” dialogue

Help

Invokes help

Close

Dismisses any unconfirmed changes and closes dialogue.

“Hangul/Hanja Options” options (Goal OO.o 2.0)

This dialogue will be invoked by choosing “Options” from “Hangul/Hanja conversion” dialogue (see Figure 2). These settings are persistent.

These settings must not appear in the “Options” dialogue but must be specified and saved in the configuration database.

User-defined dictionaries

Select-list of all available user-defined dictionaries.

Note: with a standard installation the will be no entry here.

show w/o extension in UI both visible in dialoiue

New

Invokes dialogue to add a new user-defined dictionary (please refer to 1.5 Modified “New Dictionary” dialogue)

Edit

Invokes the dialogue to edit the selected user-defined dictionary (please refer to 1.6 Modified “Edit Custom dictionary” dialogue).

Delete

Deletes the the selected user-defined dictionary.

Options

List of options that can be set. These settings are persistent and apply to all dictionaries.

Show words recently used first

If activated the list of suggestions (if available) will always put the suggestion on top of the list that has been selected the last time it was used.

(Note: Behaviour like the font list box in the function bar.)

Default is off.

Ignore post-positional words

In Korean words sometimes come with additional characters at the end of the word to accomplish grammatical necessities. Since those post-positional words are not separated by space an algorithm has to detect them and to separated the from the current selection. Otherwise the entry cannot be found in the dictionary.

Default is on

Replace all unique entries automatically

If active this function will automatically correct every selection for whom only a unique (single) suggestion can be found in the activated dictionaries. It will also skip all selections automatically that have no entry in the dictionary.

In order to avoid bidirectional changes (e.g. From Hangul to Hanja and from Hanja to Hangul) the dialogue will always show up first in order to choose the preferred conversion direction.

Technically spoken this means the first Hangul/Hanja character found will not be converted automatically, all following ones are.

Modified “New Hangul/Hanja Dictionary” dialogue (Goal OO.o 2.0)

This dialogue has the same functionality as its counter part from spell checking “New Dictionary” (Figure 4).

The only difference is that it will

a) create Hangul/Hanja conversion dictionaries (see definition of those at 2 Definition of Conversion Dictionaries) instead of .DIC files and

b) it is stripped by the language drop down list box (since it can be Korean only) and the “Exception” checkbox.

Modified “Edit Hangul/Hanja Custom Dictionary” dialogue (Goal 'OO.o 2.0)

To edit new dictionaries the conventional “Edit Custom Dictionaries” dialogue has to be enhanced (see Figure 5).

Extension behaviour analogue to “New Dictionary” dialogue of spellchecker.

Book

Selection drop-down list for all available user-defined dictionaries.

Original

Drop-down list of all available user-defined entries. Per default this entry should always show [Enter text here] with typing focus (see Figure 5, Status 1). The user can now type a new “Original” right in.

After entering text <ENTER> will move the focus to the first entry field in “Suggestions”. It must not activate “New” since every “Original” entry must have at least one “Suggestion” counterpart.

If an entry is chosen (by using the drop-down list) the belonging suggestions will be displayed below (see Figure 5, Status 2).

Suggestion

Like “Original”. The user can add one entry. This should be only possible if “Original” is not empty.

New

Pressing “New” saves the currently made new or updated entry.

Note: It is mandatory that the user makes or already has an entry in “Original” and one entry in “Suggestion”. As long as those conditions are not met “New” must stay inactive!

With “New” the user can create a complete new entry (see Figure 5, Status 1) or modify an existing one (see Figure 5, Status 2).

In case an invalid entry, such as non-Hanja or non-Hangul characters or different number of characters, the entry will be dropped.

In this case a generic error-message will pop up, see Figure 3 on page 13.

Delete

“Delete” deletes a selected entry.

Definition of Conversion Dictionaries (Goal OO.o 2.0)

The format of this dictionary will use XML.

A sample would be:

<tcd:text-conversion-dictionary tcd:package="org.openoffice.Office" tcd:lang="ko-KR" tcd:conversion-type="Hanja / Hangul">

-

<tcd:entry tcd:left-text="懶">

<tcd:right-text>영</tcd:right-text>

</tcd:entry>

-

<tcd:entry tcd:left-text="沓形">

<tcd:right-text>외외</tcd:right-text>

<tcd:right-text>부분</tcd:right-text>

</tcd:entry>

-

<tcd:entry tcd:left-text="能">

<tcd:right-text>기</tcd:right-text>

</tcd:entry>

</tcd:text-conversion-dictionary>

Conversion dictionaries must carry a different file name extension than their spell checking counterparts. They must not be named .DIC!

The extension of these files will be .TCD (Text Conversion Dictionary)

This leaves open space to reuse this format for other conversion dictionaries (such as “Traditional Chinese <-> Simplified Chinese Translator”)

The standard path for this dictionary is the same as the already existing one for all other spell dictionaries.

User-defined Dictionary Definition

Format

See Definition of Conversion Dictionaries (Goal OO.o 2.0)

Screen Shots (mock-ups)

The screen shots below are based on existing spell-checking dialogues and will serve all necessary needs for a complete Hangul<->Hanja conversion.

Note: Mnemonics are not up-to-date. Please use only the mnemonics from the String List table.

Please refer to string list for strings only! Figure 1 Hangul/Hanja conversion Dialogue

Please refer to string list for strings only! Figure 2 Options Dialogue (Goal OO.o 2.0)

Please refer to string list for final strings! Figure 3 error message

Please refer to string list for strings only! Figure 4 New Dictionary (modified) (Goal OO.o 2.0)

Please refer to string list for strings only! Figure 5 Edit Custom Dictionary (Goal OO.o 2.0)

String List

Already existing strings are in grey colour.

String	German translation	comment
Hangul/Hanja Conversion...	Hangul/Hanja Konvertierung...	Title; “Hangul/Hanja conversion” dialogue
Original	Original	“Hangul/Hanja conversion” dialogue
Re~place with	Ersetzen ~durch	“Hangul/Hanja conversion” dialogue
~Find	Suchen	Button; “Hangul/Hanja conversion” dialogue
~Suggestions	Vorschläge	“Hangul/Hanja conversion” dialogue
Format	Format	“Hangul/Hanja conversion” dialogue
~Hanja/Hangul	Hanja/Hangul	“Hangul/Hanja conversion” dialogue
Hanja (Han~gul)	Hanja (Hangul)	“Hangul/Hanja conversion” dialogue
Hang~ul (Hanja)	Hangul (Hanja)	“Hangul/Hanja conversion” dialogue
Hangu~l Hanja	Hangul Hanja	“Hangul/Hanja conversion” dialogue
Hang~ul Hanja	Hangul Hanja	“Hangul/Hanja conversion” dialogue
Han~ja Hangul	Hanja Hangul	“Hangul/Hanja conversion” dialogue
Ha~nja Hangul	Hanja Hangul	“Hangul/Hanja conversion” dialogue
Conversion	Konvertierung	“Hangul/Hanja conversion” dialogue
Hangul ~only	Nur Hangul	“Hangul/Hanja conversion” dialogue
Hanja onl~y	Nur Hanja	“Hangul/Hanja conversion” dialogue
~Ignore	Ignorieren	“Hangul/Hanja conversion” dialogue
Always I~gnore	Immer ignorieren	“Hangul/Hanja conversion” dialogue
~Replace	Ersetzen	“Hangul/Hanja conversion” dialogue
Al~ways Replace	Immer ersetzen	“Hangul/Hanja conversion” dialogue
Replace b~y character	Einzelne Zeichen ersetzen	“Hangul/Hanja conversion” dialogue
~Options...	Optionen...	“Hangul/Hanja conversion” dialogue
Hangul/Hanja Options	Hangul/Hanja Optionen	Title; “Hangul/Hanja options” dialogue
~User-defined dictionaries	Benutzerwörterbücher	“Hangul/Hanja options” dialogue
~New...	Neu...	“Hangul/Hanja options” dialogue
~Edit...	Bearbeiten...	“Hangul/Hanja options” dialogue
Dele~te	Löschen	“Hangul/Hanja options” dialogue
Options	Optionen	“Hangul/Hanja options” dialogue
Show recently used entries first	Zuletzt benutzte Einträge zuerst zeigen	“Hangul/Hanja options” dialogue
~Ignore post-positional word	Nachstehendes Wort ignorieren	“Hangul/Hanja options” dialogue
~Replace all unique entries automatically	Alle eindeutigen Einträge automatisch ersetzen	“Hangul/Hanja options” dialogue
New Hangul/Hanja Dictionary	Hangul/Hanja Benutzerwörterbuch anlegen	Title; New Hangul/Hanja Dictionary
Hangul/Hanja Dictionary	Hangul/Hanja Wörterbuch	New Hangul/Hanja Dictionary
~Name	Name	New Hangul/Hanja Dictionary
Edit Hangul/Hanja Dictionary Custom Dictionary	Hangul/Hanja Dictionary Benutzerwörterbuch bearbeiten	Title; Edit Hangul/Hanja Dictionary Custom Dictionary
~Book	Buch	Edit Custom Hangul/Hanja Dictionary
~Original	Original	Edit Custom Hangul/Hanja Dictionary
~Suggestions	Vorschläge	Edit Custom Hangul/Hanja Dictionary
~New	Neu	Edit Custom Hangul/Hanja Dictionary
~Delete	Löschen	Edit Custom Hangul/Hanja Dictionary
The text you entered is not valid. No addition to the dictionary was made.	Der eingegebene Text ist nicht gültig. Es wurde dem Wörterbuch nichts hinzugefügt.	Error message

Hangul/Hanja Conversion Method	16

16	Hangul/Hanja Conversion Method

Http://specs.openoffice.org/g11n/HHC/Hangul-Hanja_Conversion.sxw

Sun Proprietary/Confidential: Internal Use Only

Hangul/Hanja Conversion Method

Falko Tesch

2002-11-28T14:53:53

Falko Tesch