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 match result select trailing emphatic characters (っッー) #1208

Merged
merged 3 commits into from
Jul 12, 2024

Conversation

khaitruong922
Copy link

@khaitruong922 khaitruong922 commented Jul 12, 2024

#980

Currently due to the collapseEmphaticSequences preprocessor, terms with trailing emphatic characters will match the main term, which will result in the selection highlighting the trailing emphatic part. This fix will make sure the algorithm leave at least 1 trailing emphatic characters if there is any, to avoid matching the main term.

For example: 学生っ will not match 学生

@khaitruong922 khaitruong922 requested a review from a team as a code owner July 12, 2024 11:35
@khaitruong922 khaitruong922 marked this pull request as draft July 12, 2024 11:44
@khaitruong922 khaitruong922 marked this pull request as ready for review July 12, 2024 11:45
@StefanVukovic99 StefanVukovic99 added the kind/bug The issue or PR is regarding a bug label Jul 12, 2024
Copy link
Collaborator

@StefanVukovic99 StefanVukovic99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really get how the collapseEmphaticSequences function works, but LGTM

@khaitruong922
Copy link
Author

I don't really get how the collapseEmphaticSequences function works, but LGTM

It will try to match word without those emphatics.
For example: かっっこいい will match かっこいい, すーごーーーい will match すごい

@StefanVukovic99 StefanVukovic99 added this pull request to the merge queue Jul 12, 2024
Merged via the queue into yomidevs:master with commit 751acba Jul 12, 2024
10 checks passed
@khaitruong922 khaitruong922 deleted the fix-trailing-small-tsu branch July 12, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug The issue or PR is regarding a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants