You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm trying to use your module, but I don't understand how to get the same results in Node.Js as your demo in Chinese in Javascript.
Do I have to train the model each time? Is it possible to do some simple use, that I could just put in the Chinese text and it would just give me the morphemes out, without any training?
I'm using the following code:
var RakutenMA = require('rakutenma');
var fs = require('fs');
var model = JSON.parse(fs.readFileSync("node_modules/rakutenma/model_zh.json"));
var rma = new RakutenMA(model, 1024, 0.007812);
rma.featset = RakutenMA.default_featset_zh;
rma.hash_func = RakutenMA.create_hash_func(15);
console.log(rma.tokenize('叙利亚毒气攻击遭到导弹回应'));
Thank you!
The text was updated successfully, but these errors were encountered:
deemeetree
changed the title
How to tokenize Chinese?
How to tokenize Chinese in Node.Js?
May 30, 2018
Hello, I'm trying to use your module, but I don't understand how to get the same results in Node.Js as your demo in Chinese in Javascript.
Do I have to train the model each time? Is it possible to do some simple use, that I could just put in the Chinese text and it would just give me the morphemes out, without any training?
I'm using the following code:
Thank you!
The text was updated successfully, but these errors were encountered: