Skip to content

Commit

Permalink
Merge pull request #6 from misa-neopix/patch-1
Browse files Browse the repository at this point in the history
Handle negated words with uppercase letters
  • Loading branch information
davmixcool authored Sep 17, 2020
2 parents 13dc120 + 7b49bbe commit d7503b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Analyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function __construct($lexicon_file = "Lexicons/vader_sentiment_lexicon.tx
*/
public function IsNegated($wordToTest, $include_nt = true)
{
$wordToTest = strtolower($wordToTest);
if (in_array($wordToTest, Config::NEGATE)) {
return true;
}
Expand Down

0 comments on commit d7503b6

Please sign in to comment.