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

Can it analyse Chinese? #68

Closed
cdmikechen opened this issue Jun 15, 2016 · 2 comments
Closed

Can it analyse Chinese? #68

cdmikechen opened this issue Jun 15, 2016 · 2 comments

Comments

@cdmikechen
Copy link

I recently know this mallet. I am an engineer in China. My Boss ask me for telling that if it can analyse Chinese. I found it has some test case about English, Japanese and so on, but do not have Chinese. So I want to ask that question.
If it can, so what should I do? I must change base code or add some plugins?
If some one knows, please tell me.
Thanks!

@mimno
Copy link
Owner

mimno commented Jun 15, 2016

Mallet is not language-specific, but does not support Chinese tokenization. You would need to run something like the Stanford Chinese segmenter on input text before importing.

@chandrasg
Copy link

Hi @mimno , I applied text segmentation on chinese text which I am using as input to mallet.

My input looks like this:
id1 id2 【 食尚 玩家 冰糖 红烧肉 】 ) 五花肉 切块 , 葱

I am trying to capture both english and chinese tokens. Is this the right way to do it?
../mallet-2.0.8/bin/mallet import-file --input inputfile.txt --token-regex '([\p{L}\p{M}]+|[\p{IsHan}]+)' --output inputfile.mallet --keep-sequence --remove-stopwords --stoplist-file stopwords-zh.json

Thanks!

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

3 participants