Skip to content

Commit

Permalink
Merge pull request #154 from kant/patch-1
Browse files Browse the repository at this point in the history
Typo on #160, #164
  • Loading branch information
thisandagain authored Aug 22, 2019
2 parents 222d52e + 4ac95a7 commit 1bdb021
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ console.dir(result); // Score: 7, Comparative: 1.75

## How it works
### AFINN
AFINN is a list of words rated for valence with an integer between minus five (negative) and plus five (positive). Sentiment analysis is performed by cross-checking the string tokens(words, emojis) with the AFINN list and getting their respective scores. The comparative score is simply: `sum of each token / number of tokens`. So for example let's take the following:
AFINN is a list of words rated for valence with an integer between minus five (negative) and plus five (positive). Sentiment analysis is performed by cross-checking the string tokens (words, emojis) with the AFINN list and getting their respective scores. The comparative score is simply: `sum of each token / number of tokens`. So for example let's take the following:

`I love cats, but I am allergic to them.`

Expand Down Expand Up @@ -157,11 +157,11 @@ That string results in the following:
```

* Returned Objects
* __Score__: Score calculated by adding the sentiment values of recongnized words.
* __Score__: Score calculated by adding the sentiment values of recognized words.
* __Comparative__: Comparative score of the input string.
* __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 postive words in 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.

In this case, love has a value of 3, allergic has a value of -2, and the remaining tokens are neutral with a value of 0. Because the string has 9 tokens the resulting comparative score looks like:
Expand Down

0 comments on commit 1bdb021

Please sign in to comment.