sqlite_plus_arabic 0.1.7
sqlite_plus_arabic: ^0.1.7 copied to clipboard
Arabic light stemmer and text folding for sqlite_plus FTS5 tables.
Garden notes #
One in-memory FTS5 table. The mapping lives in lib/garden_notes.dart. It uses sqlite_plus_orm for the table and sqlite_plus_arabic for the stemmer. The engine underneath is sqlite_plus.
Note has a generated rowid and a body. The entity is DbModules.fts5 with ArabicTokenizers.arabic. Those two constants are the strings 'fts5' and 'arabic'.
runGardenNotes does five steps:
- The example writes
garden.dband reads that file back. SqlitePlusArabic.register(connection.database)installs the tokenizer on that connection.ensureCreatedwritestokenize = 'arabic'into the virtual table.- Two notes are saved:
في الحديقةandكتاب بعيد. search('الحديقة')reads one row.search('سيارة')reads none. A secondplan()is empty.
From a checkout, after dart pub get at the repository root:
dart run bin/main.dart
في الحديقة | missed true | stable true
في الحديقة is found, the body returned by search('الحديقة'). The article ال is removed and the suffix ة is removed, so the query and the stored sentence share the token حديق. missed true means search('سيارة') returned an empty list. كتاب بعيد stays in the table. It does not match سيارة. stable true means the migration plan after the save is empty, so the stored CREATE still matches the mapping.
The package README walks through the same stemmer with SQL, a generated class, and the words الله and كتابه.