NjxGetStrokeWord Function

Description

This function generates information about phrases that have the same notation as their reading.
If the user directly confirms the input string without performing any conversion operations (nj_conv, nj_analyze, or nj_zenhouko), more appropriate connection prediction candidates can be obtained by using this function to create an unconverted candidate and perform word learning.
In order to handle phrase conversion internally, the same dictionary used during the phrase conversion is required.

Syntax

#include <mw/iwnn/iwnnCTR.h>

s16 NjxGetStrokeWord(
     IWNN_CLASS* iwnn,                            // Parsing information class
     IWNN_RESULT* result,                         // Buffer for storing conversion results
     const wchar_t* reading                       // Reading string
);

Arguments

NameDescription
IN / OUT IWNN_CLASS* iwnn Parsing information class
An error results if NULL is specified.
OUT IWNN_RESULT* result Buffer storing conversion results.
Enough memory to store one phrase must be allocated.
IN const wchar_t* reading Reading string to undergo no conversion.
Be sure to add a terminator at the end of the string.
Because this string memory region is used (overwritten) internally by iWnn during kanji conversion, do not change its contents until conversion is complete.

Return Value

s16 1: One phrase is stored in the conversion result storage buffer.
Negative value: Error

Error Code Description of Error
NJ_ERR_PARAM_ENVIRONMENT_NULL A NULL pointer was specified for iwnn
NJ_ERR_DIC_BROKEN   ■ The add location for learning dictionary information and user dictionary information could not be obtained from the learning dictionary and user dictionary specified in iwnn->dicSet
  ■ The number of words to register is greater than the maximum number of registerable words as defined in the learning dictionary and user dictionary header specified in iwnn->dicSet
  ■ The data in the learning dictionary and user dictionary queue specified in iwnn->dicSet is corrupted
NJ_ERR_PARAM_RESULT_NULL A NULL pointer was specified for result
NJ_ERR_PARAM_READING_NULL A NULL pointer was specified for reading
NJ_ERR_PARAM_READING_SIZE An empty character string or reading character string longer than NJ_MAX_LEN+1 was specified for reading
NJ_ERR_NO_RULE_DIC Returned when a rule dictionary was not set in iwnn->dicSet
NJ_ERR_NO_PARTS_OF_SPEECH The required part-of-speech information cannot be obtained from the rule dictionary
NJ_ERR_DIC_TYPE_INVALID An undefined dictionary was set in iwnn->dicSet

CONFIDENTIAL