Skip to content

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

@chinenvinicius

Description

@chinenvinicius
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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions