@openvanilla/mcbopomofoweb
    Preparing search index...

    The text conversion service used in the Chrome Extension and the MCP server.

    The service provides the following functions:

    • Convert Taiwanese Braille to text
    • Convert text to Bopomofo readings
    • Convert text to Hanyu Pinyin
    • Convert text to HTML Ruby
    • Convert text to Taiwanese Braille
    • Convert text to Bopomofo annotated text (for Bopomofo annotation fonts)
    • Annotate a single character with its Bopomofo reading
    Index

    Constructors

    Methods

    • Annotates a single character with its Bopomofo reading.

      Parameters

      • input: string

        The character to be annotated.

      • reading: string

        The Bopomofo reading for the character.

      Returns string

      The annotated string representation of the character.

    • 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 annotated text.

      Parameters

      • input: string

        The text input

      Returns string

      The annotated text output

      let service = new Service();
      let input = "小麥注音輸入法";
      let output = service.convertTextToBpmfAnnotatedText(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"
    • Converts text to raw Bopomofo readings.

      Parameters

      • input: string

        The text input

      Returns string

      The raw Bopomofo output

      let service = new Service();
      let input = "小麥注音";
      let output = service.convertTextToRawReadings(input);