Course:CPSC312-2016-Project1-Dionysus

From UBC Wiki

Project Dionysus

Authors: Raymond Luo, Si Hang Xie

Overview

Project Dionysus is a natural language algorithm that evaluates the emotional sentiments of a sentence. This system provides an additional dimension for machines to "understand" human languages by associating words with contexts and emotional values.

Project Breakdown

Project Dionysus has the following major components:

  • A dictionary that includes the major emotional correlations of common words
  • An algorithm that deciphers a natural language sentence into individual terms
  • An algorithm that calculates the contextual information of a sentence

When properly implemented, the system will be capable of the following:

  • Parse a given sentence
  • Determine the major emotional correlations of a common word
  • Determine the general sentiment of a given sentence
  • Be generic enough to allow for modifications of sentiment rules for words

Project Conclusion

As stated in the breakdown, we have a dictionary with the final project. The dictionary itself can be expanded to account for new words as well. The code consists of a parser, and a lookup function that assigns sentiment values to individual words if they exist in the dictionary. Then an algorithm is run to compute the sentiment score of the input.

Prolog is certainly capable of determining the sentiment of a sentence given a plain text input. The code is also generic enough for the inclusion of additional and more complicated rules regarding sentiment. The parser can also be expanded to accept paragraphs instead of single sentences. To break it down, sentiment analysis becomes a math problem in simple terms. Taking a look at our project, positive words increment the score of a sentence while negative words decrement the score. We then have inversion words like "not", which flips the sentiment of the word that comes after it (ie. "not good" is a negative sentiment versus "good", a positive sentiment). We simply total the score of the entire sentence and arrive at the final sentiment score.