indic_transliteration.xsanscript¶
This is a variant of sanscript
which supports more intuitive transliteration for non-sanskrit characters in Indian languages (like hrasva e and o in draviDian ones).
-
indic_transliteration.xsanscript.
transliterate
(data, _from=None, _to=None, scheme_map=None, **kw)[source]¶ Transliterate data with the given parameters:
output = transliterate('idam adbhutam', HK, DEVANAGARI)
Each time the function is called, a new
SchemeMap
is created to map the input scheme to the output scheme. This operation is fast enough for most use cases. But for higher performance, you can pass a pre-computedSchemeMap
instead:scheme_map = SchemeMap(SCHEMES[HK], SCHEMES[DEVANAGARI]) output = transliterate('idam adbhutam', scheme_map=scheme_map)
Parameters: - data – the data to transliterate
- _from – the name of a source scheme
- _to – the name of a destination scheme
- scheme_map – the
SchemeMap
to use. If specified, ignore _from and _to. If unspecified, create aSchemeMap
from _from to _to.