# US 2023/0066233 A1 · Intent-based suggestion of phrases in a text editor

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

- Number: US 2023/0066233 A1
- Document ID: US20230066233A1
- Status: Published application
- Kind: A1
- Application number: 17/462,879
- Filed: 2021-08-31
- Published: 2023-03-02
- Earliest claimed: 2021-08-31
- Assignees: Grammarly, Inc.
- Applicants: Grammarly, Inc.
- Inventors: Jennifer van Dam; Sergey Yavnyi; Xiaoshan Li; Masha Ivenskaya; Jared Foelsch
- Web page: https://patentgrep.com/patent/US20230066233A1

## CPC

- G06F 40/289: Phrasal analysis, e.g. finite state techniques or chunking
- G06F 16/35: Clustering; Classification
- G06F 16/355: Creation or modification of classes or clusters
- G06F 40/205: Parsing
- G06F 40/274: Converting codes to words; Guess-ahead of partial word inputs
- G06F 40/30: Semantic analysis
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer-implemented process is programmed to detect a type or category of document that is being drafted and to suggest one or more phrases or sentences to add to the original and/or substitute for the original, the suggested text being potentially more personable and sincere than the writer’s original text. Suggested text phrases are selected from a large corpus of previously manually drafted sentences and phrases. Selected text phrases are ranked and filtered to result in suggesting a manageable set of text phrases. With this approach, adding specially chosen content to existing content can change the warmth or tone of the text while preserving its meaning. Unlike prior approaches, in an embodiment, the process is programmed to artificially understand the intent of the original text as a basis of suggesting other content to add. Furthermore, embodiments may interoperate with a visual or graphical user interface that is programmed to enable users to see what the change to the text will be and whether they want it before they engage with the suggestion.

## Claims

### Claim 1

A computer-implemented method executed at a first computer and comprising:
programmatically receiving a digital electronic object comprising a source text;
dividing the source text into a plurality of source text units;
evaluating each particular source text unit among the plurality of source text units using a machine learning model, and receiving a classification output from the machine learning model that classifies each particular source text unit as a particular class of phrase among a plurality of possible classes of phrases;
transforming the classification output to yield an output set of phrase suggestions;
transmitting the output set of phrase suggestions to a second computer.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, the transforming comprising any one of:
mapping the classification output to a plurality of candidate phrase suggestions in a digital database, to yield an initial set of matching phrase suggestions, and filtering the initial set of matching phrase suggestions to yield the output set of phrase suggestions that is fewer in number than the initial set; and
mapping the classification output to a plurality of candidate phrase suggestions in a digital database, to yield an initial set of matching phrase suggestions, scoring the candidate phrase suggestions, and selecting top N candidate phrase suggestions to yield the output set of phrase suggestions.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, the plurality of source text units comprising a plurality of sentences of the source text.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, the plurality of source text units comprising a plurality of sentences of the source text, the method further comprising executing the dividing using a computer-implemented parser.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, the machine learning model comprising a trained multi-class text classifier comprising a FASTTEXT classifier.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, further comprising, before the filtering, ranking the initial set of matching phrase suggestions based on a ranking criterion.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, further comprising, before the filtering, ranking the initial set of matching phrase suggestions in order of least similarity to the particular source text unit.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, the machine learning model comprising any of:
a plurality of text classifiers coupled as an ensemble;
a plurality of targeted rules that are programmed to find relevant words and coupled to a classifier to approve or reject whether an instance of a word is correct.

### Claim 9 (depends on 7)

The computer-implemented method of claim 7, further comprising:
the first computer executing a text processor that is communicatively coupled to a text processing extension that is executed at the second computer;
programmatically receiving the digital electronic object comprising the source text via a message initiated at the text processing extension and transmitted to the text processor;
the text processing extension executing in association with an application program that is executing at the second computer, the text processing extension being programmed to automatically detect a change in a text entry window of the application program and, in response, to initiate the message.

### Claim 10 (depends on 7)

The computer-implemented method of claim 7, further comprising:
the first computer executing a text processor that is communicatively coupled to a text processing extension that is executed at the second computer;
programmatically receiving the digital electronic object comprising the source text via a message initiated at the text processing extension and transmitted to the text processor;
the text processor executing in association with a browser that is executing at the second computer, the text processing extension being programmed to automatically detect a change in a text entry widget of the browser and, in response, to initiate the message.

### Claim 11 (depends on 1)

The computer-implemented method of claim 1, the trained multi-class text classifier machine learning model being trained to classify each particular source text unit as a particular class of phrase from among: thank, happy birthday, ask for help, decline invitation, follow up, congratulate, introduce, apology, announcement, setting up a meeting.

