Im trying to use the library inside a chrome extension and when I set up the builder, I pass in a path to data made by chrome like this:
let builder = kuromoji
.builder({ dicPath: chrome.extension.getURL("data/") })
.build(function (err, tokenizer) {
var path = tokenizer.tokenize("すもももももももものうち");
});
However I get an error:
kuromoji.js:7724 Uncaught TypeError: Cannot read property 'lookup' of null
at UnknownDictionary.lookup (kuromoji.js:7724)
at ViterbiBuilder.build (kuromoji.js:8806)
at Tokenizer.getLattice (kuromoji.js:6961)
at Tokenizer.tokenizeForSentence (kuromoji.js:6916)
at Tokenizer.tokenize (kuromoji.js:6907)
at furigana.js:103
at kuromoji.js:7010
at kuromoji.js:8272
at kuromoji.js:3876
at kuromoji.js:475
Im trying to use the library inside a chrome extension and when I set up the builder, I pass in a path to data made by chrome like this:
However I get an error: