wordList
) is undefined.#include <mw/iwnn/iwnnCTR.h> s16 NjxMergeWordList( IWNN_MERGE_RESULT* wordList, // Candidate list s32 listMax, // Maximum number of storable candidates u32 mode, // Merge method const IWNN_CLASS* iwnn, // Parsing information class const IWNN_RESULT* result, // Array of candidates to be merged u32 num // Number of candidates to be merged );
Name | Description | |
---|---|---|
IN / OUT | IWNN_MERGE_RESULT* wordList | Candidate list. This is used to store the order of the list. Because pointers to iwnn and result are maintained internally, the memory pointed to by iwnn and result for input should not be overwritten or deallocated until use of the candidate list has ended. |
IN | s32 listMax | Maximum number of storable candidates. This is the maximum number of candidates that can be stored in wordList . This cannot be specified if NJ_MAX_CANDIDATE is exceeded. |
IN | u32 mode | Merge method - NJ_MERGE_INIT :Clear the list and then add. (Used when creating an initial candidate list) - NJ_MERGE_NOT_EXIST :Append only items not currently on the candidate list. Items beyond the maximum number of storable candidates are not added. - NJ_MERGE_NOT_EXIST_FORCE :Only items that do not exist on the candidate list are added to the end. If the number of candidates to add exceeds the maximum storable number, candidates are deleted from the end of the existing candidate list. - NJ_MERGE_FORCE :All candidates in result are added to the end of the list.Existing candidates matching added candidates are moved to the end of the existing list. If the number of candidates to add exceeds the maximum storable number, candidates are deleted from the end of the existing candidate list. |
IN | const IWNN_CLASS* iwnn | Parsing information class. This is used to obtain word information from result . |
IN | const IWNN_RESULT* result | Candidate array to be merged. This is the array of candidates to add to the candidate list. This array must not contain duplicate candidates. |
IN | u32 num | Number of candidates to be merged. This is the number of array candidates to merge with the candidate list. If a number larger than list_num is specified, operations are carried out as if list_num had been specified. |
s16 | Number of candidates stored in the candidate list. Negative in the event of an error. |
Error Code | Description of Error |
NJ_ERR_PARAM_ENVIRONMENT_NULL |
A NULL pointer was specified for iwnn |
NJ_ERR_PARAM_RESULT_NULL |
A NULL pointer was specified in wordList or result |
NJ_ERR_PARAM_MODE |
An invalid value was specified for mode |
NJ_ERR_BUFFER_NOT_ENOUGH |
A value larger than NJ_MAX_CANDIDATE was specified in listMax |
NJ_ERR_INVALID_RESULT |
Candidate information specified in result or in wordList has been corrupted |
CONFIDENTIAL