Reverse Lookup Function ^2026.03
Reverse lookup, in simple terms, refers to using alternative input methods to find characters under the current input method.
Translation to English:
2024.04: The reverse lookup function, originally
uu/~u,uw/~w,ui/~i, etc., has been uniformly changed toUu,Uw,Ui, etc., for easy memory. More: 51779acb8
For example, using Wubi to view words under the current Pinyin input method.
The Oh-my-rime (Mint Input Method's Pinyin scheme) includes three types of reverse lookup:
- Character decomposition reverse lookup (Uu)
- Wubi reverse lookup (Uw)
- Stroke-based reverse lookup (Ui)
The Wubi input supports:
- Pinyin reverse lookup (Up)
Configuration
Oh-my-rime comes with complete reverse lookup configurations built-in. This section explains how to customize and remove reverse lookup features.
Recommended: Use Custom Files for Overrides
Rime supports .custom.yaml files for overriding configurations, allowing you to customize settings without modifying original files, and your changes won't be overwritten by updates.
For example, to override Mint Pinyin settings, create a rime_mint.custom.yaml file.
Customize Reverse Lookup
To modify the prefix or hint text of a reverse lookup, you can override it in a custom file. Using radical lookup as an example:
# rime_mint.custom.yaml
patch:
radical_reverse_lookup:
prefix: "Vu" # Change prefix from Uu to Vu
tips: 〔Radical Lookup〕 # Modify hint text
# Update recognizer to match the new prefix
"recognizer/patterns/radical_lookup": "Vu[a-z]*'?$"Sync recognizer Configuration
When modifying the reverse lookup prefix, you must also update the corresponding pattern in recognizer/patterns, otherwise the new prefix will not trigger the reverse lookup.
To enable the "Tone Display" feature for showing Pinyin with tones:
# rime_mint.custom.yaml
patch:
"switches/@next":
name: tone_display
states: [ 声杳, 声起 ]
reset: 1 # Enable by defaultRemove Reverse Lookup
If you don't need certain reverse lookup features, you can remove them in the custom file. Using stroke lookup removal as an example:
# rime_mint.custom.yaml
patch:
# Remove dependency
"dependencies/@next": {}
# Remove from segmentors
"engine/segmentors/@before 4": {}
# Remove from translators
"engine/translators/@before 6": {}
# Remove from reverse_lookup.tags
"reverse_lookup/tags/@before 2": {}
# Remove recognizer pattern
"recognizer/patterns/stroke": {}Add New Reverse Lookup
To add a new reverse lookup feature, complete the following steps:
Add dependency: Import the target scheme in
dependenciesyamldependencies: - radical_pinyinAdd engine components: Import in
segmentorsandtranslatorsunderengineyamlengine: segmentors: - affix_segmentor@radical_reverse_lookup translators: - reverse_lookup_translator@radical_reverse_lookupDefine reverse lookup configuration:
yamlradical_reverse_lookup: tag: radical_lookup dictionary: radical_pinyin prefix: "Uu" tips: 〔Radical〕 reverse_lookup: tags: [radical_lookup] overwrite_comment: trueAdd recognition rule:
yamlrecognizer: patterns: radical_lookup: "Uu[a-z]*'?$"
Input Comment Display (Tone Display)
In Oh-my-rime, the reverse lookup results support displaying complete Pinyin annotations. This feature is controlled by the "Tone Display" switch:
- Tone Hidden (声杳): Disable Pinyin annotation display
- Tone Display (声起): Enable Pinyin annotation display, showing complete Pinyin in the input box during reverse lookup
When enabled, typing Uuniuniuniu will display the full Pinyin with tones in real-time in the preedit area (e.g., niú niú niú), helping you confirm the correct pronunciation of the radical combination.
How it works:
- Define the
tone_displayswitch in the schemayaml- name: tone_display states: [ 声杳, 声起 ] reset: 0 - The Lua filter
super_preedit.luareads the switch state and converts input codes to full Pinyin with tones in the preedit area - During reverse lookup,
reverse_lookup'soverwrite_comment: trueensures comments are correctly overlaid and displayed
Radical-based Reverse Lookup
Personally, I think this is the most practical type of reverse lookup; In Oh-my-rime, press Uu to activate the radical-based input mode. Subsequent inputs will be interpreted using the radical library.
For example: When you type Uuniuniuniu on the keyboard, it will be interpreted as the combination of "niu niu niu," which represents three "牛" (cows) and forms the character "犇".

Wubi Reverse Lookup
In Oh-my-rime's Mint Pinyin mode, use Uw to activate the Wubi mode. Subsequent inputs will be interpreted using Wubi.
For example: When you type Uwq on the keyboard, it will be interpreted as q. In the Wubi dictionary, it automatically retrieves the character 我 (me), which is convenient for combined character lookup.

The selected text translates to:
Stroke Reverse Lookup
In Oh-my-rime's Mint Pinyin mode, use Ui to activate the stroke mode, and the subsequent input content will be parsed using strokes.
Countdown to Removal
Considering that the stroke input method is used by too few people. We are considering removing the stroke reverse lookup and related stroke configurations. If you are still using stroke input or reverse lookup, please be sure to contact us, otherwise we may remove the stroke category in the future.
Pinyin Reverse Lookup
In Oh-my-rime's Wubi mode, use Up to activate the stroke mode, and the subsequent input content will be parsed using Pinyin.