A Qt6 GUI application for managing the dictionary of the fcitx5-lekhika Devanagari input method engine. This tool allows you to train the dictionary from text files, manually edit words, and test transliteration settings.
-
Learn from Files: Import large text files to populate the dictionary. The tool efficiently processes files in chunks using multiple threads.
-
Full Dictionary Management: View, add, edit, and delete words in your personal dictionary. It supports multi-selection, searching, and sorting.
-
Download & Replace Database: Easily reset your dictionary to a clean state or download a pre-trained database to get started quickly. Note: Downloading will replace your existing custom dictionary.
-
Live Testing: A dedicated tab to test the
liblekhikacore settings in real-time without affecting your system-wide fcitx5 configuration. -
Informative UI: A detailed status bar shows the current database path, word count, and library versions.
-
Robust and Safe: Operations are logged, and critical actions like database resets require user confirmation.
To build lekhika-trainer, you will need the following dependencies:
-
Build Tools:
cmake,git,build-essential(or equivalent C++ compiler toolchain),extra-cmake-modules -
Libraries:
-
liblekhika (the core transliteration library)
-
Qt6(qt6-base-dev) -
libsqlite3-dev -
libicu-dev
-
-
Utilities(optional):
gettext,appstream
Follow these steps to build and install lekhika-trainer and its core dependency, liblekhika.
sudo apt-get update
sudo apt-get install -y \
git \
cmake \
build-essential \
extra-cmake-modules \
qt6-base-dev \
libsqlite3-dev \
libicu-dev
lekhika-trainer depends on liblekhika, so it must be installed first.
# Clone the repository
git clone [https://github.com/khumnath/liblekhika.git](https://github.com/khumnath/liblekhika.git)
cd liblekhika
# Configure the build
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
# Build and install
cmake --build build
sudo cmake --install build
# Update the shared library cache
sudo ldconfig
Now you can build the trainer application itself.
# Clone this repository
git clone [https://github.com/khumnath/lekhika-trainer.git](https://github.com/khumnath/lekhika-trainer.git)
cd lekhika-trainer
# Configure the build
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
# Build and install
cmake --build build
sudo cmake --install build
After installation, you can run the application from your terminal with lekhika-trainer or find it in your desktop environment's application menu.
The application is organized into four main tabs:
-
Learn Words: Click "Open text file..." to select a file containing Devanagari text. Then, click "Learn words" to start the import process. The log will show the progress.
-
Edit Dictionary: View all the words in your database. You can add new words, delete selected words, edit an existing word, or reset the entire database.
-
Test: Experiment with the transliteration engine's settings. Changes made here only apply within this tab and are useful for testing the input method's behavior.
-
Help: Provides a quick guide on setting up the fcitx5 plugin. It also allows you to download a pre-trained dictionary, which will replace your existing database. This is a great way to get started, but be aware that it will overwrite any custom words you have added.
Contributions are welcome! If you have a suggestion or find a bug, please feel free to open an issue. If you'd like to contribute code, please fork the repository and submit a pull request.
-
Fork the Project
-
Create your Feature Branch (
git checkout -b feature/AmazingFeature) -
Commit your Changes (
git commit -m 'Add some AmazingFeature') -
Push to the Branch (
git push origin feature/AmazingFeature) -
Open a Pull Request
This program is free software, distributed under the terms of the GNU General Public License v3.0.
For more details, see the LICENSE.md file.