The text conversion service.

The service provides the following functions:

  • Convert Taiwanese Braille to text
  • Convert text to Bopomofo readings
  • Convert text to HTML Ruby
  • Convert text to Taiwanese Braille

Constructors

Methods

  • Appends Bopomofo readings to the input text.

    Parameters

    • input: string

      The input text.

    Returns string

    The text with Bopomofo readings appended.

    let service = new Service();
    let input = "小麥注音輸入法";
    let output = service.appendBpmfReadingsToText(input);
  • Convert Taiwanese Braille to text

    Parameters

    • input: string

      The Braille input

    Returns string

    The text output

    let service = new Service();
    let input = "⠑⠪⠈⠍⠺⠐⠁⠌⠐⠹⠄⠊⠌⠄⠛⠌⠐⠟⠜⠈";
    let output = service.convertTextToBraille(input);
  • Converts text to Bopomofo readings.

    Parameters

    • input: string

      The text input

    Returns string

    The Bopomofo output

    let service = new Service();
    let input = "小麥注音輸入法";
    let output = service.convertTextToBpmfReadings(input);
  • Converts text to Taiwanese Braille

    Parameters

    • input: string

      The text input

    Returns string

    The Braille output

    let service = new Service();
    let input = "小麥注音輸入法";
    let output = service.convertTextToBraille(input);
  • Converts text to HTML Ruby

    Parameters

    • input: string

      The text input

    Returns string

    The HTML Ruby output

    let service = new Service();
    let input = "小麥注音輸入法";
    let output = service.convertTextToHtmlRuby(input);
  • Sets the user phrases to the language model.

    Parameters

    • input: string | Map<string, string[]>

      The map of user phrases.

    Returns void