OBST Dictionary & Translator is a Java-based desktop application that implements an Optimal Binary Search Tree (OBST) for efficient dictionary storage and word-by-word text translation. The project combines algorithmic optimization via dynamic programming with an interactive graphical user interface built using JavaFX.
The application allows users to translate text, configure performance and memory usage settings, and visually inspect the structure of the underlying binary search trees.
At its core, the system constructs an Optimal Binary Search Tree (OBST) from a dictionary consisting of words, their translations, and associated probabilities. Using dynamic programming, the OBST is built to minimize the expected search cost.
-
Single OBST
- One large tree containing all dictionary entries.
-
Letter-based OBST
- Separate trees generated for each starting letter (
a–z) to optimize loading time.
- Separate trees generated for each starting letter (
- Word-by-word text translation
- OBST construction using probability weights
- JavaFX-based tree visualization (JavaFXSmartGraph)
- Configurable memory usage profiles
- Persistent on-disk storage of trees and dictionaries
The project follows an MVC architecture.
src/
├── model/
├── translator/
├── ui/
└── ui/layout/
- Java SDK 11
- JavaFX
- JavaFXSmartGraph 0.9.2
<word> <translation> <probability>
Run the ui.Main class. On first launch, the OBST database is generated automatically if missing.
Settings are stored in src/settings/settings.txt.
Educational / Academic Use