Annotates a single character with its Bopomofo reading.
The character to be annotated.
The Bopomofo reading for the character.
The annotated string representation of the character.
Converts a Bopomofo string (optionally containing continuous syllables) to Chinese text.
Converts text to Bopomofo readings with spaces between Chinese characters.
The text input
The Bopomofo output with spaces
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.
The Chinese text string to be converted to Pinyin
A string containing the Hanyu Pinyin representation of the input text, with syllables separated by spaces
Generates a Mermaid graph representing candidate selections.
Bopomofo syllables or keyboard sequences.
The layout used to parse keyboard-sequence tokens.
Returns the Viterbi-selected text and its total log-probability score for the given Bopomofo (or keyboard-sequence) input.
Bopomofo syllables or keyboard sequences.
The layout used to parse keyboard-sequence tokens.
Sets phrases to exclude from the language model suggestions.
The map of user phrases.
Sets the user phrases to the language model.
The map of user phrases.
The text conversion service used in the Chrome Extension and the MCP server.
The service provides the following functions:
Example