File size: 375 Bytes
1cad660
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import sys
from pathlib import Path
from runtime import BashkirDiacriticsRestorer

if hasattr(sys.stdout, "reconfigure"):
    sys.stdout.reconfigure(encoding="utf-8")

model = BashkirDiacriticsRestorer(Path(__file__).parent)
for text in ("мин башкортса хойлэшэм", "казакстан", "hello world iPhone"):
    print(f"{text} -> {model.restore(text)}")