IWNN_CURSOR Structure

Description

When searching for words, the dictionary set, search string, internal dictionary search position (IWNN_SEARCH_LOCATION_SET), and search conditions (IWNN_SEARCH_CONDITION) are set in the dictionary search cursor structure. A single SearchWord function is used to search. Word location information resulting from the search is stored in the search cursor structure for the same dictionary. However, internal information and the IWNN_SEARCH_LOCATION_SET structure must not be directly accessed or changed by the application.

Structure Configuration

struct IWNN_CURSOR {
struct IWNN_SEARCH_CONDITION condition;
struct IWNN_SEARCH_LOCATION_SET locationSet[NJ_MAX_DIC];
};
struct IWNN_SEARCH_CONDITION {
u8 operation;                                // Search method
u8 mode;                                     // Search candidate order
struct IWNN_DIC_SET* dicSet;                 // Dictionary set
struct { ... } partsOfSpeech;                // Member used for internal processing
wchar_t* reading;                            // Search reading string
u16 readingLen;                              // Member used for internal processing
wchar_t* kanji;                              // Pre-confirmation string during predictive candidate search
IWNN_CHARSET* charSet;                       // Fuzzy character set
     ...
};

Structure Members

u8 condition.operation Search Method
  ■ Forward look-up complete match search (0)
  ■ Forward look-up prefix match search (1)
  ■ Derived search (2)
  ■ Reverse look-up complete match search (3)
  ■ Reverse look-up prefix match search (4)
u8 condition.mode Search Candidate Order
  ■ Frequency order (0)
  ■ Reading order (1)
  ■ Registration order (2)
Reading order search can be used only when forward lookup, complete match search is specified.
Registration order searches can only be used with a learning dictionary or user dictionary. As such, only an empty string can be specified as the reading string for words to be searched.
IWNN_DIC_SET condition.dicSet Search Target Dictionary Set
wchar_t* condition.reading Reading string for the word to be searched.
Add a terminator at the end of the string.
wchar_t* condition.kanji Pre-confirmed string for derived search.
Add a terminator at the end of the string.
IWNN_CHARSET* condition.charSet Fuzzy character set used for fuzzy search.
Specify NULL if fuzzy search is not being used.
Fuzzy searches can be used only with forward look-up prefix match search and reverse look-up prefix match search.

Search Methods and Search Candidate Order by Dictionary

The following limitations are placed on the search method and search candidate order specification depending on the dictionary structure.
Dictionary Type Dictionary
Dictionaries for forward lookup complete match search Compressed customized dictionary
Ancillary word dictionary, single-kanji dictionary
Dictionaries for forward lookup prefix match searches Compressed customized dictionary
Dictionaries for reverse lookup complete match searches Compressed customized dictionary
Single-kanji dictionary (supports morphological analysis)
User dictionary
Integrated dictionary Integrated dictionary
Dictionary for connection searches Uncompressed customized dictionary
Learning dictionary
Other No reading prediction dictionary
Rule dictionary
Dictionaries that can be used for fuzzy searches are: dictionaries for forward lookup prefix match, dictionaries for reverse lookup prefix match, dictionaries for derived terms, and the integrated dictionary.

Dictionary Type and Search Method

Row: Search Method / Column: Dictionary Type Forward lookup, complete match search Forward lookup, prefix match search Reverse lookup, complete match search Reverse lookup, prefix match search Derived search
Dictionary for forward lookup, complete match search × × × ×
Dictionaries for forward lookup, prefix match search × × ×
Dictionaries for reverse lookup, complete match search × ×
Integrated dictionary
Dictionary for derived searches ×

Search Method and Search Candidate Order

Search candidate order Search method Frequency order Reading order Registration order
Forward lookup complete match search × ×
Forward lookup prefix match search
Reverse lookup complete match searches × ×
Reverse lookup prefix match search × ×
Derived search × ×
  ■ The no reading prediction dictionary and rule dictionary are not searched.
  ■ If entries are obtained in reading order, candidates having the same reading are re-arranged in candidate order only in the case of the user dictionary.
    Same reading candidates are given in frequency order for all other dictionaries.
  ■ Only learning dictionaries and user dictionaries can be searched in registration order.

CONFIDENTIAL