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

correcting Arabic and Persian word counting #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arashbm
Copy link

@arashbm arashbm commented Feb 14, 2014

matching Arabic and Persian words. test in regexpal.com

function wordCount(data) {
var pattern = /[a-zA-Z0-9_\u0392-\u03c9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g;
var pattern = /[a-zA-Z0-9_\u0392-\u03c9ـ\u0600-\u06FF]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is dot a word in Arabic and Persian?

@lepture
Copy link
Owner

lepture commented Feb 15, 2014

Hi @arashbm could your head over to https://github.com/yuehu/word-count and add a test case for Arabic and Persian?

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

Successfully merging this pull request may close these issues.

2 participants