Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

target/*
.vscode/launch.json
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = "https://github.com/ckw017/vader-sentiment-rust"
documentation = "https://docs.rs/vader_sentiment"

[dependencies]
regex = "1.3.1"
regex = "1.5.4"
maplit = "1.0.2"
lazy_static = "1.4.0"
unicase = "2.6.0"
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ lazy_static! {
// check for special case idioms containing lexicon words
static ref SPECIAL_CASE_IDIOMS: HashMap<UniCase<&'static str>, f64> = convert_args!(hashmap!(
"the shit" => 3.0, "the bomb" => 3.0, "bad ass" => 1.5, "badass" => 1.5, "yeah right" => -2.0,
"kiss of death" => -1.5, "to die for" => 3.0));
"kiss of death" => -1.5, "to die for" => 3.0, "beating heart" => 3.1, "broken heart" => -2.9));

static ref ALL_CAPS_RE: Regex = Regex::new(r"^[A-Z\W]+$").unwrap();

Expand Down
2 changes: 2 additions & 0 deletions src/resources/vader_lexicon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ hagn 2.2 0.87178 [2, 2, 3, 2, 1, 3, 4, 1, 2, 2]
hago 1.2 0.4 [1, 2, 1, 1, 1, 2, 1, 1, 1, 1]
hak 1.9 0.7 [3, 1, 2, 2, 1, 2, 3, 2, 1, 2]
hand 2.2 0.87178 [2, 2, 1, 3, 2, 3, 4, 1, 2, 2]
heart 3.2 0.63246 [3, 3, 4, 3, 4, 2, 3, 4, 3, 3]
hearts 3.3 0.48305 [4, 3, 3, 3, 4, 3, 3, 3, 4, 3]
hho1/2k 1.4 1.11355 [1, -1, 2, 3, 1, 1, 1, 2, 3, 1]
hhoj 2.0 1.09545 [4, 2, 1, 1, 2, 1, 1, 4, 2, 2]
hhok 0.9 0.9434 [1, 2, 1, 0, -1, 0, 2, 1, 1, 2]
Expand Down