@tomsd/kuromoji-dict
v1.0.1
Published
dict directory for kuromoji.js
Downloads
154
Readme
@tomsd/kuromoji-dict
It's a dict directory for kuromoji.js.
Installation
npm install @tomsd/kuromoji-dict
Usage
import { builder } from "kuromoji";
import { getDictPath } from "@tomsd/kuromoji-dict";
new Promise((resolve, reject) => {
builder({
dicPath: getDictPath(),
}).build((err, tokenizer) => {
if (err) {
reject(err);
} else {
resolve(tokenizer);
}
})
})
.then(tokenizer =>
tokenizer.tokenize("これはテストです。")
)
.then(console.log)
.catch(console.log);