https://github.com/wtetsu/deinja
πΈDe-inflect Japanese words
https://github.com/wtetsu/deinja
Last synced: 7 months ago
JSON representation
πΈDe-inflect Japanese words
- Host: GitHub
- URL: https://github.com/wtetsu/deinja
- Owner: wtetsu
- License: apache-2.0
- Created: 2018-11-06T13:40:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-13T04:13:26.000Z (about 1 year ago)
- Last Synced: 2025-10-23T05:18:42.922Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 942 KB
- Stars: 13
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deinja
**deinja** is a lightweight JavaScript library that converts inflected Japanese words into their original forms.
Instead of aiming for perfect accuracy, *deinja* prioritizes speed and simplicity. It does **not** include internal dictionary data, which means it may return **multiple possible candidates** for each input rather than a single definitive answer.
This library was originally a component of [Mouse Dictionary](https://github.com/wtetsu/mouse-dictionary), and has since been extracted into a standalone module.
## Installation
```
npm i deinja
```
## Usage
```js
import deinja from "deinja";
deinja.convert("η΄ ζ©γ"); // ["η΄ ζ©γ"]
deinja.convert("θ»’γγ"); // ["θ»’γγ"]
deinja.convert("ζγγ"); // ["ζγγ", "ζγ"]
deinja.convert("ζ»γ«γΎγγ"); // ["ζ»γ¬"]
deinja.convert("η΅γγ£γ¦"); // ["η΅γγ", "η΅γγ€", "η΅γγ"]
deinja.convert("γγΎγ£γ"); // ["γγΎγ", "γγΎγ€", "γγΎγ"]
```
## License
Apache 2.0
## Acknowledgments
deinja is built upon deinflector, a Java-based tool for Japanese word normalization.
https://github.com/Jimeux/deinflector
