Anteliterator

public class Anteliterator

Stateless class that provides the ability to reverse-transliterate from the given script to the specified scheme with the anteliterate API. Unlike the Transliterator, this class does not aggregate inputs. The assumption is that while anteliterating the clients already have the full output string that they want to reverse-transliterate into the specified scheme.

Usage:

class MyConfig: Config {
...
}

let factory = try TransliteratorFactory(config: MyConfig())

guard let schemes = try factory.availableSchemes(), let scripts = try factory.availableScripts() else {
// Deal with bad config
}

let anteliterator = try factory.anteliterator(schemeName: schemes[0], scriptName: scripts[0])

try anteliterator.anteliterate("...")
  • Reverse transliterates unicode string in the specified target script into the corresponding input String in the specified scheme.

    Declaration

    Swift

    public func anteliterate(_ output: String) -> String

    Parameters

    input

    Unicode String in specified script

    Return Value

    Corresponding String input in specified scheme