You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The Language.guess() function mistakes a short english sentence for catalan
To Reproduce
1 - Run this script:
import { Language } from "@nlpjs/language"
const lang = new Language();
const text = 'What is your name?'
console.log(text, lang.guess(text, ['es', 'en', 'ca']))
import{Language}from"@nlpjs/language"constlang=newLanguage();consttext='What is your name?'console.log(text,lang.guess(text).filter((x,i)=>i<3).map((x)=>[x.language,x.score]));
What is your name? [
[ 'Catalan', 0.6079295154185023 ],
[ 'English', 0.5898188937836515 ],
[ 'Tagalog', 0.5824767498776309 ]
What is your name? My name is Akash. [
[ 'Tagalog', 0.8929468157954805 ],
[ 'Igbo', 0.8762839534352888 ],
[ 'English', 0.8621319333485505 ]
]
Language guess mistakes english for catalan. [
[ 'Catalan', 1 ],
[ 'Javanese', 0.9550908467603703 ],
[ 'English', 0.9403496743229345 ]
]
Describe the bug
The Language.guess() function mistakes a short english sentence for catalan
To Reproduce
1 - Run this script:
Output
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: