UNPKG

crowd-sentiment

Version:

javascript port of vader sentiment tool

105 lines (97 loc) 2.16 kB
/** * Copyright 2018 Comcast Cable Communications Management, LLC * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** Javascript port of vader sentiment analysis tool, source: Hutto, C.J. & Gilbert, E.E. (2014). VADER: A Parsimonious Rule-based Model for Sentiment Analysis of Social Media Text. Eighth International Conference on Weblogs and Social Media (ICWSM-14). Ann Arbor, MI, June 2014. key-value format generated with: awk -F\t {print \$1\:$2,} ../vader_lexicon.txt > vader_lexicon.js Note: All occurrences of \ are replaced with \\ Note: Duplicate keys removed, only final occurrence kept because in original python implementation they had precedence: :-p d: d= fav lmao lol muah o.o ok sob x-d x-p xd xp */ export const lexicon = { wrong: 0, bug: 0, problem: 0, issue: 1, working: 0.1, works: 1.5, work: 1.5, fix: 1.5, fixed: 1.5, fixing: 1.5, fixes: 1.5, test: 0.5, tested: 0.5, no: 0, not: 0, missing: -0.25, error: 0, broken: -0.25, incorrect: 0, override: 0, failure: 0, crash: 0, exception: 0, fault: 0, glitch: 0, flaw: 0, vulnerability: 0, warning: 0, conflict: 0, bottleneck: 0, rollback: 0, regression: 0, delay: 0, deprecated: 0, corrupt: 0, timeout: 0, performance: 0, refactoring: 0, patch: 0, discord: 0, slack: 9, channel: 0, github: 0, twitter: 0, attack: -0.5, attacked: -0.5, attacker: -0.1, attackers: -0.1, attacking: -0.3, exclude: 0, loom: 0, unclear: -0.5, avoid: -0.2, empty: 0, null: 0, hide: 0, stealth: 0, yolo: 2 };