hepburn
hepburn copied to clipboard
Katakana ァ left unchanged by fromKana
Thanks for this library! I'm using it to make a little game to help practice japanese reading. I found an edge case where it doesn't completely romanize a word:
hepburn.fromKana("スナバァ") == "SUNABAァ"
This is the Japanese name of the Pokémon Sandygast. I'm not sure what the correct behavior is there; Bulbapedia gives the romanized form as just "Sunaba".
I believe the ァ
is a combining form of the letter A, so in this case the output should probably be SUNABĀ
or SUNABAA
rather than SUNABA
.
https://en.wiktionary.org/wiki/%E3%82%A1
I found another example of this: ミネルウァ currently produces MINERUUァ
but should probably be MINERUUA
.
Happy to accept a PR that corrects this.
I've taken a crack at this, well, it goes deeper!
Indeed, after a quick Web search, it seems that writing
can be written as ラィティング
instead of ライティング
, the library output is then RAィTINGU
.
It would need further research, but it might be safe to think that all vowel yōon katakanas (ァィゥェォ
) can also be used as either a chōonpu, doubling the vowels, or as a standalone vowel in itself.
The easiest fix would be to list every combinations in katakanaDigraphs
(hepburn.js, line 56), but that would not be the most elegant of solutions as it would multiple the diagram list by five.
I'll try coming up with something. Do not hesitate to correct me if you find further evidence.
Cheers,
@risseraka Arigato / merci beaucoup for investigating this, treating these vowel kana as choonpu feels like the right sort of approach.
I'm running into 彼はあなたの顔が好きです。
being converted to 彼HAANATANO顔GA好KIDESU。