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

feat(table_translator): Allow sorting completions #821

Closed
wants to merge 3 commits into from

Conversation

ksqsf
Copy link
Member

@ksqsf ksqsf commented Feb 17, 2024

Pull request

Issue tracker

Fixes will automatically close the related issue

Fixes #820

Feature

Describe feature of pull request

Add a new boolean option sort_completions. When enabled (requiring
enable_completion also to be enabled), completion candidates will be
sorted according to the weights specified in the dictionary.

This is done by automatically generating kCompletion spellings in the
prism, as if they were generated from spelling algebra written by the
user.

Previously, the order was arbitrary (but more-or-less in alphabet
order).

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

Add a new boolean option `sort_completions`. When enabled (requiring
`enable_completion` also to be enabled), completion candidates will be
sorted according to the weights specified in the dictionary.

This is done by automatically generating kCompletion spellings in the
prism, as if they were generated from spelling algebra written by the
user.

Previously, the order was arbitrary (but more-or-less in alphabet
order).
@ksqsf
Copy link
Member Author

ksqsf commented Feb 17, 2024

Upon further testing, this doesn't work with custom algebra:

derive/de/bb/, type single b, get wrong comment:

图片

Closing for now

@ksqsf ksqsf closed this Feb 17, 2024
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.

<未输入完整的词条> 候选词排序是乱序的,未按照权重排序
1 participant