Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(speller): make simple candidates auto-selectable #894

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

ksqsf
Copy link
Member

@ksqsf ksqsf commented Jun 16, 2024

Pull request

Previously, the speller only auto-selects Phrases (type "table" and "user_table"), and does not select SimpleCandidate, but history_translator only produces SimpleCandidate, and thus history candidates cannot be auto-selected. This PR corrects this oversight.

(history_translator will preserve the old candidate type, e.g. "uniquified", but we cannot access the genuine candidate via SimpleCandidate here, unfortuantely.)

Issue tracker

Fixes will automatically close the related issue

Fixes #

Feature

Describe feature of pull request

Unit test

  • Done

Manual test

  • Done

Code Review

  1. Unit and manual test pass
  2. GitHub Action CI pass
  3. At least one contributor reviews and votes
  4. Can be merged clean without conflicts
  5. PR will be merged by rebase upstream base

Additional Info

@ksqsf
Copy link
Member Author

ksqsf commented Jun 16, 2024

I'm confused why the speller only considers table and user_table in the first place.

If there's a good reason, alternatively, we can make history_translator always tag candidates as "history".

@ksqsf ksqsf requested a review from lotem June 16, 2024 05:46
@ksqsf
Copy link
Member Author

ksqsf commented Jun 16, 2024

Somewhat related: I think we should also support script_translator.

@lotem
Copy link
Member

lotem commented Jun 17, 2024

Somewhat related: I think we should also support script_translator.

The auto-select feature comes from table-based IMEs. I'm not sure if the feature works with script_translator because the latter always enables sentence input, therefore you can hardly tell when the input is done and cannot be any longer.

@lotem lotem merged commit 3ecadd2 into rime:master Jun 17, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants