takuya kodama

Results 124 comments of takuya kodama

Hi, in my case I'm using webpack5 and React17, I have the same problem. So I've just fixed it like this and it works. Actually I don't understand why It...

What I will do as a next - [x] Search for the specification of diacritical marks - [ ] Make implementation plans

> Search for the specification of diacritical marks 下記の `Combining Diacritical Marks` の仕様を見ていく形で問題なさそう。 - https://www.unicode.org/charts/PDF/U0300.pdf

> Make implementation plans 次にこちらを考えていく。

## Implementation plans Updates 2024/08/21 - [x] Add `unify_alphabet_diacritical_mark` option to `NormalizerNFKC` - We won't implement the logic but just the option interfance. - [x] Implement the logic of `unify_alphabet_diacritical_mark`...

> 合成文字で表現するときもあると思いますけど、 ằ(U+1EB1 LATIN SMALL LETTER A WITH BREVE AND GRAVE)とか1文字で表現するときもある(というか、NFKCしたら合成文字で表現していても1文字になりそう) なるほどです。合成済みの文字コードの仕様もちょっと探してみます!

合成済み(precomposed characters)の方の仕様が見つけられないので、少し相談する。

下記の点がわかっていないので少し調べる。 どの段階の文字コードを対象にノーマライゼーションをかけるのかを確認したい。 - なぜなら、Unicode正規化(NFKC) が走ったあとなのであれば、結合文字を考慮せずに合成文字だけを考慮すればよいのではないかと考えたため - 念の為、正規化時に合成文字に変換できない場合は、そのまま結合文字が返される場合があるのかも確認する

> どの段階の文字コードを対象にノーマライゼーションをかけるのかを確認したい。 `grn_nfkc_normalize` にて、合成後にノーマライゼーションをかけていそう。 - https://github.com/groonga/groonga/blob/main/lib/normalizer.c#L2986 > 念の為、正規化時に合成文字に変換できない場合は、そのまま結合文字が返される場合があるのかも確認する 調べきれていないが普段使いするようなものは合成文字として用意されているので問題なさそう。 ただ、合成文字が存在しない場合や結合文字だけが残っているような状況も対応できたほうがのぞましいとおもうので、 合成文字と結合文字の両方を対応するのが良さそう。 - e.x.) 音声学的表記で使われるの文字など

@kou さんにアドバイスいただいた方法で、発音区別符号を含んだ結合(合成)文字をすべて洗い出すと 960 文字存在した。 テストを追加するのにすべてを一度に対応すると大変そうなので分割していく必要がある。 ```ruby def have_diactritical_combining_character?(character) code_points = character.unicode_normalize(:nfd).codepoints code_points.any? do |code_point| (0x0300..0x036f).cover?(code_point) end end (0x0000..0xffff).each do |code_point| begin character = code_point.chr("UTF-8") rescue RangeError next end next unless...