Doublevil / JmdictFurigana

A Japanese dictionary resource that attaches furigana to individual words
150 stars 13 forks source link

Announcing: microservice for JmdictFurigana #7

Closed fasiha closed 7 years ago

fasiha commented 7 years ago

Hi, this is not an issue, just, thanks for this great project and I made a tiny Node.js server to host the data, so clients can request readings and furigana for JMDICT headwords, or just furigana for headword–reading pairs.

https://github.com/fasiha/JmdictFurigana-microservice

One nice thing is, it returns the furigana in a format that’s a little easier to convert to Ruby, e.g., hitting the /食べ物/たべもの endpoint returns

[
  {
    "ruby": "食",
    "rt": "た"
  },
  "べ",
  {
    "ruby": "物",
    "rt": "もの"
  }
]

which a web client can readily render as Ruby tags: もの.

It’s trivial to set up something like this, but I thought maybe if it saves one of your other users a few minutes, then it’d be worth it. Thank you 🙇!

BlueRaja commented 7 years ago

Why are the spelling and pronunciation called ruby and rt?

fasiha commented 7 years ago

@BlueRaja, to match the HTML5 Ruby tag, i.e., もの = <ruby>食<rt>た</rt></ruby>べ<ruby>物<rt>もの</rt></ruby>, though that might have been shortsighted of me, replacing linguistic terms with HTML jargon…