Pomax / node-jp-conversion

Japenese input conversion, turning any string into {kanji, katakana, hiragana, romaji} where possible.
15 stars 7 forks source link

Convert katakana to hiragana #3

Open larvata opened 5 months ago

larvata commented 5 months ago

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 あくせしびりてぃー.

Pomax commented 5 months ago

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.

larvata commented 5 months ago

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.