Project Description

ImeLib is an easy-to-use IME library for getting reverse conversion of East Asian text, such as Chinese PinYing, Bopomofo (Ju-Yin-Fu-Hao), Japanese Hiragana, etc.

NOTE: Do not post questions in your review. I won't get notified! Any questions or suggestions, plz go to Discussions board.

Project Description in Chinese

ImeLib 是一個輔助存取輸入法相關服務的工具,它提供了方便易用的類別,能夠協助取得中日韓文字(尤其是中文)的注音/拼音字根,包括台灣的注音符號(ㄅㄆㄇㄈ;國音第一式)、中國大陸的拼音、以及日本的平假名、片假名等等。ImeLib 主要封裝了 IFELanguage,並提供更簡便的方法來取得特定文字字串的注音字根。

注意: 不要把你的問題寫在 review 裡面,我收不到!有任何問題或建議,請至 Disscussions 區反映。

Features
  • Get reverse conversion of East Asian text. Currently tested IME languages include: MSIME.China, MSIME.Japan, MSIME.Taiwan, MSIME.TaiwanBbo (mainly Taiwan, since it's my mother tongue).
  • Provides some helper methods for IMM32.dll.
  • Check if a specified IME has installed.

Example

C#:
using ImeLib
......
	using (MsImeFacade ime = new MsImeFacade(ImeClass.Taiwan))
	{
		string[] result = ime.GetBopomofo("方便又便宜得不得了");
		foreach (string s in result) {
			Console.Write(s + "_")  // output: ㄈㄤ_ㄅㄧㄢˋ _一ㄡˋ_ㄆㄧㄢˊ_ㄧˊ_ㄉㄜ˙_ㄅㄨˋ_ㄉㄜˊ_ㄌㄧㄠˇ

		}	
	}

Screen shot of the example application

2009-04-01_000543.gif
Notice the different results for the words "便" and "得".

Trouble Shooting

If you encounter the 0x80004005 error (interface not supported), please ensure your Windows system has the following registry keys:
  • MSIME.China - Required if you need to get Chinese Pinyin.
  • MSIME.Taiwan - Required if you need to get Chinese Bopomofo (phonetic symbols).
  • MSIME.Japan - For Japanese.

For Windows Vista, you should be fine if you have Office 2007 installed. Otherwise, you may need to import some registry keys, See this article for more information: Ruby text is not displayed in the Phonetic Guide dialog box in Word on a computer that is running Windows Vista

NOTE: If you are writing a console application, be sure to apply [STAThread] attribute to your main() method.
注意:如果你正在撰寫 console 應用程式,請確定你的 main() 方法有套用 STAThread] attribute。

Related Articles

Last edited Nov 24, 2010 at 12:31 PM by huanlin, version 26