NjxSelect Function

Description

This function performs the following operations on each processing result structure specified.
- Processing result structure (for learning)
Registers entries in the learning dictionary and pseudo-dictionary based on learning information in the processing results structure.
- Processing result structure (for preconfirmed information)
Sets learning information in the processing results structure as preconfirmed information. Do not specify the delimited input results from morphological analysis to this function. If learning of morphological analysis results is needed, use the morphological analysis learning function.

Syntax

#include <mw/iwnn/iwnnCTR.h>

s16 NjxSelect( 
     IWNN_CLASS* iwnn,                            // Parsing information class
     const IWNN_RESULT* learningResult,           // Structure for storing results (for learning)
     const IWNN_RESULT* preConfirmedResult,       //  Structure for storing results (for preconfirmed information)
     u8 connect                                   // Associative learning flag
);

Arguments

NameDescription
IN / OUT IWNN_CLASS* iwnn Parsing information class
An error results if NULL is specified.
IN const IWNN_RESULT* learningResult Structure for storing results (for learning)
No entry is made in the learning dictionary if NULL is specified.
IN const IWNN_RESULT* preConfirmedResult Structure for storing results (for preconfirmed information)
Preconfirmed information is deleted if NULL is specified.
IN u8 connect Associative learning flag.
Specifies whether to learn by association with previously confirmed candidates.
0: Do not perform associative learning.
1: Perform associative learning.

Return Value

s16 Negative value: Error
Other: Normal exit

Error Codes Description of Error
NJ_ERR_PARAM_ENVIRONMENT_NULL A NULL pointer was specified for iwnn
NJ_ERR_NO_RULE_DIC Returned when a rule dictionary was not set in iwnn->dicSet
NJ_ERR_INVALID_FLAG A value other than 0 or 1 was specified in connect
NJ_ERR_INVALID_RESULT   ■ Unsupported code was set for operations on learningResult and preConfirmedResult
  ■ The dictionary from which candidates are to be obtained does not return a reading for reverse look-up results
  ■ The values for learningResult and preConfirmedResult are the result of morphological analysis
NJ_ERR_DIC_TYPE_INVALID Unsupported code was set for the dictionary type obtained from the single-word dictionary address given for learningResult and preConfirmedResult
NJ_ERR_DIC_BROKEN   ■ The target dictionary used with learningResult and preConfirmedResult is an uncompressed dictionary, and one of the following situations has occurred
  ■ The data stored in the queue corresponding to the queue ID is corrupted
  ■ Input data longer than NJ_MAX_LEN + 1 was stored as single word data in the dictionary
  ■ Connection information for a single word used in multiple queues is corrupted
  ■ The target dictionary for learningResult and preConfirmedResult is an uncompressed dictionary and one of the following situations occur
  ■ The queue ID is corrupted
  ■ An input character string longer than NJ_MAX_USER_LEN + 1 or a candidate character string longer than NJ_MAX_USER_CANDIDATE_LEN + 1 is discovered in the user dictionary
  ■ An input character string longer than NJ_MAX_LEN + 1 or a candidate character string longer than NJ_MAX_RESULT_LEN + 1 is detected in a dictionary other than the user dictionary
  ■ Connection information for a single word used in multiple queues is corrupted
  ■ The add location in the user dictionary could not be obtained from the user dictionary specified in iwnn->dicSet
  ■ The number of registered words is greater than the maximum number of registered words in the headers for the learning dictionary and user dictionary specified in iwnn->dicSet
  ■ The data in the learning dictionary and user dictionary queue specified in iwnn->dicSet is corrupted
NJ_ERR_READING_TOO_LONG The input string length exceeds NJ_MAX_LEN in cases where the content of learningResult and preConfirmedResult was generated by means other than morphological analysis
NJ_ERR_PROTECTION_ERR Returned when operations have been performed on memory secured by using a learning dictionary function
NJ_ERR_CANDIDATE_TOO_LONG A value greater than NJ_MAX_RESULT_LEN + 1 was set for the candidate string length of learningResult and preConfirmedResult

CONFIDENTIAL