# minhaskamal/bengalidictionary architecture

> Architecture diagram of the GitHub repository minhaskamal/bengalidictionary, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/minhaskamal/bengalidictionary
- Repository: https://github.com/minhaskamal/bengalidictionary

## Overview

1. **Repository type**
   - This is primarily a **data repository** for Bengali language resources, with two small Java utilities layered on top.
   - The architecture is centered on **static dictionary/word-list files** rather than a running service or application.

2. **Core data assets**
   - The root of the repo contains the main artifacts: multiple Bengali word lists, translation dictionaries, a character-combination list, and a phonetic word-frequency file.
   - These are the primary source of truth for all functionality in the repo.

3. **Dataset families**
   - **Word lists**: `BengaliWordList_40.txt`, `_48.txt`, `_112.txt`, `_439.txt`
   - **Translation dictionaries**: `BengaliDictionary_17.txt`, `_36.csv`, `_82.xml`, `_93.csv`, `_93..csv`, `BengaliDictionary.json`
   - **Supporting linguistic resources**: `BengaliCharacterCombinations.txt`, `BengaliPhoneticWordFrequency_164.txt`
   - The varied suffixes suggest different sizes, versions, or export formats of the same underlying lexical content.

4. **File-format boundary**
   - The repository intentionally exposes the same language data in multiple formats: **TXT, CSV, XML, and JSON**.
   - This creates a clear boundary between the **raw linguistic dataset** and any downstream consumer that wants a specific serialization format.

5. **Java utilities**
   - `src/Dictionary.java` is the Java implementation for an **English-to-Bengali dictionary lookup** use case.
   - `src/SpellChecker.java` is the Java implementation for **Bengali spell checking / correction**.
   - These are small consumers of the static resources, not a full application framework.

6. **Data flow into the Java code**
   - The expected flow is: **load local dictionary/word-list files → index or scan the words → perform lookup/spell-check operations**.
   - The Java code likely reads the dataset files directly from disk, making the repo fundamentally **file-driven** rather than network-driven.

7. **Primary functional split**
   - The repository has two main functional paths:
     - **Translation/lookup path**: dictionary data served through `Dictionary.java`
     - **Spell-check path**: word lists and character-combination data used by `SpellChecker.java`
   - The phonetic frequency file likely supports ranking or suggestion quality in spell correction or typing assistance.

8. **No service layer or persistence subsystem**
   - There is no database, API server, queue, or frontend in this repository.
   - Persistence is entirely via checked-in files, and “state” is represented by the dataset files themselves.

9. **External consumption model**
   - The README positions the repo as a reusable resource for **spell checking, spell correction, dictionary lookup, typing suggestion, and related NLP tasks**.
   - So the architectural boundary is: **this repo supplies lexical assets and simple reference implementations; downstream apps integrate it as a library/data source**.

10. **Operational/runtime view**
   - The only runtime technology explicitly implied is **Java** for the sample implementations.
   - Everything else is static content, so an architecture diagram should show a **local file corpus feeding Java utilities**, with no external dependencies beyond the consumer application.

