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

Split longer word, rather than word by word #18

Closed
minhtringo141 opened this issue Jul 14, 2017 · 2 comments
Closed

Split longer word, rather than word by word #18

minhtringo141 opened this issue Jul 14, 2017 · 2 comments

Comments

@minhtringo141
Copy link

Firstly, greatly appreciate your library, it's very useful and easy to to use. But when using i've a trouble,.In Vietnamese vocabulary, a meaning word sometimes includes more than 1 word. For example, sentence "I live in Ha Noi", i want "Ha Noi" will stand together after being split. Is there any way or any parameter to handle this case ? Best wishes !

@taku910
Copy link
Collaborator

taku910 commented Jul 15, 2017

Thank you for using sentencepiece.

spm_train --split_by_whitespace=false allows you to extract pieces crossing whitespaces. So, "Ha Noi" may be extracted if it appears frequently in the corpus.

However, my experience says that the whitespace constraint is reasonably useful to extract meaningful pieces.

@minhtringo141
Copy link
Author

It works for me, thanks you so much ! Best wishes !

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

2 participants