about summary refs log tree commit diff stats
path: root/js/sentiment/SCRATCH.md
diff options
context:
space:
mode:
Diffstat (limited to 'js/sentiment/SCRATCH.md')
-rw-r--r--js/sentiment/SCRATCH.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/sentiment/SCRATCH.md b/js/sentiment/SCRATCH.md
new file mode 100644
index 0000000..d5d4ca3
--- /dev/null
+++ b/js/sentiment/SCRATCH.md
@@ -0,0 +1,8 @@
+<https://getthematic.com/sentiment-analysis#how-does-sentiment-analysis-work>
+
+# Rule-based sentiment analysis works like this:
+
+1. “Lexicons” or lists of positive and negative words are created. These are words that are used to describe sentiment. For example, positive lexicons might include “fast”, “affordable”, and “user-friendly“. Negative lexicons could include “slow”, “pricey”, and “complicated”.
+2. Before text can be analyzed it needs to be prepared. Several processes are used to format the text in a way that a machine can understand. Tokenization breaks up text into small chunks called tokens. Sentence tokenization splits up text into sentences. Word tokenization separates words in a sentence. For example, “the best customer service” would be split into “the”, “best”, and “customer service”. Lemmatization can be used to transforms words back to their root form. A lemma is the root form of a word. For example, the root form of “is, are, am, were, and been” is “be”. We also want to exclude things which are known but are not useful for sentiment analysis. So another important process is stopword removal which takes out common words like “for, at, a, to”. These words have little or no semantic value in the sentence. Applying these processes makes it easier for computers to understand the text.
+3. A computer counts the number of positive or negative words in a particular text. A special rule can make sure that negated words, e.g. “not easy”, are counted as opposites.
+4. The final step is to calculate the overall sentiment score for the text. As mentioned previously, this could be based on a scale of -100 to 100. In this case a score of 100 would be the highest score possible for positive sentiment. A score of 0 would indicate neutral sentiment. The score can also be expressed as a percentage, ranging from 0% as negative and 100% as positive.
\ No newline at end of file