wooorm / franc

Natural language detection
https://wooorm.com/franc/
MIT License
4.15k stars 175 forks source link

Language detection error! #91

Closed tailot closed 4 years ago

tailot commented 4 years ago
#!/usr/bin/env node

var franc = require("franc");

var t = franc('Hola! Cómo estás ?') 

console.log(t) // "epo"

The "epo" output appears to be incorrect.

wooorm commented 4 years ago

See https://github.com/wooorm/franc#whats-not-so-cool-about-franc and other closed issues!

tailot commented 4 years ago

Obviously 10 characters (https://github.com/wooorm/franc/blob/72af9347b1394b54648b50f3935b0c283b7f38a9/packages/franc/index.js#L24) of limit are not enough as default.

wooorm commented 4 years ago

Maybe! Thought about that too, however, that throws an exception, and the fact that it doesn’t work well on small sets is basically at the top of the docs! 🤷‍♂️