# US 11,308,419 B2 · Learning sentiment composition from sentiment lexicons

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,308,419 B2
- Document ID: US11308419B2
- Status: Granted
- Kind: B2
- Application number: 16/191,478
- Filed: 2018-11-15
- Published: 2020-02-27
- Granted: 2022-04-19
- Earliest claimed: 2018-08-22
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Ranit Aharonov; Roy Bar-Haim; Alon Halfon; Charles Arthur Jochim; Amir Menczel; Noam Slonim; Orith Toledo-Ronen
- Web page: https://patentgrep.com/patent/US11308419B2

## CPC

- G06N 20/00: Machine learning
- G06F 17/18: for evaluating statistical data {, e.g. average values, frequency distributions, probability functions, regression analysis (forecasting specially adapted for a specific administrative, business or logistic context G06Q10/04)}
- G06F 40/30: Semantic analysis
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method including: generating, from a text corpus, a lexicon of unigrams and bigrams comprising an embedding for each of said unigrams and bigrams; training a machine learning classifier on a training set comprising a subset of said lexicon, wherein each of said unigrams and bigrams in said subset has a sentiment label; applying said machine learning classifier to said lexicon, to (i) predict a sentiment of each of said unigrams and bigrams, and (ii) update said lexicon with the predicted sentiments; and performing statistical analysis on said updated lexicon, to extract one or more sentiment composition lexicons, wherein each of said one or more sentiment composition lexicons is associated with a sentiment composition class.

## Claims

### Claim 1

A method comprising:
operating at least one hardware processor for:
generating, from a text corpus, a lexicon of unigrams and bigrams comprising an embedding for each of said unigrams and bigrams;
training a machine learning classifier on a training set comprising a subset of said lexicon, wherein each of said unigrams and bigrams in said subset has a sentiment label;
applying said machine learning classifier to said lexicon, to (i) predict a sentiment of each of said unigrams and bigrams, and (ii) update said lexicon with the predicted sentiments;
performing statistical analysis on said updated lexicon, to extract one or more sentiment composition lexicons, wherein:
each of said one or more sentiment composition lexicons is associated with a sentiment composition class,
with respect to each said sentiment composition class, said statistical analysis comprises determining a statistical ratio between (i) all bigrams in said updated lexicon meeting said conditions of said sentiment composition class, and (ii) all bigrams in said updated lexicon meeting said conditions of said sentiment composition class, whose sentiment is equal to said predicted sentiment associated with said sentiment composition class; and
predicting a sentiment of a bigram comprising a first unigram from a said sentiment composition lexicon based, at least in part, on meeting one or more conditions of said associated sentiment composition class, wherein said conditions comprise at least one of (i) an ordering of said first unigram and a second unigram within said bigram, (ii) a sentiment of said first unigram, and (iii) a sentiment of said second unigram.

### Claim 2 (depends on 1)

The method of claim 1, wherein said statistical analysis further takes into account, with respect to each bigram, a probability of said prediction performed by said machine learning classifier.

### Claim 3 (depends on 1)

The method of claim 1, wherein said sentiment composition class is selected from the group consisting of: a reverser class, a propagator class, and a dominator class.

### Claim 4 (depends on 3)

The method of claim 3, wherein:
(i) when said first unigram is associated with said reverser class, said predicted bigram sentiment is the opposite of said second unigram sentiment;
(ii) when said first unigram is associated with said propagator class, said predicted bigram sentiment is equal to said second unigram sentiment; and
(iii) when said first unigram is associated with said dominator class, said predicted bigram sentiment is equal to said first unigram sentiment.

### Claim 5 (depends on 1)

The method of claim 1, wherein said sentiment composition class is an adjective class, and wherein a bigram comprising a unigram from a said sentiment composition lexicon associated with said adjective class has (i) a first predicted sentiment when paired with a first adjective from a specified pair of antonymic adjectives, and (ii) an opposite predicted sentiment when paired with a second adjective from said specified pair of antonymic adjectives.

### Claim 6 (depends on 5)

The method of claim 5, wherein, with respect to each unigram in said adjective composition class, said statistical analysis comprises determining whether a combined score equal to an absolute value of (i) an average sentiment score for all bigrams comprising said unigram and said first adjective, less (ii) an average sentiment score for all bigrams comprising said unigram and said second adjective, meets a specified threshold.

### Claim 7 (depends on 6)

The method of claim 6, wherein each adjective in said specified pair of antonymic adjectives comprises a plurality of synonyms of said adjective.

### Claim 8

A system comprising:
at least one hardware processor; and
a non-transitory computer-readable storage medium having stored thereon program instructions, the program instructions executable by the at least one hardware processor to:
generate, from a text corpus, a lexicon of unigrams and bigrams comprising an embedding for each of said unigrams and bigrams;
train a machine learning classifier on a training set comprising a subset of said lexicon, wherein each of said unigrams and bigrams in said subset has a sentiment label;
apply said machine learning classifier to said lexicon, to (i) predict a sentiment of each of said unigrams and bigrams, and (ii) update said lexicon with the predicted sentiments;
perform statistical analysis on said updated lexicon, to extract one or more sentiment composition lexicons, wherein:
each of said one or more sentiment composition lexicons is associated with a sentiment composition class,
with respect to each said sentiment composition class, said statistical analysis comprises determining a statistical ratio between (i) all bigrams in said updated lexicon meeting said conditions of said sentiment composition class, and (ii) all bigrams in said updated lexicon meeting said conditions of said sentiment composition class, whose sentiment is equal to said predicted sentiment associated with said sentiment composition class; and
predict a sentiment bigram comprising a first unigram from a said sentiment composition lexicon based, at least in part, on meeting one or more conditions of said associated sentiment composition class, wherein said conditions comprise at least one of (i) an ordering of said first unigram and a second unigram within said bigram, (ii) a sentiment of said first unigram, and (iii) a sentiment of said second unigram.

### Claim 9 (depends on 8)

The system of claim 8, wherein said statistical analysis further takes into account, with respect to each bigram, a probability of said prediction performed by said machine learning classifier.

### Claim 10 (depends on 8)

The system of claim 8, wherein said sentiment composition class is selected from the group consisting of: a reverser class, a propagator class, and a dominator class.

### Claim 11 (depends on 10)

The system of claim 10, wherein:
(i) when said first unigram is associated with said reverser class, said predicted bigram sentiment is the opposite of said second unigram sentiment;
(ii) when said first unigram is associated with said propagator class, said predicted bigram sentiment is equal to said second unigram sentiment; and
(iii) when said first unigram is associated with said dominator class, said predicted bigram sentiment is equal to said first unigram sentiment.

### Claim 12 (depends on 8)

The system of claim 8, wherein said sentiment composition class is an adjective class, and wherein a bigram comprising a unigram from a said sentiment composition lexicon associated with said adjective class has (i) a first predicted sentiment when paired with a first adjective from a specified pair of antonymic adjectives, and (ii) an opposite predicted sentiment when paired with a second adjective from said specified pair of antonymic adjectives.

### Claim 13 (depends on 12)

The system of claim 12, wherein, with respect to each unigram in said adjective composition class, said statistical analysis comprises determining whether a combined score equal to an absolute value of (i) an average sentiment score for all bigrams comprising said unigram and said first adjective, less (ii) an average sentiment score for all bigrams comprising said unigram and said second adjective, meets a specified threshold.

### Claim 14 (depends on 13)

The system of claim 13, wherein each adjective in said specified pair of antonymic adjectives comprises a plurality of synonyms of said adjective.
