compendium-js icon indicating copy to clipboard operation
compendium-js copied to clipboard

Anyway to modify lexicon via script?

Open gnwankpa opened this issue 3 years ago • 0 comments

Hi all, wondering if there is a way to modify the already included lexicon similar to below?

var options = {
    extras: {
      'loss': -2,
      'down': -2,
      'downward': -2,
      'short': -2,
      'long': 2,
      'hold': 2,
      'trade': -2,
  
    }
  };

var result = sentiment.analyze('Dennis what’s your current take on Tesla ? Are you holding long term ? Trading it ?', options);

This would be similar to here -> https://www.npmjs.com/package/sentiment-enhanced#adding-and-overwriting-words

gnwankpa avatar Aug 09 '21 20:08 gnwankpa