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

Languages like Chinese, Japanese, Vietnamese are not separated by blanks #35

Open
wlnirvana opened this issue Apr 1, 2018 · 0 comments

Comments

@wlnirvana
Copy link

The current implementation depends on counting the length of the array after separating texts by white spaces. While this will work for most Indo-European languages, text in some other languages, notably Chinese and Japanese, would fail to be counted.

Concretely, the world count for 你好,世界 is expected to be 5 (or 4 if the comma is ignored), but the current code returns 1.

Is it possible to add one more option for the user to specify whether to split or not before counting?

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