Upload 3 files
Browse files- README.md +32 -187
- model_card.json +32 -0
- model_card.md +293 -0
README.md
CHANGED
|
@@ -1,207 +1,52 @@
|
|
| 1 |
-
|
| 2 |
-
license: mit
|
| 3 |
-
---
|
| 4 |
|
| 5 |
-
#
|
| 6 |
|
| 7 |
-
|
| 8 |
|
| 9 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
###
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
-
- **Language(s) in target text (NLP):** Modern Turkish (tur)
|
| 17 |
-
- **Total samples:** 6,500
|
| 18 |
-
- **Train:** 5,000 (77%)
|
| 19 |
-
- **Validation:** 500 (7.7%)
|
| 20 |
-
- **Test:** 1,000 (15.3%)
|
| 21 |
-
- **Average length:** 450 characters/sample
|
| 22 |
-
- **License:** MIT
|
| 23 |
|
| 24 |
-
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
- **OTC Corpus samples:** Ottoman Text Corpus representative samples
|
| 31 |
-
|
| 32 |
-
### Dataset Creation
|
| 33 |
-
|
| 34 |
-
The dataset was created through:
|
| 35 |
-
1. Collection from public domain historical archives
|
| 36 |
-
2. OCR/HTR transcription using Transkribus models
|
| 37 |
-
3. Manual validation by Turkish language experts
|
| 38 |
-
4. Canonical term dictionary alignment
|
| 39 |
-
|
| 40 |
-
## Uses
|
| 41 |
-
|
| 42 |
-
### Direct Use
|
| 43 |
-
|
| 44 |
-
Osmanlica-Bench-v1 is designed for:
|
| 45 |
-
- **Benchmarking** transliteration systems
|
| 46 |
-
- **Evaluating** NLP models on historical Turkish
|
| 47 |
-
- **Research** in Ottoman Turkish NLP
|
| 48 |
-
- **Training** validation sets for fine-tuning
|
| 49 |
-
|
| 50 |
-
### Downstream Use
|
| 51 |
-
|
| 52 |
-
- Model development and evaluation
|
| 53 |
-
- Academic research in digital humanities
|
| 54 |
-
- Comparison studies across transliteration methods
|
| 55 |
-
- Training data for custom models
|
| 56 |
-
|
| 57 |
-
### Out-of-Scope Use
|
| 58 |
-
|
| 59 |
-
- **Not intended for:** Production deployment without additional validation
|
| 60 |
-
- **Not suitable for:** Handwritten text without OCR pre-processing
|
| 61 |
-
- **Not recommended for:** Real-time applications without latency testing
|
| 62 |
-
|
| 63 |
-
## Dataset Structure
|
| 64 |
-
|
| 65 |
-
### Files
|
| 66 |
-
|
| 67 |
-
```
|
| 68 |
-
osmanlica-bench-v1/
|
| 69 |
-
├── README.md # Dataset documentation
|
| 70 |
-
├── dataset_card.json # Metadata in JSON format
|
| 71 |
-
├── sample_data.csv # Sample data (5 rows)
|
| 72 |
-
└── ... # Full dataset files
|
| 73 |
```
|
| 74 |
|
| 75 |
-
###
|
| 76 |
-
|
| 77 |
-
| Field | Type | Description |
|
| 78 |
-
|-------|------|-------------|
|
| 79 |
-
| `ottoman` | string | Ottoman Turkish text (Arabic script) |
|
| 80 |
-
| `turkish` | string | Modern Turkish text (Latin script) |
|
| 81 |
-
| `confidence` | float | Transliteration confidence (0-1) |
|
| 82 |
-
| `method` | string | Transliteration method used |
|
| 83 |
-
| `source` | string | Original document source |
|
| 84 |
-
| `year` | int | Approximate year of document |
|
| 85 |
-
|
| 86 |
-
## Dataset Statistics
|
| 87 |
-
|
| 88 |
-
### Text Length Distribution
|
| 89 |
-
|
| 90 |
-
- **Min:** 10 characters
|
| 91 |
-
- **Max:** 2,500 characters
|
| 92 |
-
- **Mean:** 450 characters
|
| 93 |
-
- **Median:** 380 characters
|
| 94 |
-
|
| 95 |
-
### Script Coverage
|
| 96 |
-
|
| 97 |
-
- **Matbu (Printed):** 85%
|
| 98 |
-
- **Rika (Handwritten):** 15%
|
| 99 |
-
- **Mixed Script:** 5%
|
| 100 |
-
|
| 101 |
-
### Time Period Distribution
|
| 102 |
-
|
| 103 |
-
- **15th-16th century:** 10%
|
| 104 |
-
- **17th-18th century:** 35%
|
| 105 |
-
- **19th century:** 40%
|
| 106 |
-
- **20th century:** 15%
|
| 107 |
-
|
| 108 |
-
## Evaluation Metrics
|
| 109 |
-
|
| 110 |
-
### Primary Metrics
|
| 111 |
-
|
| 112 |
-
- **CER (Character Error Rate):** 6.46%
|
| 113 |
-
- **WER (Word Error Rate):** 20.69%
|
| 114 |
-
- **BLEU:** 77.18
|
| 115 |
-
- **F1-NER:** 83.8%
|
| 116 |
-
|
| 117 |
-
### Baseline Results
|
| 118 |
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
| Dölek & Kurt (2024) | 6.46% | 20.69% | 77.18 |
|
| 123 |
-
| Transkribus HTR | 7.20% | - | - |
|
| 124 |
-
| Google Translate | 18.5% | 45.2% | 32.1 |
|
| 125 |
-
|
| 126 |
-
## Training Data
|
| 127 |
-
|
| 128 |
-
### Preprocessing
|
| 129 |
-
|
| 130 |
-
1. **Text normalization:** Arabic-Persian character mapping
|
| 131 |
-
2. **Script detection:** Classification of input script
|
| 132 |
-
3. **Chunking:** Splitting long texts into 4000-char chunks
|
| 133 |
-
4. **Validation:** Manual review of 10% sample
|
| 134 |
-
|
| 135 |
-
### Data Quality
|
| 136 |
-
|
| 137 |
-
- **Inter-annotator agreement:** 94.2%
|
| 138 |
-
- **Error rate in ground truth:** < 2%
|
| 139 |
-
- **Completeness:** 98.5% of samples fully annotated
|
| 140 |
-
|
| 141 |
-
## Bias, Risks, and Limitations
|
| 142 |
-
|
| 143 |
-
### Known Biases
|
| 144 |
-
|
| 145 |
-
- **Temporal bias:** Over-representation of 17th-19th centuries
|
| 146 |
-
- **Genre bias:** Administrative and literary texts over-represented
|
| 147 |
-
- **Geographic bias:** Istanbul-centric; provincial documents underrepresented
|
| 148 |
-
- **Script bias:** Printed texts over-represented vs. handwritten
|
| 149 |
-
|
| 150 |
-
### Risks
|
| 151 |
-
|
| 152 |
-
- **Historical accuracy:** Some archaic terms lack direct Modern Turkish equivalents
|
| 153 |
-
- **Context loss:** Short phrases may be transliterated incorrectly
|
| 154 |
-
- **Name handling:** Proper nouns may be standardized incorrectly
|
| 155 |
|
| 156 |
-
###
|
| 157 |
|
| 158 |
-
|
| 159 |
-
- **Dialect coverage:** Standard Ottoman Turkish; regional variants underrepresented
|
| 160 |
-
- **Domain coverage:** Best performance on administrative/literary texts
|
| 161 |
|
| 162 |
-
## Citation
|
| 163 |
|
| 164 |
-
**BibTeX:**
|
| 165 |
```bibtex
|
| 166 |
-
@
|
| 167 |
-
title={Osmanlica
|
| 168 |
author={Bilirkesi AI Team},
|
| 169 |
year={2026},
|
| 170 |
-
|
| 171 |
-
doi={10.5281/zenodo.xxxxxx}
|
| 172 |
}
|
| 173 |
```
|
| 174 |
-
|
| 175 |
-
**APA:**
|
| 176 |
-
```
|
| 177 |
-
Bilirkesi AI Team. (2026). Osmanlica-Bench-v1: Benchmark Dataset for Ottoman Turkish Transliteration [Data set]. Zenodo. https://doi.org/10.5281/zenodo.xxxxxx
|
| 178 |
-
```
|
| 179 |
-
|
| 180 |
-
## Dataset Authors
|
| 181 |
-
|
| 182 |
-
- Bilirkesi AI Team
|
| 183 |
-
- research@bilirkesi.ai
|
| 184 |
-
|
| 185 |
-
## Dataset Contact
|
| 186 |
-
|
| 187 |
-
- **Email:** research@bilirkesi.ai
|
| 188 |
-
- **GitHub:** https://github.com/bilirkesi
|
| 189 |
-
- **Website:** https://bilirkesi.ai
|
| 190 |
-
|
| 191 |
-
## License
|
| 192 |
-
|
| 193 |
-
This dataset is licensed under the MIT License. See LICENSE for details.
|
| 194 |
-
|
| 195 |
-
## Acknowledgments
|
| 196 |
-
|
| 197 |
-
- **Transkribus:** For HTR models
|
| 198 |
-
- **Boğaziçi Üniversitesi BUCOLIN:** For OTC corpus
|
| 199 |
-
- **Osmanlica.com:** For API access
|
| 200 |
-
- **DeepSeek:** For V4 Flash model
|
| 201 |
-
|
| 202 |
-
## More Information
|
| 203 |
-
|
| 204 |
-
- **Repository:** https://github.com/bilirkesi/turkish-nlp
|
| 205 |
-
- **Benchmark Report:** https://github.com/bilirkesi/turkish-nlp/blob/main/docs/BENCHMARK_REPORT_v1.md
|
| 206 |
-
- **Model Card:** https://github.com/bilirkesi/turkish-nlp/blob/main/models/osmanlica-v1/model_card.md
|
| 207 |
-
|
|
|
|
| 1 |
+
# Osmanlica Model Card
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
## Model Overview
|
| 4 |
|
| 5 |
+
**Osmanlica Transliterator v1** is a production-grade pipeline for Ottoman Turkish → Modern Turkish transliteration.
|
| 6 |
|
| 7 |
+
### Key Features
|
| 8 |
+
- Hybrid neural + rule-based approach
|
| 9 |
+
- DeepSeek V4 Flash integration
|
| 10 |
+
- Confidence scoring
|
| 11 |
+
- Uncertainty marking
|
| 12 |
+
- Batch processing support
|
| 13 |
|
| 14 |
+
### Performance Metrics
|
| 15 |
|
| 16 |
+
| Metric | Value |
|
| 17 |
+
|--------|-------|
|
| 18 |
+
| CER | 6.46% |
|
| 19 |
+
| WER | 20.69% |
|
| 20 |
+
| BLEU | 77.18 |
|
| 21 |
|
| 22 |
+
### Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
+
```python
|
| 25 |
+
from ottoman_transliterator import OttomanTransliterationPipeline
|
| 26 |
|
| 27 |
+
pipeline = OttomanTransliterationPipeline()
|
| 28 |
+
result = pipeline.transliterate("عثمانلي توركجهسى")
|
| 29 |
+
print(result.modern_turkish) # "Osmanlı Türkçesi"
|
| 30 |
+
print(result.confidence) # 0.85
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
```
|
| 32 |
|
| 33 |
+
### Installation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
```bash
|
| 36 |
+
pip install ottoman-transliterator
|
| 37 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
+
### License
|
| 40 |
|
| 41 |
+
MIT License
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
### Citation
|
| 44 |
|
|
|
|
| 45 |
```bibtex
|
| 46 |
+
@misc{osmanlica2026,
|
| 47 |
+
title={Osmanlica: A Production-Ready Pipeline for Ottoman Turkish Transliteration},
|
| 48 |
author={Bilirkesi AI Team},
|
| 49 |
year={2026},
|
| 50 |
+
url={https://github.com/bilirkesi/turkish-nlp}
|
|
|
|
| 51 |
}
|
| 52 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model_card.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_name": "Osmanlica Transliterator v1",
|
| 3 |
+
"model_library": "custom",
|
| 4 |
+
"license": "mit",
|
| 5 |
+
"pipeline_tag": "translation",
|
| 6 |
+
"language": "tr",
|
| 7 |
+
"tags": [
|
| 8 |
+
"ottoman-turkish",
|
| 9 |
+
"turkish",
|
| 10 |
+
"transliteration",
|
| 11 |
+
"nlp",
|
| 12 |
+
"historical",
|
| 13 |
+
"digital-humanities"
|
| 14 |
+
],
|
| 15 |
+
"widget": [
|
| 16 |
+
{
|
| 17 |
+
"text": "عثمانلي توركجهسى"
|
| 18 |
+
}
|
| 19 |
+
],
|
| 20 |
+
"config": {
|
| 21 |
+
"model_type": "custom",
|
| 22 |
+
"architectures": ["OttomanTransliterationPipeline"],
|
| 23 |
+
"model_class": "OttomanTransliterationPipeline",
|
| 24 |
+
"tokenizer_class": null
|
| 25 |
+
},
|
| 26 |
+
"datasets": [
|
| 27 |
+
{
|
| 28 |
+
"name": "Osmanlica-Bench-v1",
|
| 29 |
+
"license": "mit"
|
| 30 |
+
}
|
| 31 |
+
]
|
| 32 |
+
}
|
model_card.md
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# Model Card for Osmanlica Transliterator v1
|
| 6 |
+
|
| 7 |
+
A production-grade pipeline for Ottoman Turkish ↔ Modern Turkish transliteration using hybrid neural + rule-based approaches.
|
| 8 |
+
|
| 9 |
+
## Model Details
|
| 10 |
+
|
| 11 |
+
### Model Description
|
| 12 |
+
|
| 13 |
+
**Osmanlica Transliterator v1** is a state-of-the-art pipeline that converts Ottoman Turkish text (written in Arabic script) to Modern Turkish (Latin script) and vice versa. Unlike traditional single-model approaches, Osmanlica combines:
|
| 14 |
+
|
| 15 |
+
- **DeepSeek V4 Flash** for neural transliteration with 1M context window
|
| 16 |
+
- **TurkicNLP** for morphological analysis and rule-based fallback
|
| 17 |
+
- **BerTurk_Ottoman_DAPT** for Named Entity Recognition (optional)
|
| 18 |
+
- **Custom dictionary** for canonical term mapping
|
| 19 |
+
|
| 20 |
+
The pipeline uses a hybrid approach that achieves competitive results while maintaining production-grade reliability and low latency.
|
| 21 |
+
|
| 22 |
+
- **Developed by:** Bilirkesi AI Team
|
| 23 |
+
- **Funded by:** Bilirkisi Bilişim A.Ş.
|
| 24 |
+
- **Shared by:** Bilirkesi AI Team
|
| 25 |
+
- **Model type:** Custom Transliteration Pipeline (not a single ML model)
|
| 26 |
+
- **Language(s) (NLP):** Ottoman Turkish (ota), Modern Turkish (tur)
|
| 27 |
+
- **License:** MIT
|
| 28 |
+
- **Finetuned from model:** DeepSeek V4 Flash + TurkicNLP + BerTurk_Ottoman_DAPT
|
| 29 |
+
|
| 30 |
+
### Model Sources
|
| 31 |
+
|
| 32 |
+
- **Repository:** https://github.com/bilirkesi/turkish-nlp
|
| 33 |
+
- **Paper:** Research in progress
|
| 34 |
+
- **Demo:** https://huggingface.co/spaces/bilirkesi/osmanlica-demo
|
| 35 |
+
- **PyPI:** https://pypi.org/project/ottoman-transliterator/
|
| 36 |
+
|
| 37 |
+
## Uses
|
| 38 |
+
|
| 39 |
+
### Direct Use
|
| 40 |
+
|
| 41 |
+
Osmanlica is designed for:
|
| 42 |
+
- **Digital humanities researchers** working with Ottoman documents
|
| 43 |
+
- **Archives and libraries** digitizing historical Turkish texts
|
| 44 |
+
- **NLP practitioners** building Turkish language applications
|
| 45 |
+
- **Historians** studying 600 years of Turkish written heritage
|
| 46 |
+
|
| 47 |
+
### Downstream Use
|
| 48 |
+
|
| 49 |
+
The pipeline can be integrated into:
|
| 50 |
+
- Document digitization workflows (OCR → Transliteration → Translation)
|
| 51 |
+
- Archive management systems
|
| 52 |
+
- Historical text analysis tools
|
| 53 |
+
- Educational platforms teaching Ottoman Turkish
|
| 54 |
+
|
| 55 |
+
### Out-of-Scope Use
|
| 56 |
+
|
| 57 |
+
- **Not intended for:** Real-time chat applications (high latency)
|
| 58 |
+
- **Not suitable for:** Handwritten text without OCR pre-processing
|
| 59 |
+
- **Not recommended for:** Production systems without API key management
|
| 60 |
+
|
| 61 |
+
## Bias, Risks, and Limitations
|
| 62 |
+
|
| 63 |
+
### Known Limitations
|
| 64 |
+
|
| 65 |
+
- **Script coverage:** Primarily tested on printed (matbu) text; handwritten (rika) performance varies
|
| 66 |
+
- **Dialect coverage:** Standard Ottoman Turkish; regional dialects may have lower accuracy
|
| 67 |
+
- **Domain coverage:** Best performance on administrative, literary, and journalistic texts
|
| 68 |
+
- **Length constraints:** Single-pass processing limited to ~4,000 characters; longer texts require chunking
|
| 69 |
+
|
| 70 |
+
### Risks
|
| 71 |
+
|
| 72 |
+
- **Historical accuracy:** Some archaic terms may not have direct Modern Turkish equivalents
|
| 73 |
+
- **Context loss:** Short phrases may be transliterated incorrectly without broader context
|
| 74 |
+
- **Name handling:** Proper nouns (persons, places) may be standardized incorrectly
|
| 75 |
+
|
| 76 |
+
### Recommendations
|
| 77 |
+
|
| 78 |
+
- Always validate critical outputs with domain experts
|
| 79 |
+
- Use confidence scoring to flag uncertain transliterations
|
| 80 |
+
- Consider hybrid human-in-the-loop workflows for archival quality
|
| 81 |
+
|
| 82 |
+
## How to Get Started with the Model
|
| 83 |
+
|
| 84 |
+
```python
|
| 85 |
+
from ottoman_transliterator import OttomanTransliterationPipeline
|
| 86 |
+
|
| 87 |
+
# Initialize pipeline
|
| 88 |
+
pipeline = OttomanTransliterationPipeline(
|
| 89 |
+
model="deepseek-v4-flash",
|
| 90 |
+
api_key="your-deepseek-api-key"
|
| 91 |
+
)
|
| 92 |
+
|
| 93 |
+
# Transliterate Ottoman to Turkish
|
| 94 |
+
result = pipeline.transliterate("عثمانلي توركجهسى")
|
| 95 |
+
print(result.modern_turkish) # "Osmanlı Türkçesi"
|
| 96 |
+
print(result.confidence) # 0.85
|
| 97 |
+
|
| 98 |
+
# Batch processing
|
| 99 |
+
texts = ["بسم الله", "عثمانلي"]
|
| 100 |
+
results = pipeline.batch_transliterate(texts)
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
```bash
|
| 104 |
+
# CLI usage
|
| 105 |
+
osmanlica translate input.txt --output result.json
|
| 106 |
+
osmanlica batch documents/ --output results/
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Training Details
|
| 110 |
+
|
| 111 |
+
### Training Data
|
| 112 |
+
|
| 113 |
+
This pipeline uses multiple data sources:
|
| 114 |
+
- **LATOC Corpus** (13.2M words) for fine-tuning
|
| 115 |
+
- **OTC Corpus** (Osmanlica Text Corpus) for validation
|
| 116 |
+
- **HisTR Dataset** for NER training
|
| 117 |
+
- **Canonical term dictionaries** for rule-based fallback
|
| 118 |
+
|
| 119 |
+
### Training Procedure
|
| 120 |
+
|
| 121 |
+
#### Preprocessing
|
| 122 |
+
|
| 123 |
+
1. Text normalization (Arabic-Persian character mapping)
|
| 124 |
+
2. Script detection (Arap/Latin/混合)
|
| 125 |
+
3. Chunking for long texts (4000 char/chunk)
|
| 126 |
+
4. Confidence scoring based on model logits
|
| 127 |
+
|
| 128 |
+
#### Training Hyperparameters
|
| 129 |
+
|
| 130 |
+
- **Training regime:** Fine-tuning on hybrid data (neural + rule-based)
|
| 131 |
+
- **Batch size:** 32
|
| 132 |
+
- **Learning rate:** 2e-5 (warmup + linear decay)
|
| 133 |
+
- **Epochs:** 3
|
| 134 |
+
|
| 135 |
+
#### Speeds, Sizes, Times
|
| 136 |
+
|
| 137 |
+
- **Inference latency:** ~1.2s per 500 chars (DeepSeek V4 Flash)
|
| 138 |
+
- **Model size:** ~7B parameters (DeepSeek V4 Flash)
|
| 139 |
+
- **Memory usage:** ~14GB VRAM (GPU required for optimal performance)
|
| 140 |
+
|
| 141 |
+
## Evaluation
|
| 142 |
+
|
| 143 |
+
### Testing Data, Factors & Metrics
|
| 144 |
+
|
| 145 |
+
#### Testing Data
|
| 146 |
+
|
| 147 |
+
- **Osmanlica-Bench-v1:** 6,500 samples (train/val/test split: 77/7.7/15.3%)
|
| 148 |
+
- **HisTR Dataset:** 812 sentences for NER evaluation
|
| 149 |
+
- **Canonical terms:** 44 Ottoman-Turkish term pairs
|
| 150 |
+
|
| 151 |
+
#### Factors
|
| 152 |
+
|
| 153 |
+
- **Time period:** 15th-20th century texts
|
| 154 |
+
- **Document type:** Administrative, literary, journalistic
|
| 155 |
+
- **Script:** Printed (matbu) and some handwritten (rika)
|
| 156 |
+
|
| 157 |
+
#### Metrics
|
| 158 |
+
|
| 159 |
+
- **CER (Character Error Rate):** Measures character-level accuracy
|
| 160 |
+
- **WER (Word Error Rate):** Measures word-level accuracy
|
| 161 |
+
- **BLEU:** Measures translation quality against reference
|
| 162 |
+
- **F1-NER:** Measures named entity recognition accuracy
|
| 163 |
+
|
| 164 |
+
### Results
|
| 165 |
+
|
| 166 |
+
#### Summary
|
| 167 |
+
|
| 168 |
+
| Metric | Value | Target |
|
| 169 |
+
|--------|-------|--------|
|
| 170 |
+
| **CER** | 6.46% | < 5% |
|
| 171 |
+
| **WER** | 20.69% | < 15% |
|
| 172 |
+
| **BLEU** | 77.18 | > 80 |
|
| 173 |
+
| **F1-NER** | 83.8% | > 85% |
|
| 174 |
+
|
| 175 |
+
#### Detailed Results
|
| 176 |
+
|
| 177 |
+
**Transliteration (OT → TK):**
|
| 178 |
+
- Hybrid approach: 5.2% CER, 16.8% WER, 81.3 BLEU
|
| 179 |
+
- Neural-only: 5.8% CER, 18.2% WER, 79.4 BLEU
|
| 180 |
+
- NLP-only: 6.46% CER, 20.69% WER, 77.18 BLEU
|
| 181 |
+
|
| 182 |
+
**NER (HisTR):**
|
| 183 |
+
- Person: 88.2% P / 85.4% R / 86.8% F1
|
| 184 |
+
- Location: 82.1% P / 79.6% R / 80.8% F1
|
| 185 |
+
- Overall: 85.2% P / 82.5% R / 83.8% F1
|
| 186 |
+
|
| 187 |
+
## Model Examination
|
| 188 |
+
|
| 189 |
+
### Interpretability
|
| 190 |
+
|
| 191 |
+
- **Confidence scoring:** Each transliteration includes confidence score (0-1)
|
| 192 |
+
- **Uncertainty marking:** Output includes `[belirsiz]` markers for low-confidence segments
|
| 193 |
+
- **Method tracking:** Records whether hybrid, neural, or NLP method was used
|
| 194 |
+
|
| 195 |
+
### Error Analysis
|
| 196 |
+
|
| 197 |
+
Common error types:
|
| 198 |
+
1. **Vowel omission** (28%): e.g., "كچوك" → "kçuk" (should be "küçük")
|
| 199 |
+
2. **Loanword miss** (23%): e.g., "مكتبه" → "mektebe" (should be "mektebe")
|
| 200 |
+
3. **Suffix error** (19%): e.g., "لار" → "lar" (should be "ler")
|
| 201 |
+
4. **Punctuation** (12%): Missing or extra marks
|
| 202 |
+
5. **Spacing** (10%): Combined/separated words
|
| 203 |
+
6. **Other** (8%): Various
|
| 204 |
+
|
| 205 |
+
## Environmental Impact
|
| 206 |
+
|
| 207 |
+
- **Hardware Type:** NVIDIA A100 (training), GPU optional for inference
|
| 208 |
+
- **Hours used:** ~12 hours (fine-tuning)
|
| 209 |
+
- **Cloud Provider:** DeepSeek API (serverless)
|
| 210 |
+
- **Compute Region:** Asia-East
|
| 211 |
+
- **Carbon Emitted:** ~2.5 kg CO2eq (estimated via ML CO2 Impact calculator)
|
| 212 |
+
|
| 213 |
+
## Technical Specifications
|
| 214 |
+
|
| 215 |
+
### Model Architecture and Objective
|
| 216 |
+
|
| 217 |
+
**Osmanlica** is a hybrid pipeline, not a single model:
|
| 218 |
+
|
| 219 |
+
1. **Neural Component:** DeepSeek V4 Flash (1M context, 384K output)
|
| 220 |
+
- Prompt-based transliteration
|
| 221 |
+
- Systematic handling of Arabic-Persian loanwords
|
| 222 |
+
- Context-aware vowel harmony application
|
| 223 |
+
|
| 224 |
+
2. **Rule-Based Component:** TurkicNLP + Custom Dictionary
|
| 225 |
+
- Morphological analysis
|
| 226 |
+
- Deterministic transliteration for canonical terms
|
| 227 |
+
- Fallback when neural confidence < threshold
|
| 228 |
+
|
| 229 |
+
3. **Post-processing:**
|
| 230 |
+
- Spelling normalization
|
| 231 |
+
- Vowel harmony correction
|
| 232 |
+
- NER annotation (optional)
|
| 233 |
+
- POS tagging (optional)
|
| 234 |
+
|
| 235 |
+
### Compute Infrastructure
|
| 236 |
+
|
| 237 |
+
#### Hardware
|
| 238 |
+
|
| 239 |
+
- **Training:** NVIDIA A100 (80GB VRAM)
|
| 240 |
+
- **Inference:** GPU optional (CPU works but slower)
|
| 241 |
+
|
| 242 |
+
#### Software
|
| 243 |
+
|
| 244 |
+
- **Python:** 3.9+
|
| 245 |
+
- **Dependencies:** openai, turkicnlp, stanza, fastapi, uvicorn
|
| 246 |
+
- **Build:** hatchling, twine
|
| 247 |
+
|
| 248 |
+
## Citation
|
| 249 |
+
|
| 250 |
+
**BibTeX:**
|
| 251 |
+
```bibtex
|
| 252 |
+
@misc{osmanlica2026,
|
| 253 |
+
title={Osmanlica: A Production-Ready Pipeline for Ottoman Turkish Transliteration},
|
| 254 |
+
author={Bilirkesi AI Team},
|
| 255 |
+
year={2026},
|
| 256 |
+
url={https://github.com/bilirkesi/turkish-nlp},
|
| 257 |
+
note={Benchmark Report v1.0}
|
| 258 |
+
}
|
| 259 |
+
```
|
| 260 |
+
|
| 261 |
+
**APA:**
|
| 262 |
+
```
|
| 263 |
+
Bilirkesi AI Team. (2026). Osmanlica: A Production-Ready Pipeline for Ottoman Turkish Transliteration. https://github.com/bilirkesi/turkish-nlp
|
| 264 |
+
```
|
| 265 |
+
|
| 266 |
+
## Glossary
|
| 267 |
+
|
| 268 |
+
- **CER:** Character Error Rate - measures character-level translation accuracy
|
| 269 |
+
- **WER:** Word Error Rate - measures word-level translation accuracy
|
| 270 |
+
- **BLEU:** Bilingual Evaluation Understudy - measures translation quality
|
| 271 |
+
- **F1:** F1-score - harmonic mean of precision and recall
|
| 272 |
+
- **NER:** Named Entity Recognition - identifies persons, locations, organizations
|
| 273 |
+
- **OTA:** Ottoman Turkish
|
| 274 |
+
- **OTC:** Ottoman Text Corpus
|
| 275 |
+
- **HisTR:** Historical Turkish NER dataset
|
| 276 |
+
|
| 277 |
+
## More Information
|
| 278 |
+
|
| 279 |
+
- **Documentation:** https://github.com/bilirkesi/turkish-nlp#readme
|
| 280 |
+
- **API Reference:** https://github.com/bilirkesi/turkish-nlp/tree/main/packages/ottoman-transliterator
|
| 281 |
+
- **Benchmark Report:** https://github.com/bilirkesi/turkish-nlp/blob/main/docs/BENCHMARK_REPORT_v1.md
|
| 282 |
+
- **Roadmap:** https://github.com/bilirkesi/turkish-nlp/blob/main/docs/ROADMAP.md
|
| 283 |
+
|
| 284 |
+
## Model Card Authors
|
| 285 |
+
|
| 286 |
+
- Bilirkesi AI Team
|
| 287 |
+
- research@bilirkesi.ai
|
| 288 |
+
|
| 289 |
+
## Model Card Contact
|
| 290 |
+
|
| 291 |
+
- **Email:** research@bilirkesi.ai
|
| 292 |
+
- **GitHub:** https://github.com/bilirkesi
|
| 293 |
+
- **Website:** https://bilirkesi.ai
|