Sentiment Analysis with Negation Handling

node v14.20.1
version: master
endpointsharetweet
const winkNLP = require( 'wink-nlp' ); const its = require( 'wink-nlp/src/its.js' ); // Use web model for RunKit. const model = require( 'wink-eng-lite-web-model' ); const nlp = winkNLP( model ); const text = 'the movie received critical acclaim. the movie did not attain critical acclaim.'; const doc = nlp.readDoc( text ); // Print each sentiment of each sentence. console.log( doc.sentences().out( its.sentiment ) );
Loading…

no comments

    sign in to comment