# US 12,112,134 B2 · Methods for emotion classification in text

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

- Number: US 12,112,134 B2
- Document ID: US12112134B2
- Status: Granted
- Kind: B2
- Application number: 17/582,206
- Filed: 2022-01-24
- Published: 2022-09-15
- Granted: 2024-10-08
- Earliest claimed: 2021-03-15
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Dana Movshovitz-Attias; John Patrick McGregor, Jr.; Gaurav Nemade; Sujith Ravi; Jeongwoo Ko; Dora Demszky
- Web page: https://patentgrep.com/patent/US12112134B2

## CPC

- G06F 40/289: Phrasal analysis, e.g. finite state techniques or chunking
- G06F 40/30: Semantic analysis
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

The technology relates to methods for detecting and classifying emotions in textual communication, and using this information to suggest graphical indicia such as emoji, stickers or GIFs to a user. Two main types of models are fully supervised models and few-shot models. In addition to fully supervised and few-shot models, other types of models focusing on the back-end (server) side or client (on-device) side may also be employed. Server-side models are larger-scale models that can enable higher degrees of accuracy, such as for use cases where models can be hosted on cloud servers where computational and storage resources are relatively abundant. On-device models are smaller-scale models, which enable use on resource-constrained devices such as mobile phones, smart watches or other wearables (e.g., head mounted displays), in-home devices, embedded devices, etc.

## Claims

### Claim 1

A method of training a computer-implemented emotion classification model, the method comprising:
retrieving, from a database, training data for a text-based application;
extracting from the training data, by one or more processors, a set of phrases that are associated with a set of taxonomy concepts;
extracting from the set of phrases, by the one or more processors, a set of emotion examples based on emotion-bearing phrases in the set of phrases; and
training, by the one or more processors, the emotion classification model based on a set of emotion-bearing phrases, wherein the trained emotion classification model associates one or more graphical indicia with at least one of a sender or a recipient of the text-based application.

### Claim 2 (depends on 1)

The method of claim 1, wherein the training data includes one or more of corpus-based phrases, manually selected phrases, crowdsourced phrases, or tenor phrases.

### Claim 3 (depends on 1)

The method of claim 1, wherein extracting the set of emotion examples includes performing at least one of exact matching, partial matching, or evaluating a semantic distance of a textual fragment with the set of phrases associated with the set of taxonomy concepts.

### Claim 4 (depends on 1)

The method of claim 1, wherein training the emotion classification model based on the set of emotion-bearing phrases includes evaluating emotion-neutral statements.

### Claim 5 (depends on 1)

The method of claim 1, wherein training the emotion classification model comprises training a few-shot classifier, and the method further comprises:
labeling a full corpus based on the trained few-shot classifier; and
training a supervised classifier over the full corpus.

### Claim 6 (depends on 1)

The method of claim 1, wherein extracting the set of phrases includes extracting only phrases with a least a threshold pointwise mutual information (PMI) value.

### Claim 7 (depends on 1)

The method of claim 1, wherein the one or more graphical indicia comprise at least one of a set of emoji, a set of stickers, or a set of GIFs.

### Claim 8 (depends on 1)

The method of claim 1, wherein the text-based application is one of a chat, a text chain, a videoconferencing application, a commenting platform, an automated help feature of an on-line application, or an assistant feature of a client computing device.

### Claim 9 (depends on 1)

The method of claim 1, wherein training the emotion classification model based on the set of emotion-bearing phrases includes incorporating a sentiment signal during the training to obtain a joint emotion and sentiment model.

### Claim 10 (depends on 1)

The method of claim 1, wherein training the emotion classification model based on the set of emotion-bearing phrases excludes predicting emotions for non-emotional text.

### Claim 11 (depends on 1)

The method of claim 1, wherein training the emotion classification model based on the set of emotion-bearing phrases includes providing a multi-label classification that supports more than one expressive concept per graphical indicia.

### Claim 12 (depends on 1)

The method of claim 1, wherein the method further includes performing down-sampling the set of taxonomy concepts.

### Claim 13 (depends on 1)

The method of claim 1, wherein the method further includes applying one or more user interface normalizers associated with visual elements of a given user interface.

### Claim 14 (depends on 1)

The method of claim 1, wherein the one or more graphical indicia includes multiple graphical indicia associated with different classes, and the method includes mapping each class to a particular emotional or non-emotional concept in a set of concepts.

### Claim 15 (depends on 14)

The method of claim 14, wherein one or more concepts in the set of concepts are extracted as keywords that appear in a vicinity of a corresponding one of the multiple graphical indicia in the text-based application.

### Claim 16 (depends on 15)

The method of claim 15, wherein the keywords are used for direct token replacement in a keyboard model.

### Claim 17 (depends on 14)

The method of claim 14, wherein the emotion classification model is configured to predict an emotion of a user based on one or more messages sent in a conversation using the text-based application.

### Claim 18 (depends on 1)

The method of claim 1, wherein the emotion classification model is configured to predict a list of concepts for an input message of the text-based application.

### Claim 19 (depends on 1)

The method of claim 1, wherein the emotion classification model is configured to suggest a particular graphical indicia.

### Claim 20 (depends on 1)

The method of claim 1, wherein the emotion classification model is configured for use with the text-based application to support customizing or changing a graphical user interface based on a detected emotion.
