Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Problem in detecting Farsi Language #5

milani opened this Issue Jan 22, 2012 · 1 comment


None yet
2 participants

milani commented Jan 22, 2012


I tried to use this project in order to detect Farsi ( Persian ) Language. It seems it does not work.

I think the problem is in ord function ( phpjs.js:224 ) or in _next_char ( Parser.js:363 ). It does not recognize farsi characters. here is my code:

var ld = require('node-language-detect');

var obj = new ld();

console.log(obj.detect('سلام. این یک متن فارسی است که باید توسط این ماژول شناسایی شود.'));

// it returns []


FGRibreau commented Jan 23, 2012

If it really come from the ord function, please report the bug to phpjs.

Moreover, maybe you should try node-cld . But it seems that it doesn't handle farsi.

@FGRibreau FGRibreau closed this Jan 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment