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

Documentation: ctype_function should be set for chinese #2

Open
ldct opened this issue May 25, 2015 · 0 comments
Open

Documentation: ctype_function should be set for chinese #2

ldct opened this issue May 25, 2015 · 0 comments

Comments

@ldct
Copy link

ldct commented May 25, 2015

The following code sample produces poor parse output unless the second last line is uncommented

var RakutenMA = require('./rakutenma');
var fs = require('fs');

var model = JSON.parse(fs.readFileSync("model_zh.json"));
var rma = new RakutenMA(model);
rma.featset = RakutenMA.default_featset_zh;
rma.hash_func = RakutenMA.create_hash_func(15);
var chardic = JSON.parse(fs.readFileSync("zh_chardic.json"))
// rma.ctype_func = RakutenMA.create_ctype_chardic_func(chardic);

console.log(rma.tokenize("下雨了。奶奶望着窗户外边哗哗的大雨,心里很着急。她想:京京带着伞,不要紧。小玲忘了带伞,一定要淋湿了。"));

I think this should be mentioned in the section "Using bundled models to analyze Chinese/Japanese sentences" in the readme.

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