Skip to content

Instantly share code, notes, and snippets.

@jfahrenkrug
Last active December 29, 2022 13:06
Show Gist options
  • Save jfahrenkrug/5f6b2ac6086f004caaa7e47b7e9688a8 to your computer and use it in GitHub Desktop.
Save jfahrenkrug/5f6b2ac6086f004caaa7e47b7e9688a8 to your computer and use it in GitHub Desktop.
const Sentiment = require('sentiment')
export class Analyzer {
static analyze(phrase) {
let sentiment = new Sentiment()
let result = sentiment.analyze(phrase)
return result['score']
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment