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

kuroshiro work on home page but doesnt work on another page. #9

Open
chinenvinicius opened this issue Aug 5, 2022 · 0 comments
Open

Comments

@chinenvinicius
Copy link

var kuroshiro = new Kuroshiro();
kuroshiro.init(new KuromojiAnalyzer())
    .then(function () {
        return kuroshiro.convert("感じ取れたら手を繋ごう、重なるのは人生のライン and レミリア最高!", { to: "hiragana" });
    })
    .then(function(result){
        console.log(result);
    })

this code is working on the homepage .
i put the kuroshiro.min.js and kuroshiro-analyzer-kuromoji.min.js on head like this

<script type="text/javascript" src="//localhost:3000/wordpress/wp-content/themes/colorswebsite/distfile/kuroshiro.min.js?ver=1.1.0" id="kuroshiro-min-js"></script> <script type="text/javascript" src="//localhost:3000/wordpress/wp-content/themes/colorswebsite/distfile/kuroshiro-analyzer-kuromoji.min.js?ver=1.1.0" id="kuroshiro-analyzer-js"></script>

i copied these two file from node_modules and paste it outside on a folder called distfile.

the code above seems tow work only on one page. and the other page i get the error 404 not found.
i even copied the dict folder from the kuromoji and paste it outside like this as some people mention on other issues. but it doesnt seem to work in my case.
kuroshiro.init(new KuromojiAnalyzer({ dictPath: "dict/" }))

スクリーンショット (36)

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

1 participant