node-jp-conversion icon indicating copy to clipboard operation
node-jp-conversion copied to clipboard

Convert katakana to hiragana

Open larvata opened this issue 2 years ago • 2 comments

The convert method does not produce the expected result when applied to katakana.

converter.convert('アクセシビリティー');

->

{
  kanji: false, 
  hiragana: false, 
  katakana: "アクセシビリティー", 
  romaji: "akuseshibirithi-"
}

The hiragana key is expected to return the hiragana equivalent of the input katakana string. However, it currently returns false instead of the correct value あくせしびりてぃー.

larvata avatar Jan 07 '24 06:01 larvata

The is a katakana-only long vowel marker, so I'm not sure why you would expect a hiragana result (expect perhaps in manga/onomatopoaeic context?)

That said, the real issue I'm seeing here is the conversion of ティー to thi- rather than ti-, which doesn't seem right at all.

Pomax avatar Jan 07 '24 20:01 Pomax

Thanks for your reply. I'm currently working on a dictionary app, and I'd like to index the words in both hiragana/katakana/romaji forms. I'm not sure whether this request aligns with the goals and vision of this project. If not, I will turn to using a workaround; it's not too troublesome.

larvata avatar Jan 08 '24 05:01 larvata