Skip to content

Commit d7503b6

Browse files
authored
Merge pull request #6 from misa-neopix/patch-1
Handle negated words with uppercase letters
2 parents 13dc120 + 7b49bbe commit d7503b6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Analyzer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public function __construct($lexicon_file = "Lexicons/vader_sentiment_lexicon.tx
3232
*/
3333
public function IsNegated($wordToTest, $include_nt = true)
3434
{
35+
$wordToTest = strtolower($wordToTest);
3536
if (in_array($wordToTest, Config::NEGATE)) {
3637
return true;
3738
}

0 commit comments

Comments
 (0)