IWNN_STATE Structure

Description

The state configuration structure sets parameters used to make situational predictions.

Structure Configuration

struct IWNN_STATE {
     s16 system[NJ_MAX_STATE];                    // Standard state setting
     s16 extension[NJ_MAX_EXTENSION_STATE];       // Extension state setting
     IWNN_STATE_CALC_PARAMETER* calcParam;        // State calculation parameter
}

Structure Members

s16 system The standard state setting. This state setting is used for conversion processing inside iWnn. A bias value is set for each state in each of the elements of the array. The allowable setting range is -1000 to 1000. Each bias value is updated during the iWnn learning process. If a default bias value has already been set by the application, iWnn will operate in accordance with that state setting.
s16 extension Extension state setting. States that cannot be expressed by the standard state setting can be additionally set. This is not used internally by iWnn. This setting can be freely used with pseudo-dictionaries.
IWNN_STATE_CALC_PARAMETER* calcParam State calculation parameters. This member sets parameters for automatically updating the state setting bias value and determining the priority of candidates using the bias value. Default values are set if NULL is specified.

Standard State Setting

The following types of states are used internally by iWnn.

- 16 categories
Type Categories State Control Description of the Element Number of the Standard State Setting Array
Application iWnn
Input Field Person's name - NJ_CATEGORY_FIELD_PERSON Sets the priority of people's names. This is used with name input fields, for instance.
Noun concatenation NJ_CATEGORY_FIELD_NOUN Prioritizes nouns. This is used in situations such as filename input.
Start of sentence NJ_CATEGORY_FIELD_HEAD Prioritizes words that come at the start of sentences.
Kinds of Expressions Colloquial Expressions NJ_CATEGORY_EXPRESSION_COLLOQUIAL
Written Expressions NJ_CATEGORY_EXPRESSION_WRITTEN
Time Expressions Time period: Morning NJ_CATEGORY_TIME_MORNING
Time period: Noon NJ_CATEGORY_TIME_NOON
Time period: Night NJ_CATEGORY_TIME_NIGHT
Season: Spring NJ_CATEGORY_TIME_SPRING
Season: Summer NJ_CATEGORY_TIME_SUMMER
Season: Fall NJ_CATEGORY_TIME_AUTUMN
Season: Winter NJ_CATEGORY_TIME_WINTER
Relative time: Past - NJ_CATEGORY_TIME_PAST
Relative time: Future NJ_CATEGORY_TIME_FUTURE
Feelings Positive Feelings NJ_CATEGORY_FEEL_PLUS
Negative Feelings NJ_CATEGORY_FEEL_MINUS

- The number of categories can be expanded by specifying the 32-category compile option (NJ_OPT_STATE_TYPE2).
Type Categories State Control Description of the Element Number of the Standard State Setting Array
Application iWnn
Input Field Person's name - NJ_CATEGORY_FIELD_PERSON sets the priority of people's names. This is used with name input fields, for example.
Noun concatenation NJ_CATEGORY_FIELD_NOUN prioritizes nouns. This is used in situations such as filename input.
Start of sentence NJ_CATEGORY_FIELD_HEAD prioritizes words that come at the start of sentences.
Kinds of Expressions Colloquial Expressions NJ_CATEGORY_EXPRESSION_COLLOQUIAL
Written Expressions NJ_CATEGORY_EXPRESSION_WRITTEN
Time Expressions Time period: Morning NJ_CATEGORY_TIME_MORNING
Time period: Noon NJ_CATEGORY_TIME_NOON
Time period: Night NJ_CATEGORY_TIME_NIGHT
Relative time: Past - NJ_CATEGORY_TIME_PAST
Relative time: Future NJ_CATEGORY_TIME_FUTURE
Feelings Positive Feelings NJ_CATEGORY_FEEL_PLUS
Negative Feelings NJ_CATEGORY_FEEL_MINUS
Months Month: January NJ_CATEGORY_MONTH_JANUARY
Month: February NJ_CATEGORY_MONTH_FEBRUARY
Month: March NJ_CATEGORY_MONTH_MARCH
Month: April NJ_CATEGORY_MONTH_APRIL
Month: May NJ_CATEGORY_MONTH_MAY
Month: June NJ_CATEGORY_MONTH_JUNE
Month: July NJ_CATEGORY_MONTH_JULY
Month: August NJ_CATEGORY_MONTH_AUGUST
Month: September NJ_CATEGORY_MONTH_SEPTEMBER
Month: October NJ_CATEGORY_MONTH_OCTOBER
Month: November NJ_CATEGORY_MONTH_NOVEMBER
Month: December NJ_CATEGORY_MONTH_DECEMBER

By default, when executing learning, the state bias value of categories that include words to learn are all incremented by one by iWnn, except in the case of input field type states. In addition, the bias value is always initialized to 0 for the start of sentence category when learning words.
You can retrieve candidates prioritizing those suited to the state by having the application check for changes in the bias value during learning and updating the state setting accordingly. For example, if the past attribute has been incremented by one, words from the past category can be prioritized during the next prediction conversion by setting +30 for the past category and -800 for the future category. This moves words in the future category to the bottom of the candidate list.
The state setting bias value appropriate for using standard dictionary frequency values can be updated automatically inside iWnn by setting the compile option NJ_ADD_STATE_TYPE2.

The bias value is added to the candidate frequency value when determining the priority of candidates. For example, 100 is added to the usual frequency value for a candidate in a category with a bias value of +100.
The frequency value of the candidate varies in the range from 0 to 1000. If the value goes over the upper limit or under the lower limit, it is clamped at either 1000 or 0. In other words, a candidate in a category with a bias value of +1000 always has a maximum frequency value (1000) and has priority over learning dictionary candidates. Also, a candidate with a bias value of -1000, always has the minimum frequency value (0) and the lowest priority.

CONFIDENTIAL