#include <mw/iwnn/iwnnCTR.h> s16 NjxCreateDic( IWNN_DIC_HANDLE handle, // Dictionary handle const IWNN_CLASS* iwnn, // Parsing information class s8 type, // Dictionary type u32 size // Dictionary byte size );
Name | Description | |
---|---|---|
IN / OUT | IWNN_DIC_HANDLE handle | The dictionary handle of a user dictionary or learning dictionary. An error results if NULL is specified. |
IN | const IWNN_CLASS* iwnn | Parsing information class. An error results if NULL is specified. |
IN | u8 type | Dictionary typeNJ_CREATE_DIC_TYPE_USER : User dictionaryNJ_CREATE_DIC_TYPE_LEARN_AWNN : Learning dictionary-AWnn type-NJ_CREATE_DIC_TYPE_LEARN : Learning dictionary-iWnn type-NJ_CREATE_DIC_TYPE_USER_ADDITIONAL : User dictionary (with additional information)NJ_CREATE_DIC_TYPE_LEARN_ADDITIONAL : Learning dictionary-iWnn type- (with additional information) |
IN | u32 size | Byte size of the memory specified by handle .The user dictionary is fixed to either NJ_USER_DIC_SIZE (dictionary without additional information) or NJ_USER2_DIC_SIZE (dictionary with additional information). A learning structure having the specified size is created for a learning dictionary. An error results if there is not enough memory to be initialized as a dictionary. |
s16 |
Non-negative value: Normal exit Negative value: Error |
Error Codes | Description of Error |
NJ_ERR_PARAM_ENVIRONMENT_NULL |
A NULL pointer was specified for iwnn . |
NJ_ERR_DIC_HANDLE_NULL |
NULL was set in handle . |
NJ_ERR_CREATE_TYPE_INVALID |
A value other than 0 , 1 , or 2 was specified in type . |
NJ_ERR_AREA_SIZE_INVALID |
■ A value less than the minimum size required to create a dictionary was set in size .■ A value exceeding the 256 KB queue size is specified in size . |
NJ_USER_DIC_SIZE
) is calculated using:NJ_MAX_USER_LEN
)NJ_MAX_USER_CANDIDATE_LEN
)NJ_MAX_USER_COUNT
)Header region | 80 Bytes |
Memory per registered entry | Maximum reading string length registered as a word in the user dictionary * sizeof(wchar_t) + Maximum candidate string length registered as a word in the user dictionary * sizeof(wchar_t) + 9 Bytes |
NJ_MAX_USER_LEN
) and the maximum string length for a candidate registered as a word in the user dictionary (NJ_MAX_USER_CANDIDATE_LEN
) are both 30, and the maximum number of words registered in the user dictionary (NJ_MAX_USER_COUNT
) is 100, then the following amount of memory is required:NJ_USER2_DIC_SIZE
) is calculated using:NJ_MAX_USER_LEN
)NJ_MAX_USER_CANDIDATE_LEN
)NJ_MAX_ADDITIONAL_LEN
)NJ_MAX_USER_COUNT
)Header region | 80 Bytes |
Memory per registered entry | Maximum reading string length registered as a word in the user dictionary * sizeof(wchar_t) + Maximum candidate string length registered as a word in the user dictionary * sizeof(wchar_t) + Maximum additional information string registered as a word in the user dictionary * sizeof(wchar_t) + 9 Bytes |
NJ_MAX_USER_LEN
), the maximum string length for a candidate registered as a word in the user dictionary (NJ_MAX_USER_CANDIDATE_LEN
), and the maximum length of an additional information string registered as a word in the user dictionary (NJ_MAX_ADDITIONAL_LEN
) are all 30, and the maximum number of words registered in the user dictionary (NJ_MAX_USER_COUNT
) is 100, then the following amount of memory is required:Header region | 80 Bytes |
Memory per registered entry | 42 Bytes |
Header region | 80 Bytes |
Memory per registered entry | 44 + maximum additional information string length * sizeof(wchar_t) Bytes |
Header region | 80 Bytes |
Memory per registered entry | 36 Bytes |
NJ_MAX_RESULT_LEN
). Given a learning dictionary capable of registering up to 1000 words (phrases) and a maximum conversion candidate string length of 55 characters, the number of learned words (phrases) that can be used is:CONFIDENTIAL