Skip to content

amirkazemzade/Algorithm_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OBST Dictionary & Translator

Overview

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.


Core Concept

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.


Database Structure Modes

  1. Single OBST

    • One large tree containing all dictionary entries.
  2. Letter-based OBST

    • Separate trees generated for each starting letter (az) to optimize loading time.

Key Features

  • 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

Project Architecture

The project follows an MVC architecture.

src/
├── model/
├── translator/
├── ui/
└── ui/layout/

Prerequisites

  • Java SDK 11
  • JavaFX
  • JavaFXSmartGraph 0.9.2

Input Data Format

<word> <translation> <probability>

Usage

Run the ui.Main class. On first launch, the OBST database is generated automatically if missing.


Configuration

Settings are stored in src/settings/settings.txt.


License

Educational / Academic Use

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors