kuromoji.js
kuromoji.js copied to clipboard
Can not load dict from external URL
We are trying to use kuromoji.js with kuromojin on browser.
When we use external url as dicPath
option, double slash is normalized by path.join
.
> require("path").join("http://external-url.com/dict", "base.dat.gz");
'http:/external-url.com/dict/base.dat.gz'
So XMLHttpRequest
will go to https://mydomain.com/external-url.com/dict/base.dat.gz
And fail to load dict.
@georgeOsdDev im having the same issue. im using kuroshiro to change kanji to furigana however when i try to use external cdn for the dict path. it seems to work fine on localhost but not on live server. did u find any workaround for this issue? if so would help me?
@chinenvinicius You could find some solutions linked on this thread. My workaround is https://github.com/mobilusoss/textlint-browser-runner/pull/7