mcbopomofoweb
    Preparing search index...

    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
    Index

    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);
    • Converts Chinese text to Hanyu Pinyin representation.

      This method takes Chinese text as input and returns its romanized form in Hanyu Pinyin. The conversion processes each character individually, converting Bopomofo readings to Pinyin syllables.

      Parameters

      • input: string

        The Chinese text string to be converted to Pinyin

      Returns string

      A string containing the Hanyu Pinyin representation of the input text, with syllables separated by spaces

      const service = new Service();
      const pinyin = service.convertTextToPinyin("中文");
      // Returns: "zhong wen"
    • Sets the user phrases to the language model.

      Parameters

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

        The map of user phrases.

      Returns void