serbian_translit.srp
Serbian (srp) script conversion, Cyrillic ↔ Latin.
1"""Serbian (`srp`) script conversion, Cyrillic ↔ Latin.""" 2 3from __future__ import annotations 4 5from .table import SRP_CYR_TO_LAT, SRP_LAT_TO_CYR 6 7 8def to_cyr(text: str) -> str: 9 """Serbian Latin → Cyrillic.""" 10 return SRP_LAT_TO_CYR.apply(text) 11 12 13def to_lat(text: str) -> str: 14 """Serbian Cyrillic → Latin.""" 15 return SRP_CYR_TO_LAT.apply(text)
def
to_cyr(text: str) -> str:
9def to_cyr(text: str) -> str: 10 """Serbian Latin → Cyrillic.""" 11 return SRP_LAT_TO_CYR.apply(text)
Serbian Latin → Cyrillic.
def
to_lat(text: str) -> str:
14def to_lat(text: str) -> str: 15 """Serbian Cyrillic → Latin.""" 16 return SRP_CYR_TO_LAT.apply(text)
Serbian Cyrillic → Latin.