Skip to content

Instantly share code, notes, and snippets.

View fullstack-ing's full-sized avatar
💀
Stacked to the MAX

FullStack.ing fullstack-ing

💀
Stacked to the MAX
View GitHub Profile
@fullstack-ing
fullstack-ing / README.md
Last active June 17, 2025 00:15
Sentiment analysis using a AFINN style weighted word dictionary

An example of using a AFINN weighted word dictionary to derive sentiment from a string.

Setup:

  • Save the dictinories to the priv/dictionaries/ folder.
  • Copy the module Feels and put it where you want in your app.
  • Load the dict - dict = Feels.load_dictionary()
  • Call the scroe function - Feels.score_average("This is the best", dict)

Full Example: