@atsumari/mecabjs
v0.1.0
Published
MeCab client for Node
Downloads
1
Readme
MeCab client for Node.js
MeCab is a morphological analyzer for the Japanese language. This package will allow you to use MeCab in your Node.js code if you have MeCab installed.
Installation
npm install @atsumari/mecabjs
# or
yarn add @atsumari/mecabjs
Usage
import { MeCab } from 'mecab-client'
const main = async () => {
const mecab = new MeCab()
const result = await mecab.parse("こんにちは")
console.log(result)
}
main()
Output interface for one word:
interface MeCabWordOutput {
kanji: string | null;
lexical: string | null;
compound1: string | null;
compound2: string | null;
compound3: string | null;
conjugation: string | null;
inflection: string | null;
original: string | null;
reading: string | null;
pronunciation: string | null;
}