Skip to content

atsumari-io/mecabjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;
}

About

Node.js TypeScript client for MeCab, a Japanese morphological anaylzer.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%