def transliterate(data, _from=None, _to=None, scheme_map=None, **kw):
if scheme_map is None:<EOL><INDENT>scheme_map = _get_scheme_map(_from, _to)<EOL><DEDENT>options = {<EOL>'<STR_LIT>': {'<STR_LIT>'},<EOL>'<STR_LIT>': set('<STR_LIT:<>'),<EOL>'<STR_LIT>': set('<STR_LIT:>>')<EOL>}<EOL>options.update(kw)<EOL>from indic_transliteration.sanscript.brahmic_mapper import _brahmic<EOL>from indic_transliteration.sanscript.roman_mapper import _roman<EOL>func = _roman if scheme_map.from_scheme.is_roman else _brahmic<EOL>return func(data, scheme_map, **options)<EOL>
Transliterate `data` with the given parameters::

        output = transliterate('idam adbhutam', HK, DEVANAGARI)

    Each time the function is called, a new :class:`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-computed :class:`SchemeMap` instead::

        scheme_map = SchemeMap(SCHEMES[HK], SCHEMES[DEVANAGARI])
        output = transliterate('idam adbhutam', scheme_map=scheme_map)

    :param data: the data to transliterate
    :param scheme_map: the :class:`SchemeMap` to use. If specified, ignore
                       `_from` and `_to`. If unspecified, create a
                       :class:`SchemeMap` from `_from` to `_to`.