Skip to main content
The dictionary database is a single SQLite file containing tables for syllables, words, N-gram probabilities, POS statistics, and file-tracking metadata. This page documents every table, column, index, and common query pattern.

Overview

The dictionary database contains tables for syllables, words, N-grams, and metadata.

Core Tables

syllables

Stores valid Myanmar syllables:

words

Stores dictionary words:
Curated Words: Words from --curated-input are inserted directly with is_curated=1 before corpus processing. When corpus words are loaded:

bigrams

Stores word bigram frequencies (using word IDs for efficiency):

trigrams

Stores word trigram frequencies:

Higher-Order N-gram Tables

fourgrams

Stores 4-gram conditional probabilities for deeper context analysis:

fivegrams

Stores 5-gram conditional probabilities:

POS Probability Tables

pos_unigrams

Stores POS unigram probabilities:

pos_bigrams

Stores POS bigram probabilities:

pos_trigrams

Stores POS trigram probabilities:

File Tracking Table

processed_files

Tracks processed files for incremental builds:

Metadata Table

metadata

Stores key-value metadata about the database build:

Enrichment Tables

These tables are populated during the enrichment step (--no-enrich to skip).

confusable_pairs

Stores phonetically or orthographically similar word pairs mined from the corpus:

compound_confusions

Stores compound words that may be incorrectly split during segmentation:

collocations

Stores word collocations with PMI (Pointwise Mutual Information) scores:

register_tags

Stores formal/informal register classification for words:

Query Examples

Lookup Syllable

Get Word with POS

Get Bigram Probability

Get Top Continuations

Get POS Transition Probability

Database Optimization

Indexes

Critical indexes for performance:

VACUUM

Compact database after building:

Page Size

Optimize for read performance:

Schema Migration

Version Tracking

Migration Example

See Also