Main entry points: [`src/SpellChecker.java`](https://github.com/minhaskamal/bengalidictionary/blob/master/src/SpellChecker.java) (SpellChecker), [`src/Dictionary.java`](https://github.com/minhaskamal/bengalidictionary/blob/master/src/Dictionary.java) (Dictionary), [`BengaliDictionary.json`](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary.json) (Dictionary JSON), [`BengaliCharacterCombinations.txt`](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliCharacterCombinations.txt) (Char combos)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data_assets["Static lexical data"]
  node_dictionary_family[("Dictionary set<br/>lexical dataset")]
  node_wordlist_family[("Word lists<br/>lexical dataset")]
  node_support_resources[("Linguistic aids<br/>support data")]
  node_dict_txt_17["Dict 17<br/>txt dictionary"]
  node_dict_csv_36["Dict 36<br/>csv dictionary"]
  node_dict_xml_82["Dict 82<br/>xml dictionary"]
  node_dict_csv_93["Dict 93<br/>csv dictionary"]
  node_dict_csv_93_alt["Dict 93 alt<br/>csv dictionary"]
  node_dict_json["Dictionary JSON<br/>json dictionary"]
  node_wordlist_40["Words 40<br/>txt word list"]
  node_wordlist_48["Words 48<br/>txt word list"]
  node_wordlist_112["Words 112<br/>txt word list"]
  node_wordlist_439["Words 439<br/>txt word list"]
  node_char_combos["Char combos<br/>txt support"]
  node_phonetic_freq["Phonetic freq<br/>txt support"]
end

subgraph group_java_utils["Java utilities"]
  node_dictionary_java["Dictionary<br/>java lookup<br/>[Dictionary.java]"]
  node_spellchecker_java["SpellChecker<br/>java spellcheck<br/>[SpellChecker.java]"]
end

node_dictionary_family -->|"serialized as"| node_dict_txt_17
node_dictionary_family -->|"serialized as"| node_dict_csv_36
node_dictionary_family -->|"serialized as"| node_dict_xml_82
node_dictionary_family -->|"serialized as"| node_dict_csv_93
node_dictionary_family -->|"serialized as"| node_dict_csv_93_alt
node_dictionary_family -->|"serialized as"| node_dict_json
node_wordlist_family -->|"includes"| node_wordlist_40
node_wordlist_family -->|"includes"| node_wordlist_48
node_wordlist_family -->|"includes"| node_wordlist_112
node_wordlist_family -->|"includes"| node_wordlist_439
node_support_resources -->|"includes"| node_char_combos
node_support_resources -->|"includes"| node_phonetic_freq
node_dictionary_java -->|"reads"| node_dictionary_family
node_dictionary_java -.->|"reads"| node_dict_json
node_spellchecker_java -->|"reads"| node_wordlist_family
node_spellchecker_java -->|"uses"| node_support_resources
node_spellchecker_java -.->|"ranks by"| node_phonetic_freq
node_spellchecker_java -.->|"validates with"| node_char_combos

click node_dict_txt_17 "https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary_17.txt"
click node_dict_csv_36 "https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary_36.csv"
click node_dict_xml_82 "https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary_82.xml"
click node_dict_csv_93 "https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary_93.csv"
click node_dict_csv_93_alt "https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary_93..csv"
click node_dict_json "https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary.json"
click node_wordlist_40 "https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliWordList_40.txt"
click node_wordlist_48 "https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliWordList_48.txt"
click node_wordlist_112 "https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliWordList_112.txt"
click node_wordlist_439 "https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliWordList_439.txt"
click node_char_combos "https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliCharacterCombinations.txt"
click node_phonetic_freq "https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliPhoneticWordFrequency_164.txt"
click node_dictionary_java "https://github.com/minhaskamal/bengalidictionary/blob/master/src/Dictionary.java"
click node_spellchecker_java "https://github.com/minhaskamal/bengalidictionary/blob/master/src/SpellChecker.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dictionary_family,node_wordlist_family,node_support_resources,node_dict_txt_17,node_dict_csv_36,node_dict_xml_82,node_dict_csv_93,node_dict_csv_93_alt,node_dict_json,node_wordlist_40,node_wordlist_48,node_wordlist_112,node_wordlist_439,node_char_combos,node_phonetic_freq toneBlue
class node_dictionary_java,node_spellchecker_java toneAmber
```

## Components

### Static lexical data

Checked-in Bengali language resources and format variants.

- **Dictionary set**: lexical dataset · Bengali translation/dictionary content published in several export formats and versions.
- **Word lists**: lexical dataset · Multiple Bengali word-list snapshots used as the main vocabulary source.
- **Linguistic aids**: support data · Character-combination and phonetic-frequency resources that support correction and suggestion logic.
- [Dict 17](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary_17.txt): txt dictionary · BengaliDictionary_17.txt · `BengaliDictionary_17.txt`
- [Dict 36](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary_36.csv): csv dictionary · BengaliDictionary_36.csv · `BengaliDictionary_36.csv`
- [Dict 82](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary_82.xml): xml dictionary · BengaliDictionary_82.xml · `BengaliDictionary_82.xml`
- [Dict 93](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary_93.csv): csv dictionary · BengaliDictionary_93.csv · `BengaliDictionary_93.csv`
- [Dict 93 alt](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary_93..csv): csv dictionary · BengaliDictionary_93..csv · `BengaliDictionary_93..csv`
- [Dictionary JSON](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliDictionary.json): json dictionary · BengaliDictionary.json · `BengaliDictionary.json`
- [Words 40](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliWordList_40.txt): txt word list · BengaliWordList_40.txt · `BengaliWordList_40.txt`
- [Words 48](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliWordList_48.txt): txt word list · BengaliWordList_48.txt · `BengaliWordList_48.txt`
- [Words 112](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliWordList_112.txt): txt word list · BengaliWordList_112.txt · `BengaliWordList_112.txt`
- [Words 439](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliWordList_439.txt): txt word list · BengaliWordList_439.txt · `BengaliWordList_439.txt`
- [Char combos](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliCharacterCombinations.txt): txt support · BengaliCharacterCombinations.txt · `BengaliCharacterCombinations.txt`
- [Phonetic freq](https://github.com/minhaskamal/bengalidictionary/blob/master/BengaliPhoneticWordFrequency_164.txt): txt support · BengaliPhoneticWordFrequency_164.txt · `BengaliPhoneticWordFrequency_164.txt`

### Java utilities

Small reference implementations that consume the local data files.

- [Dictionary](https://github.com/minhaskamal/bengalidictionary/blob/master/src/Dictionary.java): java lookup · English-to-Bengali dictionary lookup utility. · `src/Dictionary.java`
- [SpellChecker](https://github.com/minhaskamal/bengalidictionary/blob/master/src/SpellChecker.java): java spellcheck · Bengali spell checking and correction utility. · `src/SpellChecker.java`

## Connections

- Dictionary set → Dict 17: serialized as · Dictionary content appears in text export form.
- Dictionary set → Dict 36: serialized as · Dictionary content appears in CSV export form.
- Dictionary set → Dict 82: serialized as · Dictionary content appears in XML export form.
- Dictionary set → Dict 93: serialized as · Dictionary content appears in another CSV variant.
- Dictionary set → Dict 93 alt: serialized as · Alternative CSV variant of the dictionary data.
- Dictionary set → Dictionary JSON: serialized as · Dictionary content appears in JSON form.
- Word lists → Words 40: includes · One of several word-list snapshots.
- Word lists → Words 48: includes · One of several word-list snapshots.
- Word lists → Words 112: includes · One of several word-list snapshots.
- Word lists → Words 439: includes · Largest word-list snapshot in the repo.
- Linguistic aids → Char combos: includes · Character-combination constraints or patterns.
- Linguistic aids → Phonetic freq: includes · Phonetic ranking/frequency support data.
- Dictionary → Dictionary set: reads · Lookup utility consumes dictionary data files directly.
- Dictionary → Dictionary JSON: reads · Can consume the JSON dictionary representation.
- SpellChecker → Word lists: reads · Spell-check logic scans or indexes word lists.
- SpellChecker → Linguistic aids: uses · Correction logic relies on character and phonetic aids.
- SpellChecker → Phonetic freq: ranks by · Frequency data can improve suggestion ordering.
- SpellChecker → Char combos: validates with · Character-combination data can constrain candidate generation.