### Claim 12

One or more non-transitory computer-readable media storing one or more sequences of instructions which, when executed using a first computer, cause the first computer to execute:
programmatically receiving a digital electronic object comprising a source text;
dividing the source text into a plurality of source text units;
evaluating each particular source text unit among the plurality of source text units using a trained multi-class text classifier machine learning model, and receiving a classification output from the multi-class text classifier that classifies each particular source text unit as a particular class of phrase among a plurality of possible classes of phrases;
mapping the classification output to a plurality of candidate phrase suggestions in a digital database, to yield an initial set of matching phrase suggestions;
filtering the initial set of matching phrase suggestions to yield an output set of phrase suggestions that is fewer in number than the initial set;
transmitting the output set of phrase suggestions to a second computer.

### Claim 13 (depends on 12)

The one or more computer-readable media of claim 12, the plurality of source text units comprising a plurality of sentences of the source text.

### Claim 14 (depends on 12)

The one or more computer-readable media of claim 12, the plurality of source text units comprising a plurality of sentences of the source text, the one or more computer-readable media further comprising sequences of instructions which when executed by the first computer cause executing the dividing using a computer-implemented parser.

### Claim 15 (depends on 12)

The one or more computer-readable media of claim 12, the trained multi-class text classifier comprising a FASTTEXT classifier using FASTTEXT embeddings as a metric of semantic distance between training sentences and the source text units.

### Claim 16 (depends on 12)

The one or more computer-readable media of claim 12, further comprising sequences of instructions which when executed by the first computer cause, before the filtering, ranking the initial set of matching phrase suggestions based on a ranking criterion.

### Claim 17 (depends on 12)

The one or more computer-readable media of claim 12, further comprising sequences of instructions which when executed by the first computer cause, before the filtering, ranking the initial set of matching phrase suggestions in order of least similarity to the particular source text unit.

### Claim 18 (depends on 12)

The one or more computer-readable media of claim 12, further comprising sequences of instructions which when executed by the first computer cause:
the first computer executing a text processor that is communicatively coupled to a text processing extension that is executed at the second computer;
programmatically receiving the digital electronic object comprising the source text via a message initiated at the text processing extension and transmitted to the text processor.

### Claim 19 (depends on 18)

The one or more computer-readable media of claim 18, the text processing extension executing in association with an application program that is executing at the second computer, the text processing extension being programmed to automatically detect a change in a text entry window of the application program and, in response, to initiate the message.

### Claim 20 (depends on 18)

The one or more computer-readable media of claim 18, the text processor executing in association with browser that is executing at the second computer, the text processing extension being programmed to automatically detect a change in a text entry widget of the browser and, in response, to initiate the message.

### Claim 21 (depends on 12)

The one or more computer-readable media of claim 12, the trained multi-class text classifier machine learning model being trained to classify each particular source text unit as a particular class of phrase from among: thank, happy birthday, ask for help, decline invitation, follow up, congratulate, introduce, apology, announcement, setting up a meeting.

### Claim 22

A text processing device, comprising:
one or more central processing units;
one or more network interfaces that are configured to communicatively couple the one or more central processing units to a data communication network;
electronic digital random access memory storing a plurality of sequences of stored program instructions that are organized as executable checks for checking a digitally stored source text that is received via the data communication network from a computing device that is executing a text processing extension, a phrase check among the executable checks comprising multi-class text classifier instructions coupled to phrase suggestion instructions, the phrase suggestion instructions being coupled to a digital phrase store;
the multi-class text classifier instructions and phrase suggestion instructions being programmed to:
read the source text;
identify a plurality of sentences in the source text;
for each particular sentence in the plurality of sentences, evaluate the particular sentence using a machine learning model that has been trained using a training dataset of a plurality of similar sentences that express a similar intent, and to output a classification output;
map the classification output to the digital phrase store, to select an initial set of matching phrase suggestions;
transmit the matching phrase suggestions to the computing device via the data communication network.

### Claim 23 (depends on 22)

The text processing device of claim 22, the phrase check among the executable checks further comprising ranking instructions coupled to the phrase suggestion instructions, the ranking instructions being programmed to rank the matching phrase suggestions according to least similarity of each of the matching phrase suggestions to the particular sentence, and to filter the matching phrase suggestions after the ranking to retain only a specified number of least similar matching phrase suggestions.

### Claim 24 (depends on 23)

The text processing device of claim 23, the specified number being in a range of three to ten.
