hexenq / kuroshiro

Japanese language library for converting Japanese sentence to Hiragana, Katakana or Romaji with furigana and okurigana modes supported.
https://kuroshiro.org
MIT License
781 stars 88 forks source link

hiragana -> katakana conversion doesn't seems to work #64

Open proppy opened 5 years ago

proppy commented 5 years ago

Is that the expected behavior?

> kuroshiro.convert('トン', { to: 'hiragana' }).then(console.log)
kuroshiro.convert('トン', { to: 'hiragana' }).then(console.log)
Promise {
  <pending>,
  domain: 
   Domain {
     domain: null,
     _events: 
      { removeListener: [Function: updateExceptionCapture],
        newListener: [Function: updateExceptionCapture],
        error: [Function: debugDomainError] },
     _eventsCount: 3,
     _maxListeners: undefined,
     members: [] } }
> トン

kanakana -> hiragana seems to work as expected

> kuroshiro.convert('とん', { to: 'katakana' }).then(console.log)
kuroshiro.convert('とん', { to: 'katakana' }).then(console.log)
Promise {
  <pending>,
  domain: 
   Domain {
     domain: null,
     _events: 
      { removeListener: [Function: updateExceptionCapture],
        newListener: [Function: updateExceptionCapture],
        error: [Function: debugDomainError] },
     _eventsCount: 3,
     _maxListeners: undefined,
     members: [] } }
> トン