cannalib man page

CannaLib intro — Kana-to-Kanji Conversion Library Intro


Canna provides the following three libraries:

Canna provides three header files and three libraries.  Their outlines are listed below:

Library link and header file include must be done as follows, depending on the function you use:

Conversion context

Canna enables you to perform two or more Kana-to-Kanji Conversion processes simultaneously.  Conversion contextsare used to control management of the respective Kana-to-Kanji Conversion processes.  The internal data needed for Kana-to-Kanji Conversion is secured in each context.

The application identifies each conversion context by the context number.  It is an integer equal to or larger than 0, and used as the first parameter of any Kana-to-Kanji Conversion function.

Immediately after dictionary access library RkInitialize(3) initializes Kana-to-Kanji Conversion, there is only the standard context, which has the context number 0.  It can be used by any application that uses only one context.

Outline of Successive Segment Conversion

Successive Segment Conversion analyzes the specified Hiragana string, and splits it into a few elements called sentence segments, or Bunsetsu.  An example of analysis is shown below:

  KANAWO        KANAWO(1)     KANAWO(2)

Each function provided by the dictionary access library's Successive Segment Conversion may either modify the result of this analysis or obtain the analysis information.  It assumes a two-dimensional candidate address.

Segment numbers 0, 1, ..., N-1 are assigned leftward to the N segments that have been analyzed.  The currently marked candidate is called the current candidate.

For example, “KANAWO” may be specified as a candidate having Segment Number 0 and Candidate Number 0.  The library instead assumes current segment and candidate in the context to simplify the parameters.

See Also

uilib(3) - User Interface Library

diclib(3) - Dictionary Access Library