Sentiment analysis for your MaxMSP patches using Node For Max using the Sentiment Node.js module.
n4m-sentiment.mp4
Analyses your text using the AFINN-165 wordlist and Emoji Sentiment Ranking to perform sentiment analysis on arbitrary blocks of input text.
Use the script npm install
message the first time you run the patch
- Use the
script start
message every time you run the patch - prepend
analyse
to any text string and send tonode.script
- Inspect the keys and values in the dictionary that is output
- Score: Score calculated by adding the sentiment values of recognized words.
- Comparative: Comparative score of the input string.
- Calculation: An array of words that have a negative or positive valence with their respective AFINN score.
- Token: All the tokens like words or emojis found in the input string.
- Words: List of words from input string that were found in AFINN list.
- Positive: List of positive words in input string that were found in AFINN list.
- Negative: List of negative words in input string that were found in AFINN list.
- try the example sentences in the messages
- type your own
- check out the
n4m-sentiment.js
script