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: disable google_japanese_input on affix conversions #197

Closed
wants to merge 4 commits into from

Conversation

atusy
Copy link
Contributor

@atusy atusy commented Jun 20, 2024

In the current implementation, the google_japanse_input source returns invalid candidates for affixes (prefix and suffix).

For example, Dai> gives 第> and 大>.

This PR prevents it by conditionally disabling the google_japanse_input source.

In order to implement the feature, I changed the signature of getHenkanResult() and related methods.

- getHenkanResult(type: HenkanType, word: string)
+ getHenkanResult(word: string, type: HenkanType, affix?: AffixType)

Let me know if reviewer prefers type, word, affix or some other signatures.

@atusy
Copy link
Contributor Author

atusy commented Jun 20, 2024

Maybe we should add more generalized approach.
Otherwise, we need more patches as we implement 単漢字変換, 数値変換, and else.

@atusy atusy closed this Jun 20, 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.

None yet

1 participant