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

abcd漢字 fails to tokenize #6

Open
DarrenCook opened this issue Apr 28, 2017 · 0 comments
Open

abcd漢字 fails to tokenize #6

DarrenCook opened this issue Apr 28, 2017 · 0 comments

Comments

@DarrenCook
Copy link

With "abcd漢字" I get 6 tokens, with no POS info. But with "abc漢字" I get 2 tokens, with POS values.

Curiously, when I try it at http://rakuten-nlp.github.io/rakutenma/, both sentences work.

My (node.js) code is like this, using the default model_ja.json file that comes with the tokenizer.

const fs = require('fs');
const RakutenMA = require('rakutenma');
const model = JSON.parse(fs.readFileSync("model_ja.json"));
const rma = new RakutenMA(model);
rma.featset = RakutenMA.default_featset_ja;
rma.hash_func = RakutenMA.create_hash_func(15); //The 15 is to match the pre-trained data.
const s = "abcd漢字";
rma.tokenize(s)

Is there anything I am missing, or doing wrong, here?

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