This page will introduce how to use the "Phrase editor" and the important configuration file "ciyu.ini".

Note: Although most of the figure is captured from Linux version, it also works in Windows version.

"Phrase Editor" lets you load phrase table, add/delete phrases on the fly. To invoke it, you can press the "修" (repair) button in the input bar, as like:

ylam_im_bar.gif

Then you should see something like below:

phrase_editor.png

Loading Phrase Table

    You can load your own code table. Code table is a Windows Unicode encoded text file. It contains phrases, format is:
code, a space, word
    Examples:

apple 苹果 code is "apple", word is "苹果"
aaa how are you today
code is "aaa", word is "how are you today"
orange 橘子
code is "orange", word is "橘子"

    In Windows, to generate Windows Unicode encoded text file, you can use Notepad or Word in Microsoft Office, as in the following diagram:
notepad.gif   winword.gif
Save text file in Windows Unicode format in Notepad Save text file in Windows Unicode format in Microsoft Word

    In Linux, to save a text file in Windows Unicode format is a bit difficult. By default, Linux save text files in utf-8 format. It is suggested that you download and save a template Windows Unicode file: phrase.txt, then use vim / gvim / Open Office oowriter etc. to open it, replace your own content and save it as other file name. A quick way to test whether a file is Windows Unicode format is to use xxd / hexdump and see if the first 2 bytes of the text file is FF FE:

0000000: fffe 6100 7000 7000 6c00 6500 2000 0b86  ..a.p.p.l.e. ...

    You can create your own phrase table. Then either:
  1. Click "Load From File" to load the phrase table. (This will replace the existing table).
  2. Put your phrase table in internet, the type the URL in URL bar in phrase editor and then click "Load From URL" button. (This will replace the existing table)
  3. If your code table contains only a few phrases and you want to add the phrases into the current phrase table, you can type the URL in URL bar, and then click "Update From URL".

Display mode

    After you loaded phrase table:
    So you will see the phrase table in one of the 3 display mode:
Add Phrases

    Sometimes you may want to add new phrases. For example, you would like to type aaa to send 歪林输入法 (YLam input method).

    You can in type "aaa 歪林输入法" in phrase editor, click "Add Phrases" and then click "yes" in the pop up windows, as below:

add_phrase.gif
    Sometimes, you may want to add more than 1 phrase. You can copy all the phrases into clipboard, then click "Add Clipboard", as below:

add_clipboard.gif


Change position of candidate words / Deleting phrases

    For some Chinese typing method, especially Pinyin type input method, there are many candidate words for one code. You may want to change position of candidate word. To do this, you may want to turn off "move front" feature for candidate word that was chosen to sent (see below). Then:

    Suppose the candidate words for code "ba" is as below:

ba.gif
      
    and you think "吧" should be in the front:
  • invoke phrase editor
  • change to "Show Dictionary Sorted By Code" display mode
  • type "ba", and click Search button
  • highlight "ba 吧" phrases, and the click "Move Up". See below:
ba1.gif
  • click OK. Type "ba" again and you will see "吧" is the first candidate word:
ba2.gif
  • If you want to delete "ba 吧", you can click "Delete" button.

Export Code Table / Check Index Files

    After you first load the phrase table, you may have done the following operation many times:
  • add phrases
  • move phrases up / down
  • delete phrases
    Moreover, your original code table may have the following problem:
  • not sorted
  • contains repeated phrases
  • contains empty lines
    You may want to export a clean and sorted phrase table. Suppose you want to export the phrase table to c:\temp\ (Windows) (or /tmp/ (Linux)), please enter c:\temp\ (or /tmp/ ), as like below:
export.gif

    Click "Exported Sorted Dictionary". A Windows Unicode format phrase table will be saved in c:\temp\_by_code (or /tmp/_by_code).
    c:\temp\_by_word (or  /tmp/_by_word) will contain a table without code (i.e. with only the words).

    For this program to search code / associated words, the index files must be in alphabetical order. After add / delete phrases, the index files may be not in strict alphabetical order, due to bug in the software. Click "Check Index File" can check the index files.



Other settings

Click "Other Settings", a windows will pop up and let you modify "ciyu.ini".
In Windows, the file is usually in c:\program files\ylam_input_unicode_tw\ciyu.ini or c:\program files\ylam_input_unicode_cn\ciyu.ini
In Linux, the file is usually in ~/.ylams/ciyu.ini or ~/.ylamt/ciyu.ini

Some of the settings are:

fast key:

    You may want to press "," key for ",", or "[" key for "「".  You can define "Fast Key" here.

numkey_as_code:

    For some input method, the number keys 1,2,3,4,5,6,7,8,9,0 will be used for code keys. Then number keys cannot be used for selecting candidate words.(y)

num_code_as_key0.gif
    For some input method, the number keys will NOT be used as code keys. Then number keys can be used for selecting candidate words (n)
num_code_as_key1.gif
   
move_front:

    When you chose a candidate word, you may want to make it become the first candidate word next time. To turn it off, you should choose "n".

Other settings are self-explanatory and not detailed them here.


YLam, Hong Kong, China
2006/07/22