IFELanguage2::GetMorphResult Method
This method is used to get morphological analysis results. Before you use this function, call IFELanguage2::Open Method once for initialization.
Parameter | Description |
---|---|
|
(IN) A request for conversion |
|
(IN) Any combination of the values below is possible, which determines the conversion output characters and some conversion options: FELANG_CMODE_MONORUBY |
|
(IN) Number of characters of ptchInput |
|
(IN) Original input characters to be converted by morphology engine |
|
(IN) Means the information for each column FELANG_CLMN_WBREAK |
|
(OUT) Address of an MORRSLT structure that receives morphology result data |
Return |
Values |
|
S_OK: |
dwRequest—Request for Conversion
FELANG_REQ_CONV is used to get a composition string from a string with Japanese phonetic characters. This request requires that the input string is a string with Japanese phonetic characters that doesn't have any ideographic character.
FELANG_REQ_RECONV is used to get a composition string from a composition string. This request is to get a re-conversion result from a conversion result.
FELANG_REQ_REV is used to get a string with Japanese phonetic characters from a composition string. On this request, the contents of WDD[n].wDispPos
and WDD[n].wReadPos
are exchanged.
MORRSLT.pwchRead
is used as the source of reverse conversion.
pfCInfo
is information relating to an input in each column.
Any combination of the flags below can be set for each column of an input string:
|
|
|
The result must not be divided here when IFELanguage makes a word. |
|
|
|
The result must not be divided here when IFELanguage makes a PHRASE. |
|
|
|
|
dwCMode—Conversion Mode
Any combination of the values below is possible. This determines the conversion mode.
FELANG_CMODE_MONORUBY: Makes a string with Japanese phonetic characters for mono-ruby wherever possible. If this flag is set, the returned result is put at paMonoBubyPos. This mode is valid when FELANG_REQ_REV is specified.
FELANG_CMODE_NOPRUNING: No pruning (filtering) in morphology analysis.
On input of , it may return, for example, ( is the body part of ). This result is impossible grammatically, but with FELANG_CMODE_NOPRUNING, one can obtain this candidate.
FELANG_CMODE_KATAKANAOUT: Output is in Katakana (Japanese phonetic) characters when IFELANG_REQ_REV is specified.
FELANG_CMODE_HIRAGANAOUT: Output is in Hiragana (Japanese phonetic) characters when IFELANG_REQ_REV is specified.
FELANG_CMODE_ROMAN: Output is in Roman characters when IFELANG_REQ_REV is specified.
FELANG_CMODE_HALFWIDTHOUT: Output is in half-width characters.
FELANG_CMODE_FULLWIDTHOUT: Output is in full-width characters (default).
FELANG_CMODE_BOPOMOFO: Output is in Bopomofo (Taiwan phonetic) characters when IFELANG_REQ_REV is specified.
FELANG_CMODE_HANGUL: Output is in Hangul (Korean phonetic) characters when IFELANG_REQ_REV is specified.
FELANG_CMODE_PINYIN: Output is in Pinyin (Chinese phonetic) characters when IFELANG_REQ_REV is specified.
FELANG_CMODE_PRECONV: Performs the following conversion before the actual conversion. These are implementation defined:
ROMAN to phonetic characters, for example: [a] to []
The auto collect before the conversion, for example: [] to [-]
The conversion of the punctuation mark and the brackets, for example: [] to [,]
FELANG_CMODE_RADICAL: Japanese phonetic characters are returned in radical (CHN).
FELANG_CMODE_UNKNOWNREADING: Japanese phonetic characters are returned in unknown format. (CHN)
FELANG_CMODE_MERGECAND: The result strings (candidates) are merged when the strings are the same.
FELANG_CMODE_ROMAN (JPN): Enables the romaji-kana conversion.
FELANG_CMODE_BESTFIRST: Forces simple conversion to get better performance time rather than conversion accuracy.
FELANG_CMODE_USENOREVWORDS(JPN): Optional conversion using additional words (for example, reverse conversion from address to ZIP code)
FELANG_CMODE_NONE: Corresponds to the analysis in IME_SMODE_NONE
FELANG_CMODE_PLAURALCLAUSE: Corresponds to the analysis in IME_SMODE_ PLAURALCLAUSE
FELANG_CMODE_SINGLECONVERT: Corresponds to the analysis in IME_SMODE_SINGLECONVERT
FELANG_CMODE_AUTOMATIC: Corresponds to the analysis in IME_SMODE_AUTOMATIC
FELANG_CMODE_PHRASEPREDICT: Corresponds to the analysis in IME_SMODE_PHRASEPREDICT
FELANG_CMODE_CONVERSATION: Corresponds to the analysis in IME_SMODE_CONVERSATION
FELANG_CMODE_NAME(JPN): Name mode (same as FELANG_CMODE_PLAURALCLAUSE)
FELANG_CMODE_NOINVISIBLECHAR: When specified, remove invisible characters in output string. This flag is usually used for display purpose. Both CHN and TWN IME will return some spaces and invisible characters. (For example, First tone mark, U+02c9, in Bopomofo.) For these, however, invisible characters should be removed upon displaying.
Note: |
---|
This function should not fail on any input (except memory full, and so on). In the worst case, this function returns a result with an unknown word. |