# US 12,762,340 B2 · Selective text prediction for electronic messaging

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

- Number: US 12,762,340 B2
- Document ID: US12762340B2
- Status: Granted
- Kind: B2
- Application number: 18/447,186
- Filed: 2023-08-09
- Published: 2023-11-30
- Granted: 2026-10-13
- Earliest claimed: 2017-12-22
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Paul Roland Lambert; Timothy Youngjin Sohn; Jacqueline Amy Tsay; Gagan Bansal; Cole Austin Bevis; Kaushik Roy; Justin Tzi-jay Lu; Katherine Anna Evans; Tobias Bosch; Yinan Wang; Matthew Vincent Dierker; Gregory Russell Bullock; Ettore Randazzo; Tobias Kaufmann; Yonghui Wu; Benjamin N. Lee; Xu Chen; Brian Strope; Yun-hsuan Sung; Do Kook Choe; Rami Eid Sammour Al-Rfou'
- Web page: https://patentgrep.com/patent/US12762340B2

## CPC

- G06F 40/274: Converting codes to words; Guess-ahead of partial word inputs
- G06F 3/0237: {using prediction or retrieval techniques}
- G06F 3/04842: Selection of displayed objects or displayed text elements (G06F3/0482 takes precedence)
- G06F 21/6245: {Protecting personal data, e.g. for financial or medical purposes}
- G06F 40/232: Orthographic correction, e.g. spell checking or vowelisation
- G06F 40/253: Grammatical analysis; Style critique
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- 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

A computing system is described that includes user interface components configured to receive typed user input; and one or more processors. The one or more processors are configured to: receive, by a computing system and at a first time, a first portion of text typed by a user in an electronic message being edited; predict, based on the first portion of text, a first candidate portion of text to follow the first portion of text; output, for display, the predicted first candidate portion of text for optional selection to append to the first portion of text; determine, at a second time that is after the first time, that the electronic message is directed to a sensitive topic; and responsive to determining that the electronic message is directed to a sensitive topic, refrain from outputting subsequent candidate portions of text for optional selection to append to text in the electronic message.

## Claims

### Claim 1

A method comprising:
receiving, by a computing system and at a first time, a first portion of text of a first electronic message;
predicting, by the computing system and based on the first portion of text of the first electronic message, a first candidate portion of computer-generated text;
outputting, for display at a second time, the predicted first candidate portion of computer-generated text in the first electronic message;
receiving, by the computer system and at a third time, a second portion of text of the first electronic message;
determining, by the computing system and at a fourth time that is after the third time, whether the first electronic message is directed to a sensitive topic based on a modification to the first electronic message performed between the third time and the fourth time, wherein determining whether the first electronic message is directed to a sensitive topic comprises determining that the first electronic message is directed to a sensitive topic using a machine learning model; and
responsive to determining that the first electronic message is directed to a sensitive topic, refraining from outputting subsequent candidate portions of computer-generated text related to the sensitive topic in the first electronic message.

### Claim 2 (depends on 1)

The method of claim 1, wherein the electronic message comprises a chat conversation.

### Claim 3 (depends on 1)

The method of claim 1, wherein predicting the first candidate portion of computer-generated text comprises predicting the first candidate portion of computer-generated text using a machine learning model.

### Claim 4 (depends on 1)

The method of claim 1, wherein predicting the first candidate portion of text comprises:
predicting, by the computing system and using a machine learning model, one or more candidate portions of text to follow the first portion of text, the one or more candidate portions of text including the first candidate portion of computer-generated text, wherein the first candidate portion of computer-generated text includes a token; and
modifying the first candidate portion of computer-generated text to generate a modified first candidate portion of text by replacing the token with text determined based on one or both of context of the first electronic message or information about a user editing the first electronic message,
wherein outputting the predicted first candidate portion of computer-generated text comprises outputting, for display, the modified first candidate portion of text.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
receiving a corpus of text;
modifying the corpus of text to generate a modified corpus of text by replacing fields in the corpus with corresponding tokens; and
training the machine learning model using the modified corpus of text.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
performing one or both of spelling or grammar correction on the first portion of text, wherein predicting the first candidate portion of text comprises:
predicting, based on the corrected first portion of text, the first candidate portion of text.

### Claim 7 (depends on 1)

The method of claim 1, wherein sensitive topics include one or more of death, funeral, crime, job loss, job rejection, and academic rejection.

### Claim 8 (depends on 1)

The method of claim 1, wherein determining that the electronic message is directed to a sensitive topic comprises:
determining, based on one or both of content of the electronic message or header fields of the electronic message, that the electronic message is directed to a sensitive topic.

