{"id":399,"date":"2015-09-07T17:29:04","date_gmt":"2015-09-07T21:29:04","guid":{"rendered":"http:\/\/csclub.uwaterloo.ca\/~k55chen\/?p=399"},"modified":"2019-08-08T11:31:54","modified_gmt":"2019-08-08T15:31:54","slug":"get-tone-from-financial-texts","status":"publish","type":"post","link":"https:\/\/www.kaichen.work\/?p=399","title":{"rendered":"Use Python to calculate the tone of financial articles"},"content":{"rendered":"<p><strong>[Update on 2019-03-01]<\/strong> I completely rewrite the Python program. The updates include:<\/p>\n<ul>\n<li>I include two domain-specific dictionaries: Loughran and McDonald&#8217;s and Henry&#8217;s dictionaries, and you can choose which dictionary to use.<\/li>\n<li>I add negation check as suggested by Loughran and McDonald (2011). That is, any occurrence of negate words (e.g., isn&#8217;t, not, never) within three words preceding a positive word will flip that positive word into a negative one. Negation check only applies to positive words because Loughran and McDonald (2011) suggest that double negation (i.e., a negate word precedes a negative word) is not common. I expand their negate word list though, since theirs seem incomplete. In my sample of 90,000+ press releases, negation check finds that 5.7% of press releases have positive word(s) with a preceding negate word.<\/li>\n<\/ul>\n<p>Please note:<\/p>\n<ul>\n<li>The Python program first transform an article into a bag of words in their original order. Different research questions may define &#8220;word&#8221; differently. For example, some research questions only look at alphabetic words (i.e., remove all numbers in an article). I use this definition in the following Python program. But you may want to change this to suit your research question. In addition, there are many nuances in splitting sentences into words. The splitting method in the following Python program is simple but imperfect of course.<\/li>\n<li>To use the Python program, you have to know how to assign the full text of an article to the variable `article` (using a loop) and how to output the results into a database-like file (Sqlite or CSV).<\/li>\n<\/ul>\n<p>I acknowledge the work done by C.J. Hutto (see his work at <a href=\"https:\/\/github.com\/cjhutto\/vaderSentiment\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub<\/a>).<\/p>\n<pre class=\"lang:python decode:true\">import re\r\n\r\n# Loughran and McDonald Sentiment Word Lists (https:\/\/sraf.nd.edu\/textual-analysis\/resources\/)\r\nlmdict = {'Negative': ['abandon', 'abandoned', 'abandoning', 'abandonment', 'abandonments', 'abandons', 'abdicated',\r\n                       'abdicates', 'abdicating', 'abdication', 'abdications', 'aberrant', 'aberration', 'aberrational',\r\n                       'aberrations', 'abetting', 'abnormal', 'abnormalities', 'abnormality', 'abnormally', 'abolish',\r\n                       'abolished', 'abolishes', 'abolishing', 'abrogate', 'abrogated', 'abrogates', 'abrogating',\r\n                       'abrogation', 'abrogations', 'abrupt', 'abruptly', 'abruptness', 'absence', 'absences',\r\n                       'absenteeism', 'abuse', 'abused', 'abuses', 'abusing', 'abusive', 'abusively', 'abusiveness',\r\n                       'accident', 'accidental', 'accidentally', 'accidents', 'accusation', 'accusations', 'accuse',\r\n                       'accused', 'accuses', 'accusing', 'acquiesce', 'acquiesced', 'acquiesces', 'acquiescing',\r\n                       'acquit', 'acquits', 'acquittal', 'acquittals', 'acquitted', 'acquitting', 'adulterate',\r\n                       'adulterated', 'adulterating', 'adulteration', 'adulterations', 'adversarial', 'adversaries',\r\n                       'adversary', 'adverse', 'adversely', 'adversities', 'adversity', 'aftermath', 'aftermaths',\r\n                       'against', 'aggravate', 'aggravated', 'aggravates', 'aggravating', 'aggravation', 'aggravations',\r\n                       'alerted', 'alerting', 'alienate', 'alienated', 'alienates', 'alienating', 'alienation',\r\n                       'alienations', 'allegation', 'allegations', 'allege', 'alleged', 'allegedly', 'alleges',\r\n                       'alleging', 'annoy', 'annoyance', 'annoyances', 'annoyed', 'annoying', 'annoys', 'annul',\r\n                       'annulled', 'annulling', 'annulment', 'annulments', 'annuls', 'anomalies', 'anomalous',\r\n                       'anomalously', 'anomaly', 'anticompetitive', 'antitrust', 'argue', 'argued', 'arguing',\r\n                       'argument', 'argumentative', 'arguments', 'arrearage', 'arrearages', 'arrears', 'arrest',\r\n                       'arrested', 'arrests', 'artificially', 'assault', 'assaulted', 'assaulting', 'assaults',\r\n                       'assertions', 'attrition', 'aversely', 'backdating', 'bad', 'bail', 'bailout', 'balk', 'balked',\r\n                       'bankrupt', 'bankruptcies', 'bankruptcy', 'bankrupted', 'bankrupting', 'bankrupts', 'bans',\r\n                       'barred', 'barrier', 'barriers', 'bottleneck', 'bottlenecks', 'boycott', 'boycotted',\r\n                       'boycotting', 'boycotts', 'breach', 'breached', 'breaches', 'breaching', 'break', 'breakage',\r\n                       'breakages', 'breakdown', 'breakdowns', 'breaking', 'breaks', 'bribe', 'bribed', 'briberies',\r\n                       'bribery', 'bribes', 'bribing', 'bridge', 'broken', 'burden', 'burdened', 'burdening', 'burdens',\r\n                       'burdensome', 'burned', 'calamities', 'calamitous', 'calamity', 'cancel', 'canceled',\r\n                       'canceling', 'cancellation', 'cancellations', 'cancelled', 'cancelling', 'cancels', 'careless',\r\n                       'carelessly', 'carelessness', 'catastrophe', 'catastrophes', 'catastrophic', 'catastrophically',\r\n                       'caution', 'cautionary', 'cautioned', 'cautioning', 'cautions', 'cease', 'ceased', 'ceases',\r\n                       'ceasing', 'censure', 'censured', 'censures', 'censuring', 'challenge', 'challenged',\r\n                       'challenges', 'challenging', 'chargeoffs', 'circumvent', 'circumvented', 'circumventing',\r\n                       'circumvention', 'circumventions', 'circumvents', 'claiming', 'claims', 'clawback', 'closed',\r\n                       'closeout', 'closeouts', 'closing', 'closings', 'closure', 'closures', 'coerce', 'coerced',\r\n                       'coerces', 'coercing', 'coercion', 'coercive', 'collapse', 'collapsed', 'collapses',\r\n                       'collapsing', 'collision', 'collisions', 'collude', 'colluded', 'colludes', 'colluding',\r\n                       'collusion', 'collusions', 'collusive', 'complain', 'complained', 'complaining', 'complains',\r\n                       'complaint', 'complaints', 'complicate', 'complicated', 'complicates', 'complicating',\r\n                       'complication', 'complications', 'compulsion', 'concealed', 'concealing', 'concede', 'conceded',\r\n                       'concedes', 'conceding', 'concern', 'concerned', 'concerns', 'conciliating', 'conciliation',\r\n                       'conciliations', 'condemn', 'condemnation', 'condemnations', 'condemned', 'condemning',\r\n                       'condemns', 'condone', 'condoned', 'confess', 'confessed', 'confesses', 'confessing',\r\n                       'confession', 'confine', 'confined', 'confinement', 'confinements', 'confines', 'confining',\r\n                       'confiscate', 'confiscated', 'confiscates', 'confiscating', 'confiscation', 'confiscations',\r\n                       'conflict', 'conflicted', 'conflicting', 'conflicts', 'confront', 'confrontation',\r\n                       'confrontational', 'confrontations', 'confronted', 'confronting', 'confronts', 'confuse',\r\n                       'confused', 'confuses', 'confusing', 'confusingly', 'confusion', 'conspiracies', 'conspiracy',\r\n                       'conspirator', 'conspiratorial', 'conspirators', 'conspire', 'conspired', 'conspires',\r\n                       'conspiring', 'contempt', 'contend', 'contended', 'contending', 'contends', 'contention',\r\n                       'contentions', 'contentious', 'contentiously', 'contested', 'contesting', 'contraction',\r\n                       'contractions', 'contradict', 'contradicted', 'contradicting', 'contradiction', 'contradictions',\r\n                       'contradictory', 'contradicts', 'contrary', 'controversial', 'controversies', 'controversy',\r\n                       'convict', 'convicted', 'convicting', 'conviction', 'convictions', 'corrected', 'correcting',\r\n                       'correction', 'corrections', 'corrects', 'corrupt', 'corrupted', 'corrupting', 'corruption',\r\n                       'corruptions', 'corruptly', 'corruptness', 'costly', 'counterclaim', 'counterclaimed',\r\n                       'counterclaiming', 'counterclaims', 'counterfeit', 'counterfeited', 'counterfeiter',\r\n                       'counterfeiters', 'counterfeiting', 'counterfeits', 'countermeasure', 'countermeasures', 'crime',\r\n                       'crimes', 'criminal', 'criminally', 'criminals', 'crises', 'crisis', 'critical', 'critically',\r\n                       'criticism', 'criticisms', 'criticize', 'criticized', 'criticizes', 'criticizing', 'crucial',\r\n                       'crucially', 'culpability', 'culpable', 'culpably', 'cumbersome', 'curtail', 'curtailed',\r\n                       'curtailing', 'curtailment', 'curtailments', 'curtails', 'cut', 'cutback', 'cutbacks',\r\n                       'cyberattack', 'cyberattacks', 'cyberbullying', 'cybercrime', 'cybercrimes', 'cybercriminal',\r\n                       'cybercriminals', 'damage', 'damaged', 'damages', 'damaging', 'dampen', 'dampened', 'danger',\r\n                       'dangerous', 'dangerously', 'dangers', 'deadlock', 'deadlocked', 'deadlocking', 'deadlocks',\r\n                       'deadweight', 'deadweights', 'debarment', 'debarments', 'debarred', 'deceased', 'deceit',\r\n                       'deceitful', 'deceitfulness', 'deceive', 'deceived', 'deceives', 'deceiving', 'deception',\r\n                       'deceptions', 'deceptive', 'deceptively', 'decline', 'declined', 'declines', 'declining',\r\n                       'deface', 'defaced', 'defacement', 'defamation', 'defamations', 'defamatory', 'defame',\r\n                       'defamed', 'defames', 'defaming', 'default', 'defaulted', 'defaulting', 'defaults', 'defeat',\r\n                       'defeated', 'defeating', 'defeats', 'defect', 'defective', 'defects', 'defend', 'defendant',\r\n                       'defendants', 'defended', 'defending', 'defends', 'defensive', 'defer', 'deficiencies',\r\n                       'deficiency', 'deficient', 'deficit', 'deficits', 'defraud', 'defrauded', 'defrauding',\r\n                       'defrauds', 'defunct', 'degradation', 'degradations', 'degrade', 'degraded', 'degrades',\r\n                       'degrading', 'delay', 'delayed', 'delaying', 'delays', 'deleterious', 'deliberate',\r\n                       'deliberated', 'deliberately', 'delinquencies', 'delinquency', 'delinquent', 'delinquently',\r\n                       'delinquents', 'delist', 'delisted', 'delisting', 'delists', 'demise', 'demised', 'demises',\r\n                       'demising', 'demolish', 'demolished', 'demolishes', 'demolishing', 'demolition', 'demolitions',\r\n                       'demote', 'demoted', 'demotes', 'demoting', 'demotion', 'demotions', 'denial', 'denials',\r\n                       'denied', 'denies', 'denigrate', 'denigrated', 'denigrates', 'denigrating', 'denigration',\r\n                       'deny', 'denying', 'deplete', 'depleted', 'depletes', 'depleting', 'depletion', 'depletions',\r\n                       'deprecation', 'depress', 'depressed', 'depresses', 'depressing', 'deprivation', 'deprive',\r\n                       'deprived', 'deprives', 'depriving', 'derelict', 'dereliction', 'derogatory', 'destabilization',\r\n                       'destabilize', 'destabilized', 'destabilizing', 'destroy', 'destroyed', 'destroying', 'destroys',\r\n                       'destruction', 'destructive', 'detain', 'detained', 'detention', 'detentions', 'deter',\r\n                       'deteriorate', 'deteriorated', 'deteriorates', 'deteriorating', 'deterioration',\r\n                       'deteriorations', 'deterred', 'deterrence', 'deterrences', 'deterrent', 'deterrents',\r\n                       'deterring', 'deters', 'detract', 'detracted', 'detracting', 'detriment', 'detrimental',\r\n                       'detrimentally', 'detriments', 'devalue', 'devalued', 'devalues', 'devaluing', 'devastate',\r\n                       'devastated', 'devastating', 'devastation', 'deviate', 'deviated', 'deviates', 'deviating',\r\n                       'deviation', 'deviations', 'devolve', 'devolved', 'devolves', 'devolving', 'difficult',\r\n                       'difficulties', 'difficultly', 'difficulty', 'diminish', 'diminished', 'diminishes',\r\n                       'diminishing', 'diminution', 'disadvantage', 'disadvantaged', 'disadvantageous', 'disadvantages',\r\n                       'disaffiliation', 'disagree', 'disagreeable', 'disagreed', 'disagreeing', 'disagreement',\r\n                       'disagreements', 'disagrees', 'disallow', 'disallowance', 'disallowances', 'disallowed',\r\n                       'disallowing', 'disallows', 'disappear', 'disappearance', 'disappearances', 'disappeared',\r\n                       'disappearing', 'disappears', 'disappoint', 'disappointed', 'disappointing', 'disappointingly',\r\n                       'disappointment', 'disappointments', 'disappoints', 'disapproval', 'disapprovals', 'disapprove',\r\n                       'disapproved', 'disapproves', 'disapproving', 'disassociates', 'disassociating',\r\n                       'disassociation', 'disassociations', 'disaster', 'disasters', 'disastrous', 'disastrously',\r\n                       'disavow', 'disavowal', 'disavowed', 'disavowing', 'disavows', 'disciplinary', 'disclaim',\r\n                       'disclaimed', 'disclaimer', 'disclaimers', 'disclaiming', 'disclaims', 'disclose', 'disclosed',\r\n                       'discloses', 'disclosing', 'discontinuance', 'discontinuances', 'discontinuation',\r\n                       'discontinuations', 'discontinue', 'discontinued', 'discontinues', 'discontinuing', 'discourage',\r\n                       'discouraged', 'discourages', 'discouraging', 'discredit', 'discredited', 'discrediting',\r\n                       'discredits', 'discrepancies', 'discrepancy', 'disfavor', 'disfavored', 'disfavoring',\r\n                       'disfavors', 'disgorge', 'disgorged', 'disgorgement', 'disgorgements', 'disgorges', 'disgorging',\r\n                       'disgrace', 'disgraceful', 'disgracefully', 'dishonest', 'dishonestly', 'dishonesty', 'dishonor',\r\n                       'dishonorable', 'dishonorably', 'dishonored', 'dishonoring', 'dishonors', 'disincentives',\r\n                       'disinterested', 'disinterestedly', 'disinterestedness', 'disloyal', 'disloyally', 'disloyalty',\r\n                       'dismal', 'dismally', 'dismiss', 'dismissal', 'dismissals', 'dismissed', 'dismisses',\r\n                       'dismissing', 'disorderly', 'disparage', 'disparaged', 'disparagement', 'disparagements',\r\n                       'disparages', 'disparaging', 'disparagingly', 'disparities', 'disparity', 'displace',\r\n                       'displaced', 'displacement', 'displacements', 'displaces', 'displacing', 'dispose', 'dispossess',\r\n                       'dispossessed', 'dispossesses', 'dispossessing', 'disproportion', 'disproportional',\r\n                       'disproportionate', 'disproportionately', 'dispute', 'disputed', 'disputes', 'disputing',\r\n                       'disqualification', 'disqualifications', 'disqualified', 'disqualifies', 'disqualify',\r\n                       'disqualifying', 'disregard', 'disregarded', 'disregarding', 'disregards', 'disreputable',\r\n                       'disrepute', 'disrupt', 'disrupted', 'disrupting', 'disruption', 'disruptions', 'disruptive',\r\n                       'disrupts', 'dissatisfaction', 'dissatisfied', 'dissent', 'dissented', 'dissenter', 'dissenters',\r\n                       'dissenting', 'dissents', 'dissident', 'dissidents', 'dissolution', 'dissolutions', 'distort',\r\n                       'distorted', 'distorting', 'distortion', 'distortions', 'distorts', 'distract', 'distracted',\r\n                       'distracting', 'distraction', 'distractions', 'distracts', 'distress', 'distressed', 'disturb',\r\n                       'disturbance', 'disturbances', 'disturbed', 'disturbing', 'disturbs', 'diversion', 'divert',\r\n                       'diverted', 'diverting', 'diverts', 'divest', 'divested', 'divesting', 'divestiture',\r\n                       'divestitures', 'divestment', 'divestments', 'divests', 'divorce', 'divorced', 'divulge',\r\n                       'divulged', 'divulges', 'divulging', 'doubt', 'doubted', 'doubtful', 'doubts', 'downgrade',\r\n                       'downgraded', 'downgrades', 'downgrading', 'downsize', 'downsized', 'downsizes', 'downsizing',\r\n                       'downsizings', 'downtime', 'downtimes', 'downturn', 'downturns', 'downward', 'downwards', 'drag',\r\n                       'drastic', 'drastically', 'drawback', 'drawbacks', 'dropped', 'drought', 'droughts', 'duress',\r\n                       'dysfunction', 'dysfunctional', 'dysfunctions', 'easing', 'egregious', 'egregiously', 'embargo',\r\n                       'embargoed', 'embargoes', 'embargoing', 'embarrass', 'embarrassed', 'embarrasses',\r\n                       'embarrassing', 'embarrassment', 'embarrassments', 'embezzle', 'embezzled', 'embezzlement',\r\n                       'embezzlements', 'embezzler', 'embezzles', 'embezzling', 'encroach', 'encroached', 'encroaches',\r\n                       'encroaching', 'encroachment', 'encroachments', 'encumber', 'encumbered', 'encumbering',\r\n                       'encumbers', 'encumbrance', 'encumbrances', 'endanger', 'endangered', 'endangering',\r\n                       'endangerment', 'endangers', 'enjoin', 'enjoined', 'enjoining', 'enjoins', 'erode', 'eroded',\r\n                       'erodes', 'eroding', 'erosion', 'erratic', 'erratically', 'erred', 'erring', 'erroneous',\r\n                       'erroneously', 'error', 'errors', 'errs', 'escalate', 'escalated', 'escalates', 'escalating',\r\n                       'evade', 'evaded', 'evades', 'evading', 'evasion', 'evasions', 'evasive', 'evict', 'evicted',\r\n                       'evicting', 'eviction', 'evictions', 'evicts', 'exacerbate', 'exacerbated', 'exacerbates',\r\n                       'exacerbating', 'exacerbation', 'exacerbations', 'exaggerate', 'exaggerated', 'exaggerates',\r\n                       'exaggerating', 'exaggeration', 'excessive', 'excessively', 'exculpate', 'exculpated',\r\n                       'exculpates', 'exculpating', 'exculpation', 'exculpations', 'exculpatory', 'exonerate',\r\n                       'exonerated', 'exonerates', 'exonerating', 'exoneration', 'exonerations', 'exploit',\r\n                       'exploitation', 'exploitations', 'exploitative', 'exploited', 'exploiting', 'exploits', 'expose',\r\n                       'exposed', 'exposes', 'exposing', 'expropriate', 'expropriated', 'expropriates', 'expropriating',\r\n                       'expropriation', 'expropriations', 'expulsion', 'expulsions', 'extenuating', 'fail', 'failed',\r\n                       'failing', 'failings', 'fails', 'failure', 'failures', 'fallout', 'false', 'falsely',\r\n                       'falsification', 'falsifications', 'falsified', 'falsifies', 'falsify', 'falsifying', 'falsity',\r\n                       'fatalities', 'fatality', 'fatally', 'fault', 'faulted', 'faults', 'faulty', 'fear', 'fears',\r\n                       'felonies', 'felonious', 'felony', 'fictitious', 'fined', 'fines', 'fired', 'firing', 'flaw',\r\n                       'flawed', 'flaws', 'forbid', 'forbidden', 'forbidding', 'forbids', 'force', 'forced', 'forcing',\r\n                       'foreclose', 'foreclosed', 'forecloses', 'foreclosing', 'foreclosure', 'foreclosures', 'forego',\r\n                       'foregoes', 'foregone', 'forestall', 'forestalled', 'forestalling', 'forestalls', 'forfeit',\r\n                       'forfeited', 'forfeiting', 'forfeits', 'forfeiture', 'forfeitures', 'forgers', 'forgery',\r\n                       'fraud', 'frauds', 'fraudulence', 'fraudulent', 'fraudulently', 'frivolous', 'frivolously',\r\n                       'frustrate', 'frustrated', 'frustrates', 'frustrating', 'frustratingly', 'frustration',\r\n                       'frustrations', 'fugitive', 'fugitives', 'gratuitous', 'gratuitously', 'grievance', 'grievances',\r\n                       'grossly', 'groundless', 'guilty', 'halt', 'halted', 'hamper', 'hampered', 'hampering',\r\n                       'hampers', 'harass', 'harassed', 'harassing', 'harassment', 'hardship', 'hardships', 'harm',\r\n                       'harmed', 'harmful', 'harmfully', 'harming', 'harms', 'harsh', 'harsher', 'harshest', 'harshly',\r\n                       'harshness', 'hazard', 'hazardous', 'hazards', 'hinder', 'hindered', 'hindering', 'hinders',\r\n                       'hindrance', 'hindrances', 'hostile', 'hostility', 'hurt', 'hurting', 'idle', 'idled', 'idling',\r\n                       'ignore', 'ignored', 'ignores', 'ignoring', 'ill', 'illegal', 'illegalities', 'illegality',\r\n                       'illegally', 'illegible', 'illicit', 'illicitly', 'illiquid', 'illiquidity', 'imbalance',\r\n                       'imbalances', 'immature', 'immoral', 'impair', 'impaired', 'impairing', 'impairment',\r\n                       'impairments', 'impairs', 'impasse', 'impasses', 'impede', 'impeded', 'impedes', 'impediment',\r\n                       'impediments', 'impeding', 'impending', 'imperative', 'imperfection', 'imperfections', 'imperil',\r\n                       'impermissible', 'implicate', 'implicated', 'implicates', 'implicating', 'impossibility',\r\n                       'impossible', 'impound', 'impounded', 'impounding', 'impounds', 'impracticable', 'impractical',\r\n                       'impracticalities', 'impracticality', 'imprisonment', 'improper', 'improperly', 'improprieties',\r\n                       'impropriety', 'imprudent', 'imprudently', 'inability', 'inaccessible', 'inaccuracies',\r\n                       'inaccuracy', 'inaccurate', 'inaccurately', 'inaction', 'inactions', 'inactivate', 'inactivated',\r\n                       'inactivates', 'inactivating', 'inactivation', 'inactivations', 'inactivity', 'inadequacies',\r\n                       'inadequacy', 'inadequate', 'inadequately', 'inadvertent', 'inadvertently', 'inadvisability',\r\n                       'inadvisable', 'inappropriate', 'inappropriately', 'inattention', 'incapable', 'incapacitated',\r\n                       'incapacity', 'incarcerate', 'incarcerated', 'incarcerates', 'incarcerating', 'incarceration',\r\n                       'incarcerations', 'incidence', 'incidences', 'incident', 'incidents', 'incompatibilities',\r\n                       'incompatibility', 'incompatible', 'incompetence', 'incompetency', 'incompetent',\r\n                       'incompetently', 'incompetents', 'incomplete', 'incompletely', 'incompleteness', 'inconclusive',\r\n                       'inconsistencies', 'inconsistency', 'inconsistent', 'inconsistently', 'inconvenience',\r\n                       'inconveniences', 'inconvenient', 'incorrect', 'incorrectly', 'incorrectness', 'indecency',\r\n                       'indecent', 'indefeasible', 'indefeasibly', 'indict', 'indictable', 'indicted', 'indicting',\r\n                       'indictment', 'indictments', 'ineffective', 'ineffectively', 'ineffectiveness', 'inefficiencies',\r\n                       'inefficiency', 'inefficient', 'inefficiently', 'ineligibility', 'ineligible', 'inequitable',\r\n                       'inequitably', 'inequities', 'inequity', 'inevitable', 'inexperience', 'inexperienced',\r\n                       'inferior', 'inflicted', 'infraction', 'infractions', 'infringe', 'infringed', 'infringement',\r\n                       'infringements', 'infringes', 'infringing', 'inhibited', 'inimical', 'injunction', 'injunctions',\r\n                       'injure', 'injured', 'injures', 'injuries', 'injuring', 'injurious', 'injury', 'inordinate',\r\n                       'inordinately', 'inquiry', 'insecure', 'insensitive', 'insolvencies', 'insolvency', 'insolvent',\r\n                       'instability', 'insubordination', 'insufficiency', 'insufficient', 'insufficiently',\r\n                       'insurrection', 'insurrections', 'intentional', 'interfere', 'interfered', 'interference',\r\n                       'interferences', 'interferes', 'interfering', 'intermittent', 'intermittently', 'interrupt',\r\n                       'interrupted', 'interrupting', 'interruption', 'interruptions', 'interrupts', 'intimidation',\r\n                       'intrusion', 'invalid', 'invalidate', 'invalidated', 'invalidates', 'invalidating',\r\n                       'invalidation', 'invalidity', 'investigate', 'investigated', 'investigates', 'investigating',\r\n                       'investigation', 'investigations', 'involuntarily', 'involuntary', 'irreconcilable',\r\n                       'irreconcilably', 'irrecoverable', 'irrecoverably', 'irregular', 'irregularities',\r\n                       'irregularity', 'irregularly', 'irreparable', 'irreparably', 'irreversible', 'jeopardize',\r\n                       'jeopardized', 'justifiable', 'kickback', 'kickbacks', 'knowingly', 'lack', 'lacked', 'lacking',\r\n                       'lackluster', 'lacks', 'lag', 'lagged', 'lagging', 'lags', 'lapse', 'lapsed', 'lapses',\r\n                       'lapsing', 'late', 'laundering', 'layoff', 'layoffs', 'lie', 'limitation', 'limitations',\r\n                       'lingering', 'liquidate', 'liquidated', 'liquidates', 'liquidating', 'liquidation',\r\n                       'liquidations', 'liquidator', 'liquidators', 'litigant', 'litigants', 'litigate', 'litigated',\r\n                       'litigates', 'litigating', 'litigation', 'litigations', 'lockout', 'lockouts', 'lose', 'loses',\r\n                       'losing', 'loss', 'losses', 'lost', 'lying', 'malfeasance', 'malfunction', 'malfunctioned',\r\n                       'malfunctioning', 'malfunctions', 'malice', 'malicious', 'maliciously', 'malpractice',\r\n                       'manipulate', 'manipulated', 'manipulates', 'manipulating', 'manipulation', 'manipulations',\r\n                       'manipulative', 'markdown', 'markdowns', 'misapplication', 'misapplications', 'misapplied',\r\n                       'misapplies', 'misapply', 'misapplying', 'misappropriate', 'misappropriated', 'misappropriates',\r\n                       'misappropriating', 'misappropriation', 'misappropriations', 'misbranded', 'miscalculate',\r\n                       'miscalculated', 'miscalculates', 'miscalculating', 'miscalculation', 'miscalculations',\r\n                       'mischaracterization', 'mischief', 'misclassification', 'misclassifications', 'misclassified',\r\n                       'misclassify', 'miscommunication', 'misconduct', 'misdated', 'misdemeanor', 'misdemeanors',\r\n                       'misdirected', 'mishandle', 'mishandled', 'mishandles', 'mishandling', 'misinform',\r\n                       'misinformation', 'misinformed', 'misinforming', 'misinforms', 'misinterpret',\r\n                       'misinterpretation', 'misinterpretations', 'misinterpreted', 'misinterpreting', 'misinterprets',\r\n                       'misjudge', 'misjudged', 'misjudges', 'misjudging', 'misjudgment', 'misjudgments', 'mislabel',\r\n                       'mislabeled', 'mislabeling', 'mislabelled', 'mislabels', 'mislead', 'misleading', 'misleadingly',\r\n                       'misleads', 'misled', 'mismanage', 'mismanaged', 'mismanagement', 'mismanages', 'mismanaging',\r\n                       'mismatch', 'mismatched', 'mismatches', 'mismatching', 'misplaced', 'misprice', 'mispricing',\r\n                       'mispricings', 'misrepresent', 'misrepresentation', 'misrepresentations', 'misrepresented',\r\n                       'misrepresenting', 'misrepresents', 'miss', 'missed', 'misses', 'misstate', 'misstated',\r\n                       'misstatement', 'misstatements', 'misstates', 'misstating', 'misstep', 'missteps', 'mistake',\r\n                       'mistaken', 'mistakenly', 'mistakes', 'mistaking', 'mistrial', 'mistrials', 'misunderstand',\r\n                       'misunderstanding', 'misunderstandings', 'misunderstood', 'misuse', 'misused', 'misuses',\r\n                       'misusing', 'monopolistic', 'monopolists', 'monopolization', 'monopolize', 'monopolized',\r\n                       'monopolizes', 'monopolizing', 'monopoly', 'moratoria', 'moratorium', 'moratoriums',\r\n                       'mothballed', 'mothballing', 'negative', 'negatively', 'negatives', 'neglect', 'neglected',\r\n                       'neglectful', 'neglecting', 'neglects', 'negligence', 'negligences', 'negligent', 'negligently',\r\n                       'nonattainment', 'noncompetitive', 'noncompliance', 'noncompliances', 'noncompliant',\r\n                       'noncomplying', 'nonconforming', 'nonconformities', 'nonconformity', 'nondisclosure',\r\n                       'nonfunctional', 'nonpayment', 'nonpayments', 'nonperformance', 'nonperformances',\r\n                       'nonperforming', 'nonproducing', 'nonproductive', 'nonrecoverable', 'nonrenewal', 'nuisance',\r\n                       'nuisances', 'nullification', 'nullifications', 'nullified', 'nullifies', 'nullify',\r\n                       'nullifying', 'objected', 'objecting', 'objection', 'objectionable', 'objectionably',\r\n                       'objections', 'obscene', 'obscenity', 'obsolescence', 'obsolete', 'obstacle', 'obstacles',\r\n                       'obstruct', 'obstructed', 'obstructing', 'obstruction', 'obstructions', 'offence', 'offences',\r\n                       'offend', 'offended', 'offender', 'offenders', 'offending', 'offends', 'omission', 'omissions',\r\n                       'omit', 'omits', 'omitted', 'omitting', 'onerous', 'opportunistic', 'opportunistically',\r\n                       'oppose', 'opposed', 'opposes', 'opposing', 'opposition', 'oppositions', 'outage', 'outages',\r\n                       'outdated', 'outmoded', 'overage', 'overages', 'overbuild', 'overbuilding', 'overbuilds',\r\n                       'overbuilt', 'overburden', 'overburdened', 'overburdening', 'overcapacities', 'overcapacity',\r\n                       'overcharge', 'overcharged', 'overcharges', 'overcharging', 'overcome', 'overcomes',\r\n                       'overcoming', 'overdue', 'overestimate', 'overestimated', 'overestimates', 'overestimating',\r\n                       'overestimation', 'overestimations', 'overload', 'overloaded', 'overloading', 'overloads',\r\n                       'overlook', 'overlooked', 'overlooking', 'overlooks', 'overpaid', 'overpayment', 'overpayments',\r\n                       'overproduced', 'overproduces', 'overproducing', 'overproduction', 'overrun', 'overrunning',\r\n                       'overruns', 'overshadow', 'overshadowed', 'overshadowing', 'overshadows', 'overstate',\r\n                       'overstated', 'overstatement', 'overstatements', 'overstates', 'overstating', 'oversupplied',\r\n                       'oversupplies', 'oversupply', 'oversupplying', 'overtly', 'overturn', 'overturned',\r\n                       'overturning', 'overturns', 'overvalue', 'overvalued', 'overvaluing', 'panic', 'panics',\r\n                       'penalize', 'penalized', 'penalizes', 'penalizing', 'penalties', 'penalty', 'peril', 'perils',\r\n                       'perjury', 'perpetrate', 'perpetrated', 'perpetrates', 'perpetrating', 'perpetration', 'persist',\r\n                       'persisted', 'persistence', 'persistent', 'persistently', 'persisting', 'persists', 'pervasive',\r\n                       'pervasively', 'pervasiveness', 'petty', 'picket', 'picketed', 'picketing', 'plaintiff',\r\n                       'plaintiffs', 'plea', 'plead', 'pleaded', 'pleading', 'pleadings', 'pleads', 'pleas', 'pled',\r\n                       'poor', 'poorly', 'poses', 'posing', 'postpone', 'postponed', 'postponement', 'postponements',\r\n                       'postpones', 'postponing', 'precipitated', 'precipitous', 'precipitously', 'preclude',\r\n                       'precluded', 'precludes', 'precluding', 'predatory', 'prejudice', 'prejudiced', 'prejudices',\r\n                       'prejudicial', 'prejudicing', 'premature', 'prematurely', 'pressing', 'pretrial', 'preventing',\r\n                       'prevention', 'prevents', 'problem', 'problematic', 'problematical', 'problems', 'prolong',\r\n                       'prolongation', 'prolongations', 'prolonged', 'prolonging', 'prolongs', 'prone', 'prosecute',\r\n                       'prosecuted', 'prosecutes', 'prosecuting', 'prosecution', 'prosecutions', 'protest', 'protested',\r\n                       'protester', 'protesters', 'protesting', 'protestor', 'protestors', 'protests', 'protracted',\r\n                       'protraction', 'provoke', 'provoked', 'provokes', 'provoking', 'punished', 'punishes',\r\n                       'punishing', 'punishment', 'punishments', 'punitive', 'purport', 'purported', 'purportedly',\r\n                       'purporting', 'purports', 'question', 'questionable', 'questionably', 'questioned',\r\n                       'questioning', 'questions', 'quit', 'quitting', 'racketeer', 'racketeering', 'rationalization',\r\n                       'rationalizations', 'rationalize', 'rationalized', 'rationalizes', 'rationalizing',\r\n                       'reassessment', 'reassessments', 'reassign', 'reassigned', 'reassigning', 'reassignment',\r\n                       'reassignments', 'reassigns', 'recall', 'recalled', 'recalling', 'recalls', 'recession',\r\n                       'recessionary', 'recessions', 'reckless', 'recklessly', 'recklessness', 'redact', 'redacted',\r\n                       'redacting', 'redaction', 'redactions', 'redefault', 'redefaulted', 'redefaults', 'redress',\r\n                       'redressed', 'redresses', 'redressing', 'refusal', 'refusals', 'refuse', 'refused', 'refuses',\r\n                       'refusing', 'reject', 'rejected', 'rejecting', 'rejection', 'rejections', 'rejects',\r\n                       'relinquish', 'relinquished', 'relinquishes', 'relinquishing', 'relinquishment',\r\n                       'relinquishments', 'reluctance', 'reluctant', 'renegotiate', 'renegotiated', 'renegotiates',\r\n                       'renegotiating', 'renegotiation', 'renegotiations', 'renounce', 'renounced', 'renouncement',\r\n                       'renouncements', 'renounces', 'renouncing', 'reparation', 'reparations', 'repossessed',\r\n                       'repossesses', 'repossessing', 'repossession', 'repossessions', 'repudiate', 'repudiated',\r\n                       'repudiates', 'repudiating', 'repudiation', 'repudiations', 'resign', 'resignation',\r\n                       'resignations', 'resigned', 'resigning', 'resigns', 'restate', 'restated', 'restatement',\r\n                       'restatements', 'restates', 'restating', 'restructure', 'restructured', 'restructures',\r\n                       'restructuring', 'restructurings', 'retaliate', 'retaliated', 'retaliates', 'retaliating',\r\n                       'retaliation', 'retaliations', 'retaliatory', 'retribution', 'retributions', 'revocation',\r\n                       'revocations', 'revoke', 'revoked', 'revokes', 'revoking', 'ridicule', 'ridiculed', 'ridicules',\r\n                       'ridiculing', 'riskier', 'riskiest', 'risky', 'sabotage', 'sacrifice', 'sacrificed',\r\n                       'sacrifices', 'sacrificial', 'sacrificing', 'scandalous', 'scandals', 'scrutinize',\r\n                       'scrutinized', 'scrutinizes', 'scrutinizing', 'scrutiny', 'secrecy', 'seize', 'seized', 'seizes',\r\n                       'seizing', 'sentenced', 'sentencing', 'serious', 'seriously', 'seriousness', 'setback',\r\n                       'setbacks', 'sever', 'severe', 'severed', 'severely', 'severities', 'severity', 'sharply',\r\n                       'shocked', 'shortage', 'shortages', 'shortfall', 'shortfalls', 'shrinkage', 'shrinkages', 'shut',\r\n                       'shutdown', 'shutdowns', 'shuts', 'shutting', 'slander', 'slandered', 'slanderous', 'slanders',\r\n                       'slippage', 'slippages', 'slow', 'slowdown', 'slowdowns', 'slowed', 'slower', 'slowest',\r\n                       'slowing', 'slowly', 'slowness', 'sluggish', 'sluggishly', 'sluggishness', 'solvencies',\r\n                       'solvency', 'spam', 'spammers', 'spamming', 'staggering', 'stagnant', 'stagnate', 'stagnated',\r\n                       'stagnates', 'stagnating', 'stagnation', 'standstill', 'standstills', 'stolen', 'stoppage',\r\n                       'stoppages', 'stopped', 'stopping', 'stops', 'strain', 'strained', 'straining', 'strains',\r\n                       'stress', 'stressed', 'stresses', 'stressful', 'stressing', 'stringent', 'subjected',\r\n                       'subjecting', 'subjection', 'subpoena', 'subpoenaed', 'subpoenas', 'substandard', 'sue', 'sued',\r\n                       'sues', 'suffer', 'suffered', 'suffering', 'suffers', 'suing', 'summoned', 'summoning',\r\n                       'summons', 'summonses', 'susceptibility', 'susceptible', 'suspect', 'suspected', 'suspects',\r\n                       'suspend', 'suspended', 'suspending', 'suspends', 'suspension', 'suspensions', 'suspicion',\r\n                       'suspicions', 'suspicious', 'suspiciously', 'taint', 'tainted', 'tainting', 'taints', 'tampered',\r\n                       'tense', 'terminate', 'terminated', 'terminates', 'terminating', 'termination', 'terminations',\r\n                       'testify', 'testifying', 'threat', 'threaten', 'threatened', 'threatening', 'threatens',\r\n                       'threats', 'tightening', 'tolerate', 'tolerated', 'tolerates', 'tolerating', 'toleration',\r\n                       'tortuous', 'tortuously', 'tragedies', 'tragedy', 'tragic', 'tragically', 'traumatic', 'trouble',\r\n                       'troubled', 'troubles', 'turbulence', 'turmoil', 'unable', 'unacceptable', 'unacceptably',\r\n                       'unaccounted', 'unannounced', 'unanticipated', 'unapproved', 'unattractive', 'unauthorized',\r\n                       'unavailability', 'unavailable', 'unavoidable', 'unavoidably', 'unaware', 'uncollectable',\r\n                       'uncollected', 'uncollectibility', 'uncollectible', 'uncollectibles', 'uncompetitive',\r\n                       'uncompleted', 'unconscionable', 'unconscionably', 'uncontrollable', 'uncontrollably',\r\n                       'uncontrolled', 'uncorrected', 'uncover', 'uncovered', 'uncovering', 'uncovers', 'undeliverable',\r\n                       'undelivered', 'undercapitalized', 'undercut', 'undercuts', 'undercutting', 'underestimate',\r\n                       'underestimated', 'underestimates', 'underestimating', 'underestimation', 'underfunded',\r\n                       'underinsured', 'undermine', 'undermined', 'undermines', 'undermining', 'underpaid',\r\n                       'underpayment', 'underpayments', 'underpays', 'underperform', 'underperformance',\r\n                       'underperformed', 'underperforming', 'underperforms', 'underproduced', 'underproduction',\r\n                       'underreporting', 'understate', 'understated', 'understatement', 'understatements',\r\n                       'understates', 'understating', 'underutilization', 'underutilized', 'undesirable', 'undesired',\r\n                       'undetected', 'undetermined', 'undisclosed', 'undocumented', 'undue', 'unduly', 'uneconomic',\r\n                       'uneconomical', 'uneconomically', 'unemployed', 'unemployment', 'unethical', 'unethically',\r\n                       'unexcused', 'unexpected', 'unexpectedly', 'unfair', 'unfairly', 'unfavorability', 'unfavorable',\r\n                       'unfavorably', 'unfavourable', 'unfeasible', 'unfit', 'unfitness', 'unforeseeable', 'unforeseen',\r\n                       'unforseen', 'unfortunate', 'unfortunately', 'unfounded', 'unfriendly', 'unfulfilled',\r\n                       'unfunded', 'uninsured', 'unintended', 'unintentional', 'unintentionally', 'unjust',\r\n                       'unjustifiable', 'unjustifiably', 'unjustified', 'unjustly', 'unknowing', 'unknowingly',\r\n                       'unlawful', 'unlawfully', 'unlicensed', 'unliquidated', 'unmarketable', 'unmerchantable',\r\n                       'unmeritorious', 'unnecessarily', 'unnecessary', 'unneeded', 'unobtainable', 'unoccupied',\r\n                       'unpaid', 'unperformed', 'unplanned', 'unpopular', 'unpredictability', 'unpredictable',\r\n                       'unpredictably', 'unpredicted', 'unproductive', 'unprofitability', 'unprofitable', 'unqualified',\r\n                       'unrealistic', 'unreasonable', 'unreasonableness', 'unreasonably', 'unreceptive',\r\n                       'unrecoverable', 'unrecovered', 'unreimbursed', 'unreliable', 'unremedied', 'unreported',\r\n                       'unresolved', 'unrest', 'unsafe', 'unsalable', 'unsaleable', 'unsatisfactory', 'unsatisfied',\r\n                       'unsavory', 'unscheduled', 'unsellable', 'unsold', 'unsound', 'unstabilized', 'unstable',\r\n                       'unsubstantiated', 'unsuccessful', 'unsuccessfully', 'unsuitability', 'unsuitable', 'unsuitably',\r\n                       'unsuited', 'unsure', 'unsuspected', 'unsuspecting', 'unsustainable', 'untenable', 'untimely',\r\n                       'untrusted', 'untruth', 'untruthful', 'untruthfully', 'untruthfulness', 'untruths', 'unusable',\r\n                       'unwanted', 'unwarranted', 'unwelcome', 'unwilling', 'unwillingness', 'upset', 'urgency',\r\n                       'urgent', 'usurious', 'usurp', 'usurped', 'usurping', 'usurps', 'usury', 'vandalism', 'verdict',\r\n                       'verdicts', 'vetoed', 'victims', 'violate', 'violated', 'violates', 'violating', 'violation',\r\n                       'violations', 'violative', 'violator', 'violators', 'violence', 'violent', 'violently',\r\n                       'vitiate', 'vitiated', 'vitiates', 'vitiating', 'vitiation', 'voided', 'voiding', 'volatile',\r\n                       'volatility', 'vulnerabilities', 'vulnerability', 'vulnerable', 'vulnerably', 'warn', 'warned',\r\n                       'warning', 'warnings', 'warns', 'wasted', 'wasteful', 'wasting', 'weak', 'weaken', 'weakened',\r\n                       'weakening', 'weakens', 'weaker', 'weakest', 'weakly', 'weakness', 'weaknesses', 'willfully',\r\n                       'worries', 'worry', 'worrying', 'worse', 'worsen', 'worsened', 'worsening', 'worsens', 'worst',\r\n                       'worthless', 'writedown', 'writedowns', 'writeoff', 'writeoffs', 'wrong', 'wrongdoing',\r\n                       'wrongdoings', 'wrongful', 'wrongfully', 'wrongly'],\r\n          'Positive': ['able', 'abundance', 'abundant', 'acclaimed', 'accomplish', 'accomplished', 'accomplishes',\r\n                       'accomplishing', 'accomplishment', 'accomplishments', 'achieve', 'achieved', 'achievement',\r\n                       'achievements', 'achieves', 'achieving', 'adequately', 'advancement', 'advancements', 'advances',\r\n                       'advancing', 'advantage', 'advantaged', 'advantageous', 'advantageously', 'advantages',\r\n                       'alliance', 'alliances', 'assure', 'assured', 'assures', 'assuring', 'attain', 'attained',\r\n                       'attaining', 'attainment', 'attainments', 'attains', 'attractive', 'attractiveness', 'beautiful',\r\n                       'beautifully', 'beneficial', 'beneficially', 'benefit', 'benefited', 'benefiting', 'benefitted',\r\n                       'benefitting', 'best', 'better', 'bolstered', 'bolstering', 'bolsters', 'boom', 'booming',\r\n                       'boost', 'boosted', 'breakthrough', 'breakthroughs', 'brilliant', 'charitable', 'collaborate',\r\n                       'collaborated', 'collaborates', 'collaborating', 'collaboration', 'collaborations',\r\n                       'collaborative', 'collaborator', 'collaborators', 'compliment', 'complimentary', 'complimented',\r\n                       'complimenting', 'compliments', 'conclusive', 'conclusively', 'conducive', 'confident',\r\n                       'constructive', 'constructively', 'courteous', 'creative', 'creatively', 'creativeness',\r\n                       'creativity', 'delight', 'delighted', 'delightful', 'delightfully', 'delighting', 'delights',\r\n                       'dependability', 'dependable', 'desirable', 'desired', 'despite', 'destined', 'diligent',\r\n                       'diligently', 'distinction', 'distinctions', 'distinctive', 'distinctively', 'distinctiveness',\r\n                       'dream', 'easier', 'easily', 'easy', 'effective', 'efficiencies', 'efficiency', 'efficient',\r\n                       'efficiently', 'empower', 'empowered', 'empowering', 'empowers', 'enable', 'enabled', 'enables',\r\n                       'enabling', 'encouraged', 'encouragement', 'encourages', 'encouraging', 'enhance', 'enhanced',\r\n                       'enhancement', 'enhancements', 'enhances', 'enhancing', 'enjoy', 'enjoyable', 'enjoyably',\r\n                       'enjoyed', 'enjoying', 'enjoyment', 'enjoys', 'enthusiasm', 'enthusiastic', 'enthusiastically',\r\n                       'excellence', 'excellent', 'excelling', 'excels', 'exceptional', 'exceptionally', 'excited',\r\n                       'excitement', 'exciting', 'exclusive', 'exclusively', 'exclusiveness', 'exclusives',\r\n                       'exclusivity', 'exemplary', 'fantastic', 'favorable', 'favorably', 'favored', 'favoring',\r\n                       'favorite', 'favorites', 'friendly', 'gain', 'gained', 'gaining', 'gains', 'good', 'great',\r\n                       'greater', 'greatest', 'greatly', 'greatness', 'happiest', 'happily', 'happiness', 'happy',\r\n                       'highest', 'honor', 'honorable', 'honored', 'honoring', 'honors', 'ideal', 'impress',\r\n                       'impressed', 'impresses', 'impressing', 'impressive', 'impressively', 'improve', 'improved',\r\n                       'improvement', 'improvements', 'improves', 'improving', 'incredible', 'incredibly',\r\n                       'influential', 'informative', 'ingenuity', 'innovate', 'innovated', 'innovates', 'innovating',\r\n                       'innovation', 'innovations', 'innovative', 'innovativeness', 'innovator', 'innovators',\r\n                       'insightful', 'inspiration', 'inspirational', 'integrity', 'invent', 'invented', 'inventing',\r\n                       'invention', 'inventions', 'inventive', 'inventiveness', 'inventor', 'inventors', 'leadership',\r\n                       'leading', 'loyal', 'lucrative', 'meritorious', 'opportunities', 'opportunity', 'optimistic',\r\n                       'outperform', 'outperformed', 'outperforming', 'outperforms', 'perfect', 'perfected',\r\n                       'perfectly', 'perfects', 'pleasant', 'pleasantly', 'pleased', 'pleasure', 'plentiful', 'popular',\r\n                       'popularity', 'positive', 'positively', 'preeminence', 'preeminent', 'premier', 'premiere',\r\n                       'prestige', 'prestigious', 'proactive', 'proactively', 'proficiency', 'proficient',\r\n                       'proficiently', 'profitability', 'profitable', 'profitably', 'progress', 'progressed',\r\n                       'progresses', 'progressing', 'prospered', 'prospering', 'prosperity', 'prosperous', 'prospers',\r\n                       'rebound', 'rebounded', 'rebounding', 'receptive', 'regain', 'regained', 'regaining', 'resolve',\r\n                       'revolutionize', 'revolutionized', 'revolutionizes', 'revolutionizing', 'reward', 'rewarded',\r\n                       'rewarding', 'rewards', 'satisfaction', 'satisfactorily', 'satisfactory', 'satisfied',\r\n                       'satisfies', 'satisfy', 'satisfying', 'smooth', 'smoothing', 'smoothly', 'smooths', 'solves',\r\n                       'solving', 'spectacular', 'spectacularly', 'stability', 'stabilization', 'stabilizations',\r\n                       'stabilize', 'stabilized', 'stabilizes', 'stabilizing', 'stable', 'strength', 'strengthen',\r\n                       'strengthened', 'strengthening', 'strengthens', 'strengths', 'strong', 'stronger', 'strongest',\r\n                       'succeed', 'succeeded', 'succeeding', 'succeeds', 'success', 'successes', 'successful',\r\n                       'successfully', 'superior', 'surpass', 'surpassed', 'surpasses', 'surpassing', 'transparency',\r\n                       'tremendous', 'tremendously', 'unmatched', 'unparalleled', 'unsurpassed', 'upturn', 'upturns',\r\n                       'valuable', 'versatile', 'versatility', 'vibrancy', 'vibrant', 'win', 'winner', 'winners',\r\n                       'winning', 'worthy']}\r\n\r\n# Henry's (2008) Word List\r\n# Henry, Elaine. \u201cAre Investors Influenced By How Earnings Press Releases Are Written.\u201d The Journal of Business\r\n# Communication (1973) 45, no. 4 (2008): 363\u2013407.\r\nhdict = {'Negative': ['negative', 'negatives', 'fail', 'fails', 'failing', 'failure', 'weak', 'weakness', 'weaknesses',\r\n                      'difficult', 'difficulty', 'hurdle', 'hurdles', 'obstacle', 'obstacles', 'slump', 'slumps',\r\n                      'slumping', 'slumped', 'uncertain', 'uncertainty', 'unsettled', 'unfavorable', 'downturn',\r\n                      'depressed', 'disappoint', 'disappoints', 'disappointing', 'disappointed', 'disappointment',\r\n                      'risk', 'risks', 'risky', 'threat', 'threats', 'penalty', 'penalties', 'down', 'decrease',\r\n                      'decreases', 'decreasing', 'decreased', 'decline', 'declines', 'declining', 'declined', 'fall',\r\n                      'falls', 'falling', 'fell', 'fallen', 'drop', 'drops', 'dropping', 'dropped', 'deteriorate',\r\n                      'deteriorates', 'deteriorating', 'deteriorated', 'worsen', 'worsens', 'worsening', 'weaken',\r\n                      'weakens', 'weakening', 'weakened', 'worse', 'worst', 'low', 'lower', 'lowest', 'less', 'least',\r\n                      'smaller', 'smallest', 'shrink', 'shrinks', 'shrinking', 'shrunk', 'below', 'under', 'challenge',\r\n                      'challenges', 'challenging', 'challenged'],\r\n         'Positive': ['positive', 'positives', 'success', 'successes', 'successful', 'succeed', 'succeeds',\r\n                      'succeeding', 'succeeded', 'accomplish', 'accomplishes', 'accomplishing', 'accomplished',\r\n                      'accomplishment', 'accomplishments', 'strong', 'strength', 'strengths', 'certain', 'certainty',\r\n                      'definite', 'solid', 'excellent', 'good', 'leading', 'achieve', 'achieves', 'achieved',\r\n                      'achieving', 'achievement', 'achievements', 'progress', 'progressing', 'deliver', 'delivers',\r\n                      'delivered', 'delivering', 'leader', 'leading', 'pleased', 'reward', 'rewards', 'rewarding',\r\n                      'rewarded', 'opportunity', 'opportunities', 'enjoy', 'enjoys', 'enjoying', 'enjoyed',\r\n                      'encouraged', 'encouraging', 'up', 'increase', 'increases', 'increasing', 'increased', 'rise',\r\n                      'rises', 'rising', 'rose', 'risen', 'improve', 'improves', 'improving', 'improved', 'improvement',\r\n                      'improvements', 'strengthen', 'strengthens', 'strengthening', 'strengthened', 'stronger',\r\n                      'strongest', 'better', 'best', 'more', 'most', 'above', 'record', 'high', 'higher', 'highest',\r\n                      'greater', 'greatest', 'larger', 'largest', 'grow', 'grows', 'growing', 'grew', 'grown', 'growth',\r\n                      'expand', 'expands', 'expanding', 'expanded', 'expansion', 'exceed', 'exceeds', 'exceeded',\r\n                      'exceeding', 'beat', 'beats', 'beating']}\r\n\r\nnegate = [\"aint\", \"arent\", \"cannot\", \"cant\", \"couldnt\", \"darent\", \"didnt\", \"doesnt\", \"ain't\", \"aren't\", \"can't\",\r\n          \"couldn't\", \"daren't\", \"didn't\", \"doesn't\", \"dont\", \"hadnt\", \"hasnt\", \"havent\", \"isnt\", \"mightnt\", \"mustnt\",\r\n          \"neither\", \"don't\", \"hadn't\", \"hasn't\", \"haven't\", \"isn't\", \"mightn't\", \"mustn't\", \"neednt\", \"needn't\",\r\n          \"never\", \"none\", \"nope\", \"nor\", \"not\", \"nothing\", \"nowhere\", \"oughtnt\", \"shant\", \"shouldnt\", \"wasnt\",\r\n          \"werent\", \"oughtn't\", \"shan't\", \"shouldn't\", \"wasn't\", \"weren't\", \"without\", \"wont\", \"wouldnt\", \"won't\",\r\n          \"wouldn't\", \"rarely\", \"seldom\", \"despite\", \"no\", \"nobody\"]\r\n\r\n\r\ndef negated(word):\r\n    \"\"\"\r\n    Determine if preceding word is a negation word\r\n    \"\"\"\r\n    if word.lower() in negate:\r\n        return True\r\n    else:\r\n        return False\r\n\r\n\r\ndef tone_count_with_negation_check(dict, article):\r\n    \"\"\"\r\n    Count positive and negative words with negation check. Account for simple negation only for positive words.\r\n    Simple negation is taken to be observations of one of negate words occurring within three words\r\n    preceding a positive words.\r\n    \"\"\"\r\n    pos_count = 0\r\n    neg_count = 0\r\n\r\n    pos_words = []\r\n    neg_words = []\r\n\r\n    input_words = re.findall(r'\\b([a-zA-Z]+n\\'t|[a-zA-Z]+\\'s|[a-zA-Z]+)\\b', article.lower())\r\n\r\n    word_count = len(input_words)\r\n\r\n    for i in range(0, word_count):\r\n        if input_words[i] in dict['Negative']:\r\n            neg_count += 1\r\n            neg_words.append(input_words[i])\r\n        if input_words[i] in dict['Positive']:\r\n            if i &gt;= 3:\r\n                if negated(input_words[i - 1]) or negated(input_words[i - 2]) or negated(input_words[i - 3]):\r\n                    neg_count += 1\r\n                    neg_words.append(input_words[i] + ' (with negation)')\r\n                else:\r\n                    pos_count += 1\r\n                    pos_words.append(input_words[i])\r\n            elif i == 2:\r\n                if negated(input_words[i - 1]) or negated(input_words[i - 2]):\r\n                    neg_count += 1\r\n                    neg_words.append(input_words[i] + ' (with negation)')\r\n                else:\r\n                    pos_count += 1\r\n                    pos_words.append(input_words[i])\r\n            elif i == 1:\r\n                if negated(input_words[i - 1]):\r\n                    neg_count += 1\r\n                    neg_words.append(input_words[i] + ' (with negation)')\r\n                else:\r\n                    pos_count += 1\r\n                    pos_words.append(input_words[i])\r\n            elif i == 0:\r\n                pos_count += 1\r\n                pos_words.append(input_words[i])\r\n\r\n    print('The results with negation check:', end='\\n\\n')\r\n    print('The # of positive words:', pos_count)\r\n    print('The # of negative words:', neg_count)\r\n    print('The list of found positive words:', pos_words)\r\n    print('The list of found negative words:', neg_words)\r\n    print('\\n', end='')\r\n\r\n    results = [word_count, pos_count, neg_count, pos_words, neg_words]\r\n\r\n    return results\r\n\r\n\r\n# A sample output\r\narticle = '''Patent infringement pursued against same companies in U.S. District Court. Test \"wasn't good\".\r\nSUNNYVALE, Calif.--(BUSINESS WIRE)--December 02, 2010--\r\nRambus Inc. (Nasdaq:RMBS), one of the world's premier technology licensing companies, today announced it has filed a complaint with the United States International Trade Commission (ITC) requesting the commencement of an investigation pertaining to products from Broadcom Corporation, Freescale Semiconductor, Inc., LSI Corporation, MediaTek Inc., NVIDIA Corporation and STMicroelectronics N. V. The complaint seeks an exclusion order barring the importation, sale for importation, or sale after importation of products from Broadcom, Freescale, LSI, NVIDIA and STMicroelectronics that infringe certain patents from the Dally1 family of patents, and of products from Broadcom, Freescale, LSI, MediaTek and STMicroelectronics that infringe certain patents from the Barth family of patents. In an earlier investigation requested by Rambus the ITC found that these same Barth patents were valid and infringed by NVIDIA products, and issued an exclusion order in July of this year.\r\n\"We have been attempting to license these companies for some time to no avail. One of the respondents frankly told us that the only way they would get serious is if we sued them. Others pursued a strategy of delay rather than negotiate a reasonable resolution,\" said Harold Hughes, president and chief executive officer at Rambus. \"Rambus has invested hundreds of millions of dollars developing a portfolio of technologies that are foundational for many digital electronics. There is widespread knowledge within the industry about our patents including their use in standards-compatible products accused in these actions. In fairness to our shareholders and to our paying licensees, we take these steps to protect our patented innovations and pursue fair compensation for their use.\"\r\nFor the Dally patents, the accused semiconductor products from these companies include ones that incorporate PCI Express, certain Serial ATA, certain Serial Attached SCSI (SAS), and DisplayPort interfaces. In the case of the Barth patents, the accused semiconductor products include ones that incorporate DDR, DDR2, DDR3, mobile DDR, LPDDR, LPDDR2, and GDDR3 memory controllers. Accused semiconductor products in the complaint include graphics processors, media processors, communications processors, chip sets and other logic integrated circuits (ICs).\r\nIn addition to Broadcom, Freescale, LSI, MediaTek, NVIDIA and STMicroelectronics, the ITC complaint names companies whose products incorporate the accused semiconductor products and are imported, sold for importation, or sold after importation into the United States. These products include personal computers, workstations, servers, routers, mobile phones and other handheld devices, set-top boxes, Blu-ray players motherboards, plug-in cards, hard drives and modems. The ITC is expected to decide whether to initiate an investigation under this complaint within 30-45 days.\r\nRambus today also filed separate actions for patent infringement against Broadcom, Freescale, LSI, MediaTek and STMicroelectronics in the United States District Court for the Northern District of California. The lawsuits allege that semiconductor products with certain memory controllers and\/or serial links from the above companies infringe certain patents from the Farmwald-Horowitz, Barth, and Dally patent families. In the case of MediaTek, only infringement of the Barth and Farmwald-Horowitz patents for certain memory controllers is alleged. Rambus also filed an action in the United States District Court for the Northern District of California against NVIDIA for infringement of certain Dally patents. The categories of accused semiconductor products in the District Court complaints include the same categories accused in the ITC complaint, as well as SDR memory controllers. Rambus is seeking injunctive relief barring the infringement, contributory infringement, and inducement to infringe the patents, as well as monetary damages.\r\nRambus management will discuss the filing of these actions during a special conference call today at 5:00 p.m. PT. The call will be webcast and can be accessed through the Rambus website. A replay will be available following the call on Rambus' Investor Relations website or for one week at the following numbers: (800) 642-1687 (domestic) or (706) 645-9291 (international) with ID# 29122159. Further information regarding these legal actions will be made available at http:\/\/investor.rambus.com in the Litigation Update section.\r\n1 Rambus is the exclusive licensee for the Dally family of patents which are owned by Massachusetts Institute of Technology. This license was assigned to Rambus as a part of its 2003 acquisition of technology and IP from Velio Communications, a company founded by Dr. William Dally.\r\n'''\r\n\r\ntone_count_with_negation_check(lmdict, article)\r\n<\/pre>\n<p><strong>[Original Post]<\/strong> I find two internet resources for this task (thank both authors):<\/p>\n<ul>\n<li><a href=\"https:\/\/iangow.wordpress.com\/2014\/07\/22\/get-tone-from-corporate-disclosures-postgresql-python-and-r\/\">https:\/\/iangow.wordpress.com\/2014\/07\/22\/get-tone-from-corporate-disclosures-postgresql-python-and-r\/<\/a><\/li>\n<li><a href=\"http:\/\/conjugateprior.org\/software\/ca-in-python\/\">http:\/\/conjugateprior.org\/software\/ca-in-python\/<\/a><\/li>\n<\/ul>\n<p>The first solution is way more efficient than the second, but the second is more straightforward. The first needs extra\u00a0knowledge of PostgreSQL and R besides Python. I borrow from the two resources and write the Python code below.<\/p>\n<p><span style=\"color: #000000;\">Please note, t<\/span>o use the Python code, you have to know how to assign the full text of an article of interest to the variable `text`, and how to output the total word count and the counts of positive\/negative words in `text`.<\/p>\n<pre class=\"lang:python decode:true \"># Get tone dictionary\r\nwith open('lmdict.txt') as list:\r\n    lines = list.readlines()\r\ndict = {}\r\nfor l in lines:\r\n    if l[0:2] == '&gt;&gt;':\r\n        cat = l[2:].strip()\r\n        dict[cat] = []\r\n    else:\r\n        l = l.strip()\r\n        if l:\r\n            dict[cat].append(l)\r\n\r\n# Set up regular expressions\r\nregex = {}\r\nfor cat in dict.keys():\r\n    pattern = '\\\\b(?:' + '|'.join(dict[cat]) + ')\\\\b'\r\n    regex[cat] = re.compile(pattern, re.IGNORECASE)\r\n\r\n# Get tone count\r\nwordcount = len(text.split())\r\nfor cat in count.keys():\r\n    count[cat] = len(regex[cat].findall(text))\r\nprint(count)<\/pre>\n<p>In the first part of the code, I read the dictionary or the word list into a Python dictionary variable. The word list used here is supposed to be a .txt file and in the following format:<\/p>\n<pre class=\"lang:default decode:true \">&gt;&gt;positive\r\nBETTER\r\nSUCCESS\r\nVALUABLE\r\n\r\n&gt;&gt;negative\r\nABANDON\r\nABNORMAL\r\nANNOY<\/pre>\n<p>For accounting and finance research, a commonly used positive\/negative word list was\u00a0developed by Bill McDonald. See <a href=\"http:\/\/www3.nd.edu\/~mcdonald\/Word_Lists.html\" target=\"_blank\" rel=\"noopener noreferrer\">his website<\/a>.<\/p>\n<p>In the second part of the code, I create regular expressions that are used to find occurrences of positive\/negative words. The last few lines of codes are used to get the counts of positive\/negative words in the text.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[Update on 2019-03-01] I completely rewrite the Python program. The updates include: I include two domain-specific dictionaries: Loughran and McDonald&#8217;s and Henry&#8217;s dictionaries, and you can choose which dictionary to use. I add negation check as suggested by Loughran and &hellip; <a href=\"https:\/\/www.kaichen.work\/?p=399\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/www.kaichen.work\/index.php?rest_route=\/wp\/v2\/posts\/399"}],"collection":[{"href":"https:\/\/www.kaichen.work\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kaichen.work\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kaichen.work\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kaichen.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=399"}],"version-history":[{"count":37,"href":"https:\/\/www.kaichen.work\/index.php?rest_route=\/wp\/v2\/posts\/399\/revisions"}],"predecessor-version":[{"id":1423,"href":"https:\/\/www.kaichen.work\/index.php?rest_route=\/wp\/v2\/posts\/399\/revisions\/1423"}],"wp:attachment":[{"href":"https:\/\/www.kaichen.work\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kaichen.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kaichen.work\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}