wtetsu / deinja

🌸De-inflect Japanese words

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logo
Build Status Code Climate npm version npm version

deinja

deinja is a JavaScript library that converts Japanese words into the original forms.

Since this library focuses on lightness and speed rather than accuracy, it doesn't have internal dictionary data. Therefore, it returns multiple candidates, not the sole word.

This library was once a part of Mouse Dictionary. It was detached from the application as a form of a portable library.

Install

npm i deinja

How to use

import deinja from "deinja";

deinja.convert("素早く"); // ["素早い"]
deinja.convert("θ»’γŒγ—"); // ["θ»’γŒγ™"]
deinja.convert("ζŠ•γ’γŸ"); // ["ζŠ•γ’γ‚‹", "ζŠ•γ"]

deinja.convert("ζ­»γ«γΎγ—γŸ"); // ["死ぬ"]
deinja.convert("硂わって"); // ["硂わう", "硂わ぀", "硂わる"]
deinja.convert("γ—γΎγ£γŸ"); // ["しまう", "しま぀", "しまる"]

License

Apache 2.0

deinja is implemented based on deinflector which is written in Java.

https://github.com/Jimeux/deinflector

About

🌸De-inflect Japanese words

License:Apache License 2.0


Languages

Language:JavaScript 100.0%