azu / kuromojin

Provide a high-level wrapper for kuromoji.js. Cache/Promise API
https://kuromojin.netlify.app/
MIT License
87 stars 9 forks source link

getTokenizer should have LRU cache too #13

Open azu opened 2 years ago

azu commented 2 years ago

From https://github.com/textlint-ja/textlint-rule-max-ten/pull/16#issuecomment-991891587

Currently, getToknizer just return kuromoji.js object. Instead of it, we want to wrap the tokenize and tokenizeSentence with LRU cache.

cc @k-tahiro