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)}")