The rime-quick repository made two changes to the Quick schema quick5. It first added, at the end of the schema, configuration entries for a language model and a user patch. It then changed the reverse-lookup hint so that a multi-letter code shows the first and last codes that Quick actually uses, and keeps the full code in brackets. For a Quick user who learns shape-based codes by reverse lookup, the second change makes the hint closer to what is typed. The first change brings both kinds of configuration into the schema’s own patch list. [1][2]

The reverse-lookup hint: first and last codes, then the full code

Commit 207d1ef changes comment_format under reverse_lookup in quick5.schema.yaml. The old rules mainly turned lowercase letters, one by one, into the corresponding root symbols. The new rules first shape how the code is displayed, then convert the roots. The commit title states the aim: the reverse-lookup comment shows the actual Quick code, and shows the full code in parentheses. [1]

Take the illustrative code abc, as the rules process it. The new format first keeps a copy of the full code, then shortens the code in front to the first and last letters, producing an intermediate form like ac〔ABC〕. Uppercase and lowercase letters are then converted to root symbols, and the display becomes 「日金〔日月金〕」. You can see the first and last codes used for Quick, and use the full code in brackets to see where they came from. [1]

The order of the comment_format conversions

The five rules in the new configuration do the following, in order: [1]

  1. Match a multi-letter code that does not start with z, append a copy of the full code turned into capitals, and wrap that copy in 〔〕.
  2. Shorten the code in front to its first and last characters, and keep the full code in brackets.
  3. Map lowercase a–z to root symbols, and turn ~ into ~.
  4. Map uppercase A–Z to the same root symbols, so the full code in brackets can be read.
  5. Turn spaces into enumeration commas, separating groups of hints.

These conversions sit under reverse_lookup, then comment_format, in quick5.schema.yaml. What they change is the display of the reverse-lookup comment. When you read the configuration, look first at the two xform rules, which copy and shorten the code, then at the two xlit rules, which replace letters with roots. Those two parts correspond to the two parts of the hint on screen. [1]

Where the language model and the user patch go

In the earlier commit 5dcdb9e, a top-level __patch list was added at the end of quick5.schema.yaml. It lists grammar:/hant? and then quick5.custom:/patch?. The comment beside the first marks it as using the baguwen language model. The comment beside the second marks it as configuration the user chooses. [2]

__patch:
  # 使用八股文语言模型
  - grammar:/hant?
  # 用户自选配置
  - quick5.custom:/patch?

For someone maintaining a quick5 configuration, these two lines are a clear location. The language-model entry points at hant inside grammar. The user-patch entry points at patch inside quick5.custom. Both are references written under the top-level __patch of the schema file. They are not written inside the reverse-lookup comment_format. The two commits solve different problems. One organizes the schema’s configuration. The other changes how a reverse-lookup code is presented. [1][2]

References

  1. fix: make reverse lookup comment actual quick code (with full code in parenthesis)
  2. 自動加載語言模型