Skip to main content

Module language_dictionary

Module language_dictionary 

Source
Expand description

The read-only dictionaries of the Cantonese, Zhuyin and Stroke schemes (msime-cantonese.db, msime-zhuyin.db, msime-stroke.db). They ship beside the resource set rather than inside it, so the engine opens one only when its scheme is activated and treats a missing or unknown file as the scheme being unavailable.

dict-builder writes every file with SCHEMA and the metadata below; this module is the one definition of that contract.

Structs§

LanguageDictionary
An open language dictionary whose format version has been checked.
LanguageEntry
One row of entries.

Constants§

FORMAT_VERSION
The schema version the engine reads. A file with any other format_version is refused.
METADATA_FORMAT_VERSION
metadata row holding FORMAT_VERSION as decimal text.
METADATA_LICENSE
metadata row holding the SPDX identifier of the source data’s licence.
METADATA_SOURCE_COMMIT
metadata row holding the commit of the source data the file was built from.
SCHEMA
The whole schema. entries.key is the syllables of an entry joined by a single space; in msime-stroke.db it is the character’s stroke code (hspnz letters, no spaces).

Functions§

open_read_only
Opens path read-only and checks its format version (LANGUAGE_DICTIONARY_UNAVAILABLE, LANGUAGE_DICTIONARY_VERSION_UNSUPPORTED); never creates the file.