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

How do I train the system for improving Language.guess and SentimentAnalyzer.getSentiment? #1146

Open
AlbertoMeQ opened this issue Jun 7, 2022 · 1 comment

Comments

@AlbertoMeQ
Copy link

Hello,

I have been trying out the library and it works nicely. The main problems are related to the sentiment not always being correct and, more importantly, that the language guesser fails pretty often.
I read on other tickets that it's possible to train the system to be able to improve the results for those two.

How would it work?

As an example, say I have the following corpuses:

And I have the following snippet as base code for language guessing:

const { Language } = require('node-nlp');

const language = new Language();
const guess = language.guess(
  'When the night has come And the land is dark And the moon is the only light we see',
);
console.log(guess[0]);

and the following for sentiment analysis:

const { SentimentAnalyzer } = require('node-nlp');

const sentiment = new SentimentAnalyzer({ language: 'en' });
sentiment
    .getSentiment('I like cats')
    .then(result => console.log(result));

How would I be able to train them in such a way that "I donot know" doesn't get guessed as "Italian", "It is wonderful" doesn't get guessed as "German", and that the sentiment matches better the actual text?

@AlbertoMeQ
Copy link
Author

Maybe it's not even possible to train it? 🤔

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