-
Notifications
You must be signed in to change notification settings - Fork 116
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
NormalizerNFKC*: Add tests for mixing katakana options #1539
Conversation
6, | ||
0, | ||
0, | ||
32616, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is odd, this should be 3 but 32616.
The value 32626 is not stable, changes each time I run it.
I will check it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あぁ、昨日私がいじったところが悪いかも。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「ズァ」と「ヅァ」のときだけ発生していて、「ヴァ」などでは起きないので、昨日の須藤さんの修正とは関係なさそうな感じもします。(調べています。)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最新のmasterにrebaseしたところ直ったので、関係あったようです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
さーせん。。。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
いえ、ご対応ありがとうございます。
0533db3
to
4ea7c23
Compare
Would you review this when you have time? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Adding similar tests to all test/command/suite/normalizers/nfkc*/
is annoying... We may be able to unify them by improving grntest in the future...
lib/normalizer.c
Outdated
grn_nfkc_normalize_unify_katakana_trailing_o, | ||
&need_trailing_check, | ||
"[unify][katakana-trailing-o]"); | ||
grn_nfkc_normalize_unify_stateless(ctx, data, &unify, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to change the current following order:
grn_nfkc_normalize_unify_stateless(before)
grn_nfkc_normalize_unify_statefull()
sgrn_nfkc_normalize_unify_stateless(after)
For keeping unifying order simple.
How about adding ョ
and small letters to katakana_trailing_o
targets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will fix so as to normalize オ
after small letters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Agree. |
Thank you, I have addressed your comments. |
@@ -0,0 +1,14 @@ | |||
normalize \ | |||
'NormalizerNFKC100("unify_katakana_v_sounds", true, \ | |||
"unify_katakana_gu_small_sounds", true, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken indent but I'll merge this as-is. I can't review all tests...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't review all tests but I merge this.
Added tests for mixing katakana options.
And fixed
unify_katakana_trailing_o
in order to work fine for the following cases.ョー -> ヨー -> ヨオ -> ヨウ
ョー
was normalized toヨオ
(should beヨウ
) becauseunify_katakana_trailing_o
was applied beforeunify_kana_case
andunify_katakana_trailing_o
is not normalizedオ
after small letters.I have added
オ
afterォ
orョ
as a target ofunify_katakana_trailing_o
.ヺー -> ヺオ -> ヺウ
ヺー
was normalized toヺオ
becauseunify_katakana_trailing_o
didn't targetヺ
.I have added
ヺ
as a target ofunify_katakana_trailing_o
.