#include <mw/iwnn/iwnnCTR.h> s16 NjxManageLearnDic( const IWNN_CLASS* iwnn, // Parsing information class u32 operation // Operation type );
Name | Description | |
---|---|---|
IN | const IWNN_CLASS* iwnn | Parsing information class. The learning dictionary set in the dictionary set in this structure is the target of operations. |
IN | u32 operation | Operation type. Specifies the operation to perform on the learning dictionary. NJ_MLD_OPERATION_COMMIT :Records (commits) the single-word registration range currently in effect. The commit range is protected from writing by functions for learning and so on. NJ_MLD_OPERATION_COMMIT_TO_TOP :Single words added after the previous commit position are moved ahead of the previous commit range and re-committed. NJ_MLD_OPERATION_COMMIT_CANCEL :Single words added after the previous commit position are deleted. NJ_MLD_OPERATION_GET_SPACE :Gets the maximum number of candidates that can be registered outside the commit range. |
s16 | Negative in case of an error. The return value differs depending on the operation type if termination is normal. - NJ_MLD_OPERATION_GET_SPACE : The maximum number of registerable candidates- Other: 0 |
Error Code | Description of Error |
NJ_ERR_PARAM_ENVIRONMENT_NULL |
A NULL pointer was specified for iwnn |
NJ_ERR_PARAM_MODE |
An invalid value was specified for operation |
NJ_ERR_DIC_BROKEN |
Dictionary corruption was detected |
NJ_ERR_DIC_NOT_FOUND |
The learning dictionary does not exist inside the dictionary set specified in iwnn->dicSet |
NJ_MLD_OPERATION_COMMIT_TO_TOP
operation.
Learning dictionary content: | Operation: | |
Old -> | -> New | |
Already learned range (A) | (Empty) | NJ_MLD_OPERATION_COMMIT : Records the already learned range. |
Already learned range (A) | Added candidates (B) | Candidates from another learning dictionary are registered by using the single-word registration function. |
Added candidates (B) | Already learned range (A) | NJ_MLD_OPERATION_COMMIT_TO_TOP : Moves added candidates (B) in front of already learned candidates (A). The range for both (B) and (A) at this time is redefined as the commit range. |
NJ_MLD_OPERATION_COMMIT_CANCEL
or executing the initialization function (NjxInit
).
CONFIDENTIAL