NjxChangeDicType Function

Description

This function changes the specified learning dictionary to an uncompressed customized dictionary.
This function also changes the switched, uncompressed customized dictionary to a learning dictionary.
Because only dictionary header information inside the specified dictionary handle changes when using this function, be sure to check dictionary data and verify integrity using the function for checking dictionaries (NjxCheckDic). When a learning dictionary (with additional information) is converted, the type is changed to an uncompressed customized dictionary. When an uncompressed customized dictionary is converted, the type is changed to a learning dictionary (with additional information).

Syntax

#include <mw/iwnn/iwnnCTR.h>

s16 NjxChangeDicType(
     IWNN_DIC_HANDLE handle,                     // Dictionary handle
     const IWNN_CLASS* iwnn,                     // Parsing information class
     u8 direct                                   //  Type of dictionary to change to
);

Arguments

NameDescription
IN / OUT IWNN_DIC_HANDLE handle Dictionary handle.
An error results if NULL is specified.
IN const IWNN_CLASS* iwnn Parsing information class
An error results if NULL is specified.
IN u8 direct Type of dictionary to change to
0: Change from learning dictionary to uncompressed customized dictionary
1: Change from uncompressed customized dictionary to learning dictionary
Note that an uncompressed customized dictionary created with a customized dictionary creation tool cannot be changed to a learning dictionary.

Return Value

s16 Negative value: Error
0: Normal exit

Error Code Description of Error
NJ_ERR_PARAM_ENVIRONMENT_NULL A NULL pointer was specified for iwnn
NJ_ERR_DIC_HANDLE_NULL A NULL pointer was specified for handle
NJ_ERR_DIC_TYPE_INVALID A dictionary type other than a learning dictionary or uncompressed customized dictionary was specified in handle
NJ_ERR_INVALID_FLAG   ■ An out-of-bounds value was set for direct
  ■ The dictionary type specified in handle cannot be changed to the type of dictionary specified in direct
NJ_ERR_DIC_VERSION_INVALID Advanced Wnn V1.11 or an earlier dictionary version was specified for the dictionary specified by handle

CONFIDENTIAL