Dictionary access library introduction
The dictionary access library provides basic functions for kana-kanji conversion. The following files are prerequisite to using the dictionary access library:
canna/RK.h
An include file that contains data and function declarations for use by the kana-kanji conversion library. Include this file at compile time.
libcanna.a, libcanna.so
Kana-kanji conversion libraries. Specify "-lcanna" at link time.
The dictionary access library provides three major categories of functions:
Code conversion functions
Convert character string codes between double-width and single-width characters and between hiragana and katakana. External data and initialization procedures are not required.
Romaji-kana conversion functions
Convert Romaji to kana by using a Romaji-kana conversion table that defines the correspondence between Romaji and kana. The rules of Romaji-kana conversion can be altered by making modifications to this table.
Kana-kanji conversion functions
Convert kana to kanji through continuous clause conversion by using a kana-kanji conversion dictionary that defines the correspondence between readings and words. Kana-kanji conversion can be performed to meet specific applications by making modifications to this dictionary.
Among all the functions of Japanese input processing, this library performs only data conversion. To be able to enter Japanese text from a keyboard, therefore, it is necessary for users to write a keyboard handling routine within the application program.
Code conversion functions
Convert ASCII characters and single-width katakana to double-width characters.
Convert double-width symbols, alphanumeric characters, hiragana, and katakana to single-width characters.
Convert double-width hiragana to double-width katakana.
Convert double-width katakana to double-width hiragana.
Convert shift JIS code to EUC code.
Romaji-kana conversion functions
Open the dictionary to use for Romaji-kana conversion.
Close the dictionary used for Romaji-kana conversion.
Perform Romaji-kana conversion by using a specified Romaji-kana conversion dictionary.
Convert an entire character string from Romaji to kana by iteratively using RkMapRoma.
Kana-kanji conversion functions
Initialize the kana-kanji conversion functions.
Terminate the kana-kanji conversion functions.
Create a new conversion context.
Create a context having the same conversion environment as a specified context.
Close a specified conversion context.
Get the names of dictionaries that can be added to the dictionary list.
Mount a dictionary in the dictionary list.
Get the names of the currently mounted dictionaries. (or characters for RkwResize)
Unmount a specified dictionary from the dictionary list.
Alter the priority order of a dictionary already in the dictionary list.
Convert the reading of a specified length to kanji.
Terminate kana-kanji conversion.
Set the clause with a specified clause number as the current clause.
Move the current clause to the clause to its left.
Move the current clause to its right.
Set the candidate with a specified candidate number as the current candidate.
Set the next candidate as the current candidate.
Set the previous candidate as the current candidate.
Set a reading itself as the current candidate.
Change the reading length of the current clause to len bytes.
Enlarge the reading of the current clause.
Shorten the reading of the current clause.
Change the reading of the current clause to a specified reading, reconverting the subsequent clauses.
Get the reading of the current clause.
Get the current candidate for the current clause.
Get all kanji candidates for the current clause.
Get analysis information about the current candidate.
Get morphemic information on each word that makes up the current candidate.
Define a specified candidate in a dictionary.
Delete a specified candidate from a dictionary.