### Claim 9

A computing system comprising:
one or more user interface components configured to receive typed user input; and
one or more processors configured to:
receive, a first time, a first portion of text of a first electronic message;
predict, based on the first portion of text of the first electronic message, a first candidate portion of computer-generated text;
output, for display at a second time, the predicted first candidate portion of computer-generated text in the first electronic message;
receive, at a third time, a second portion of text of the first electronic message;
determine, at a fourth time that is after the third time, whether the first electronic message is directed to a sensitive topic based on a modification to the first electronic message performed between the third time and the fourth time, wherein determining whether the first electronic message is directed to a sensitive topic comprises determining that the first electronic message is directed to a sensitive topic using a machine learning model; and
responsive to determining that the first electronic message is directed to a sensitive topic, refrain from outputting subsequent candidate portions of computer-generated text related to the sensitive topic in the first electronic message.

### Claim 10 (depends on 9)

The computing system of claim 9, wherein the electronic message comprises a chat conversation.

### Claim 11 (depends on 9)

The computing system of claim 9, wherein, to predict the first candidate portion of computer-generated text, the one or more processors are configured to predict the first candidate portion of computer-generated text using a machine learning model.

### Claim 12 (depends on 9)

The computing system of claim 9, wherein, to predict the first candidate portion of text, the one or more processors are configured to:
predict, by the computing system and using a machine learning model, one or more candidate portions of text to follow the first portion of text, the one or more candidate portions of text including the first candidate portion of computer-generated text, wherein the first candidate portion of computer-generated text includes a token; and
modify the first candidate portion of computer-generated text to generate a modified first candidate portion of text by replacing the token with text determined based on one or both of context of the first electronic message or information about a user editing the first electronic message,
wherein, to output the predicted first candidate portion of computer-generated text, the one or more processors are configured to output, for display, the modified first candidate portion of text.

### Claim 13 (depends on 12)

The computing system of claim 12, wherein the one or more processors are configured to:
receive a corpus of text;
modify the corpus of text to generate a modified corpus of text by replacing fields in the corpus with corresponding tokens; and
train the machine learning model using the modified corpus of text.

### Claim 14 (depends on 9)

The computing system of claim 9, wherein the one or more processors are configured to:
perform one or both of spelling or grammar correction on the first portion of text, wherein, to predict the first candidate portion of text, the one or more processors are configured to:
predict, based on the corrected first portion of text, the first candidate portion of text.

### Claim 15 (depends on 9)

The computing system of claim 9, wherein sensitive topics include one or more of death, funeral, crime, job loss, job rejection, and academic rejection.

### Claim 16 (depends on 9)

The computing system of claim 9, wherein, to determine that the electronic message is directed to a sensitive topic, the one or more processors are configured to:
determine, based on one or both of content of the electronic message or header fields of the electronic message, that the electronic message is directed to a sensitive topic.

### Claim 17 (depends on 16)

The computing system of claim 16, wherein, to determine that the electronic message is directed to a sensitive topic, the one or more processors are configured to:
determine, based on the content of the electronic message and with a ML model, whether the electronic message is directed to a sensitive topic.

### Claim 18

A computer-readable storage medium storing instructions that, when executed, cause one or more processors of a computing system to:
receive, at a first time, a first portion of text of a first electronic message;
predict, based on the first portion of text of the first electronic message, a first candidate portion of computer-generated text;
output, for display at a second time, the predicted first candidate portion of computer-generated text in the first electronic message;
receive, at a third time, a second portion of text of the first electronic message;
determine, at a fourth time that is after the third time, whether the first electronic message is directed to a sensitive topic based on a modification to the first electronic message performed between the third time and the fourth time, wherein determining whether the first electronic message is directed to a sensitive topic comprises determining that the first electronic message is directed to a sensitive topic using a machine learning model; and
responsive to determining that the first electronic message is directed to a sensitive topic, refrain from outputting subsequent candidate portions of computer-generated text related to the sensitive topic in the first electronic message.

### Claim 19 (depends on 18)

The computer-readable storage medium of claim 18, wherein the instructions that cause the one or more processors to determine that the electronic message is directed to a sensitive topic comprise instructions that cause the one or more processors to:
determine, based on the first portion of text and with a ML model, that the electronic message is directed to a sensitive topic.

### Claim 20 (depends on 19)

The computer-readable storage medium of claim 19, wherein the electronic message comprises a chat conversation.

### Claim 21 (depends on 1)

The method of claim 1, wherein the sensitive topic comprises a topic for which outputting the subsequent candidate portions of computer-generated text is determined to be offensive or inappropriate.
