wooorm / franc

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

Invalid results for English #90

Closed evenfrost closed 4 years ago

evenfrost commented 4 years ago

I'm trying to detect this text: Can you help me please? as English, but in the top 10 entries of the resulting array there is no English language at all:

[
  [ 'zyb', 1 ],
  [ 'tur', 0.8181194234728895 ],
  [ 'zlm', 0.8105696636925188 ],
  [ 'som', 0.8016472203157172 ],
  [ 'mad', 0.787920384351407 ],
  [ 'ind', 0.7762525737817433 ],
  [ 'fra', 0.7762525737817433 ],
  [ 'nld', 0.7611530542210021 ],
  [ 'hms', 0.752916952642416 ],
  [ 'srp', 0.7501715854495539 ]
]

I'm using latest franc-min package and detecting with franc.all(text, { minLength: 5 }).

wooorm commented 4 years ago

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