Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not load dict from external URL #37

Open
georgeOsdDev opened this issue Jan 28, 2020 · 2 comments
Open

Can not load dict from external URL #37

georgeOsdDev opened this issue Jan 28, 2020 · 2 comments

Comments

@georgeOsdDev
Copy link

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.

Screen Shot 2020-01-29 at 4 51 25 AM
Screen Shot 2020-01-29 at 4 52 27 AM

azu added a commit to textlint/editor that referenced this issue Jul 26, 2020
azu added a commit to azu/kuromojin that referenced this issue Apr 24, 2021
BREAKING CHANGE: update to [email protected]

It includes bug fix, but some tokens will be changed.
takuyaa/kuromoji.js#37
azu added a commit to azu/kuromojin that referenced this issue Apr 24, 2021
BREAKING CHANGE: update to [email protected]

It includes bug fix, but some tokens will be changed.
takuyaa/kuromoji.js#37
@chinenvinicius
Copy link

@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?

@georgeOsdDev
Copy link
Author

@chinenvinicius
You could find some solutions linked on this thread.
My workaround is
mobilusoss/textlint-browser-runner#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants