wooorm / franc

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

Language detection error! #91

Closed tailot closed 3 years ago

tailot commented 3 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 3 years ago

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

tailot commented 3 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 3 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! 🤷‍♂️