# sagorbrur/bangla-bert architecture

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

- Interactive diagram: https://gitdiagram.com/sagorbrur/bangla-bert
- Repository: https://github.com/sagorbrur/bangla-bert

## Overview

This repository distributes Bangla BERT Base, a pretrained Bengali masked-language model and vocabulary, with documented tokenizer and fill-mask usage plus downstream evaluation results and visualization notebooks. The principal user workflow is to load the model and tokenizer, provide Bengali text with a mask, and receive candidate replacements. The tree exposes no implementation excerpts, so relationships below rely on README statements; the `bert` entry is represented only at its listed path.

Main entry points: [`bert`](https://github.com/sagorbrur/bangla-bert/tree/master/bert) (Bangla BERT), [`README.md`](https://github.com/sagorbrur/bangla-bert/blob/master/README.md) (Fill-mask inference), [`notebook/bangla-bert-evaluation-classification-task.ipynb`](https://github.com/sagorbrur/bangla-bert/blob/master/notebook/bangla-bert-evaluation-classification-task.ipynb) (Classification evaluation), [`evaluations/wikiann`](https://github.com/sagorbrur/bangla-bert/tree/master/evaluations/wikiann) (WikiANN evaluation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_assets["Model assets"]
  node_model["Bangla BERT"]
  node_vocab["BERT vocabulary<br/>[vocab.txt]"]
end

subgraph group_inference["Model usage"]
  node_tokenizer["BERT tokenizer<br/>[README.md]"]
  node_fillmask["Fill-mask inference<br/>[README.md]"]
end

subgraph group_evaluation["Evaluations"]
  node_classification["Classification evaluation"]
  node_wikiann["WikiANN evaluation"]
  node_visualization["Attention visualization"]
end

node_user(("NLP user"))
node_hub["Hugging Face Hub"]

node_user -->|"tokenizes text"| node_tokenizer
node_user -->|"submits masked text"| node_fillmask
node_fillmask -->|"predicts masks"| node_model
node_fillmask -->|"loads pretrained model"| node_hub
node_tokenizer -->|"loads tokenizer"| node_hub
node_classification -->|"evaluates"| node_model
node_wikiann -->|"evaluates"| node_model
node_visualization -->|"visualizes attention"| node_model

click node_model "https://github.com/sagorbrur/bangla-bert/tree/master/bert"
click node_vocab "https://github.com/sagorbrur/bangla-bert/blob/master/vocab.txt"
click node_tokenizer "https://github.com/sagorbrur/bangla-bert/blob/master/README.md"
click node_fillmask "https://github.com/sagorbrur/bangla-bert/blob/master/README.md"
click node_classification "https://github.com/sagorbrur/bangla-bert/blob/master/notebook/bangla-bert-evaluation-classification-task.ipynb"
click node_wikiann "https://github.com/sagorbrur/bangla-bert/tree/master/evaluations/wikiann"
click node_visualization "https://github.com/sagorbrur/bangla-bert/tree/master/notebook"

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_model,node_vocab,node_user toneBlue
class node_tokenizer,node_fillmask toneAmber
class node_classification,node_wikiann,node_visualization toneMint
class node_hub toneIndigo
```

## Components

### Model assets

- [Bangla BERT](https://github.com/sagorbrur/bangla-bert/tree/master/bert): `bert`
- [BERT vocabulary](https://github.com/sagorbrur/bangla-bert/blob/master/vocab.txt): `vocab.txt`

### Model usage

- [BERT tokenizer](https://github.com/sagorbrur/bangla-bert/blob/master/README.md): `README.md`
- [Fill-mask inference](https://github.com/sagorbrur/bangla-bert/blob/master/README.md): `README.md`

### Evaluations

- [Classification evaluation](https://github.com/sagorbrur/bangla-bert/blob/master/notebook/bangla-bert-evaluation-classification-task.ipynb): `notebook/bangla-bert-evaluation-classification-task.ipynb`
- [WikiANN evaluation](https://github.com/sagorbrur/bangla-bert/tree/master/evaluations/wikiann): `evaluations/wikiann`
- [Attention visualization](https://github.com/sagorbrur/bangla-bert/tree/master/notebook): `notebook`

### Other components

- **NLP user**
- **Hugging Face Hub**

## Connections

- NLP user → BERT tokenizer: tokenizes text (evidence: `README.md`)
- NLP user → Fill-mask inference: submits masked text (evidence: `README.md`)
- Fill-mask inference → Bangla BERT: predicts masks (evidence: `README.md`)
- Fill-mask inference → Hugging Face Hub: loads pretrained model (evidence: `README.md`)
- BERT tokenizer → Hugging Face Hub: loads tokenizer (evidence: `README.md`)
- Classification evaluation → Bangla BERT: evaluates (evidence: `README.md`)
- WikiANN evaluation → Bangla BERT: evaluates (evidence: `README.md`)
- Attention visualization → Bangla BERT: visualizes attention (evidence: `README.md`)
