Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language guess mistakes english for catalan #1364

Open
jcalve opened this issue Dec 12, 2023 · 0 comments
Open

Language guess mistakes english for catalan #1364

jcalve opened this issue Dec 12, 2023 · 0 comments

Comments

@jcalve
Copy link

jcalve commented Dec 12, 2023

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']))

Output

What is your name? [
  { alpha3: 'cat', alpha2: 'ca', language: 'Catalan', score: 1 },
  {
    alpha3: 'eng',
    alpha2: 'en',
    language: 'English',
    score: 0.9702093397745571
  },
  {
    alpha3: 'spa',
    alpha2: 'es',
    language: 'Spanish',
    score: 0.7093397745571659
  }
]

Desktop (please complete the following information):

  • OS: Windows
  • Package version: 4.26.1
  • Node: 16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant