https://github.com/hota1024/mecab-client
MeCab client library written in TypeScript
https://github.com/hota1024/mecab-client
mecab morphological-analysis typescript
Last synced: 5 months ago
JSON representation
MeCab client library written in TypeScript
- Host: GitHub
- URL: https://github.com/hota1024/mecab-client
- Owner: hota1024
- Created: 2020-08-08T11:32:29.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-09T03:29:39.000Z (almost 6 years ago)
- Last Synced: 2025-08-20T21:56:29.774Z (10 months ago)
- Topics: mecab, morphological-analysis, typescript
- Language: TypeScript
- Homepage: https://mecab-client.vercel.app/
- Size: 160 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

mecab-client
MeCab client library written in TypeScript
## ๐ Installation
```bash
npm install mecab-client
# or
yarn add mecab-client
```
## ๐ง Usage
```ts
import { MeCab } from 'mecab-client'
const main = async () => {
const mecab = new MeCab()
const result = await mecab.parse("ใใใใใใใใใใฎใใก")
console.log(result)
}
main()
```
## ๐ก API
## `MeCab#parse(source: string): Word[]`
- ไธใใใใๆๅญๅใ่งฃๆใ `Word[]` ใ่ฟใใพใใ
## `Word` type
```ts
/**
* Word type.
*/
export type Word = {
/**
* ่กจๅฑค็ณป
*/
surface: string
/**
* ๅ่ฉ
*/
lexical: Lexical
/**
* ๅ่ฉ็ดฐๅ้ก1
*/
compound1: string
/**
* ๅ่ฉ็ดฐๅ้ก2
*/
compound2: string
/**
* ๅ่ฉ็ดฐๅ้ก3
*/
compound3: string
/**
* ๆดป็จๅ
*/
conjugation: string
/**
* ๆดป็จๅฝข
*/
inflection: string
/**
* ๅๅ
*/
original: string
/**
* ่ชญใฟ
*/
reading: string
/**
* ็บ้ณ
*/
pronunciation?: string
}
```