Rime Gears
How To Use This Skill
Use this skill to decide which Rime engine component is responsible for a behavior. Keep the main answer focused on the pipeline and load full-reference only when the task needs exact option names, YAML examples, or component-specific edge cases.
| User Need |
Component Area |
| Key is ignored, consumed, remapped, or commits unexpectedly |
processors |
| Input text is not split or tagged as expected |
segmentors |
| Candidates are empty, incomplete, duplicated, or ordered badly |
translators and filters |
| Reverse lookup prefix or URL/symbol mode fails |
recognizer, matcher, affix_segmentor, related translators/filters |
| Lua component reference syntax is unclear |
Lua component syntax here, implementation in rime-lua |
Engine Pipeline
Rime engine components are configured in schema.yaml:
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- script_translator
filters:
- simplifier
- uniquifier
Pipeline summary:
processors receive each key event in order and return accepted, rejected, or noop.
- When
context.input changes, segmentors split the input into tagged segments.
translators respond to matching tags and lazily produce candidates.
filters transform, drop, annotate, reorder, or deduplicate candidates.
Debug Checklist
Check these before proposing a config change:
- Is the component in the correct
engine list and in a sensible order?
- If using
component@class, does the config live under the matching class: node?
- If using
component@namespace, does the config live under that namespace node?
- Does the segmentor produce the tag that the translator or filter expects?
- Is the issue actually spelling algebra? If yes, use
rime-spelling-algebra.
- Is the issue Lua implementation rather than component wiring? If yes, use
rime-lua.
Important Edge Case
recognizer is a processor, so it sees keys before the editor. Over-broad recognizer patterns can consume editing keys and prevent the editor from marking selected segments correctly. For auxiliary tags such as emoji or English hints, prefer a separate matcher@namespace in the segmentor phase instead of putting the pattern in the main recognizer.
Lua Component Syntax
All Lua component classes support the same reference forms:
| Syntax |
Meaning |
lua_xxx@func_name |
Call global func_name from rime.lua |
lua_xxx@*module_name |
Load lua/module_name.lua and use the returned component |
lua_xxx@*module_name@ns |
Same module with namespace ns |
lua_xxx@*dir/module |
Load lua/dir/module.lua |
lua_xxx@*mod*table*func@ns |
Use a nested field from a module-returned table |
For function signatures, lifecycle, yield, candidates, and Rime Lua objects, load rime-lua.
Full Reference
Load full-reference when you need:
- option tables for built-in processors, segmentors, translators, filters, or formatters;
- concrete YAML examples for a component;
- navigation bindings/default inheritance, ASCII switch keys, dictionary exclusions, or segmented learning;
- OpenCC/simplifier options;
- translator option details such as
dictionary, prism, packs, spelling_hints, or initial_quality;
- complete notes on
matcher, recognizer, reverse_lookup_filter, or Lua component variants.
1---2name: rime-gears3description: Reference router for Rime engine components. Use when configuring or debugging processors, segmentors, translators, filters, formatters, menu options, Lua component references, tags, recognizer/matcher behavior, translator options, simplifier, reverse lookup filters, or candidate pipeline ordering. Load references/full-reference.md only when exact component options or examples are needed.4---56# Rime Gears78## How To Use This Skill910Use this skill to decide which Rime engine component is responsible for a behavior. Keep the main answer focused on the pipeline and load [full-reference](references/full-reference.md) only when the task needs exact option names, YAML examples, or component-specific edge cases.1112| User Need | Component Area |13|-----------|----------------|14| Key is ignored, consumed, remapped, or commits unexpectedly | `processors` |15| Input text is not split or tagged as expected | `segmentors` |16| Candidates are empty, incomplete, duplicated, or ordered badly | `translators` and `filters` |17| Reverse lookup prefix or URL/symbol mode fails | `recognizer`, `matcher`, `affix_segmentor`, related translators/filters |18| Lua component reference syntax is unclear | Lua component syntax here, implementation in `rime-lua` |1920## Engine Pipeline2122Rime engine components are configured in `schema.yaml`:2324```yaml25engine:26 processors:27 - ascii_composer28 - recognizer29 - key_binder30 - speller31 - punctuator32 - selector33 - navigator34 - express_editor35 segmentors:36 - ascii_segmentor37 - matcher38 - abc_segmentor39 - punct_segmentor40 - fallback_segmentor41 translators:42 - punct_translator43 - script_translator44 filters:45 - simplifier46 - uniquifier47```4849Pipeline summary:50511. `processors` receive each key event in order and return accepted, rejected, or noop.522. When `context.input` changes, `segmentors` split the input into tagged segments.533. `translators` respond to matching tags and lazily produce candidates.544. `filters` transform, drop, annotate, reorder, or deduplicate candidates.5556## Debug Checklist5758Check these before proposing a config change:59601. Is the component in the correct `engine` list and in a sensible order?612. If using `component@class`, does the config live under the matching `class:` node?623. If using `component@namespace`, does the config live under that namespace node?634. Does the segmentor produce the tag that the translator or filter expects?645. Is the issue actually spelling algebra? If yes, use `rime-spelling-algebra`.656. Is the issue Lua implementation rather than component wiring? If yes, use `rime-lua`.6667## Important Edge Case6869`recognizer` is a processor, so it sees keys before the editor. Over-broad recognizer patterns can consume editing keys and prevent the editor from marking selected segments correctly. For auxiliary tags such as emoji or English hints, prefer a separate `matcher@namespace` in the segmentor phase instead of putting the pattern in the main recognizer.7071## Lua Component Syntax7273All Lua component classes support the same reference forms:7475| Syntax | Meaning |76|--------|---------|77| `lua_xxx@func_name` | Call global `func_name` from `rime.lua` |78| `lua_xxx@*module_name` | Load `lua/module_name.lua` and use the returned component |79| `lua_xxx@*module_name@ns` | Same module with namespace `ns` |80| `lua_xxx@*dir/module` | Load `lua/dir/module.lua` |81| `lua_xxx@*mod*table*func@ns` | Use a nested field from a module-returned table |8283For function signatures, lifecycle, `yield`, candidates, and Rime Lua objects, load `rime-lua`.8485## Full Reference8687Load [full-reference](references/full-reference.md) when you need:8889- option tables for built-in processors, segmentors, translators, filters, or formatters;90- concrete YAML examples for a component;91- navigation bindings/default inheritance, ASCII switch keys, dictionary exclusions, or segmented learning;92- OpenCC/simplifier options;93- translator option details such as `dictionary`, `prism`, `packs`, `spelling_hints`, or `initial_quality`;94- complete notes on `matcher`, `recognizer`, `reverse_lookup_filter`, or Lua component variants.