IP Library Granted Patent US 12688357
Granted Patent B1
US 12688357 · App. 18/307,364 · Granted Jul 21, 2026

Universal natural language rewriting based on intent

Inventors: Dhruv Kumar (Vancouver, CA); Vipul Raheja (San Francisco, CA); Kunal Singhal (Coquitlam, CA); Nicholas Bern (San Francisco, CA)
G06F40/253G06F40/106G06F40/40
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12688357
App. No.
18/307,364
Granted
Jul 21, 2026
Kind
B1
Abstract

In one embodiment, a computer-implemented method comprises receiving, from a client device, a text sequence input that comprises a plurality of words; using a server computer, executing an inference stage of a trained unified machine learning model over the text sequence input, the unified machine learning model having been trained on a training dataset comprising a plurality of pairs of records, each of the pairs of records comprising an unmodified natural language text string and a modified natural language text string, each of the records being labeled using two or more prefixes, each prefix among the two or more prefixes corresponding to a different attribute of natural language that is represented in the modified natural language text string, the modified natural language text string comprising two or more modifications corresponding to the prefixes; using the unified machine learning model, outputting one or more text suggestions for the text sequence input and explanation data comprising one or more prefixes corresponding to the one or more text suggestions; transmitting, to the client device, instructions for presenting a user interface comprising the one or more text suggestions for the text sequence input and the explanation data.

Claims (58)

1 . A computer-implemented method, comprising:

receiving, from a client device, a text sequence input that comprises a plurality of words;

using a server computer, executing an inference stage of a trained unified machine learning model over the text sequence input, the unified machine learning model having been trained on a training dataset comprising a plurality of pairs of records, each of the pairs of records comprising an unmodified natural language text string and a modified natural language text string, each of the unmodified natural language text strings being labeled using one or more prefixes, each prefix among the one or more prefixes corresponding to a different attribute of natural language that is represented in the modified natural language text string, the modified natural language text string comprising one or more modifications corresponding to the one or more prefixes;

using the unified machine learning model, outputting one or more text suggestions for the text sequence input and explanation data comprising one or more prefixes corresponding to the one or more text suggestions, wherein the one or more text suggestions and the explanation data are outputs of the unified machine learning model; and

transmitting, to the client device, instructions for presenting a user interface comprising the one or more text suggestions for the text sequence input and the explanation data.

2 . The method of claim 1 , wherein the unified machine learning model comprises a multi-class neural network.

3 . The method of claim 1 , wherein the one or more text suggestions for the text sequence input comprise a plurality of unified suggestions to modify the text sequence input in a plurality of different attributes.

4 . The method of claim 3 , wherein the plurality of different attributes comprises two or more members of the set consisting of: correctness, clarity, length, simplification, diversity, sensitivity, and tone.

5 . The method of claim 1 , the unified machine learning model having been trained to output the one or more text suggestions for all of:

a grammatic error correction (GEC) to correct a grammatic error in the text sequence input;

modifying the text sequence input by merging or splitting one or more words in the text sequence input;

modifying the text sequence input by expanding or compressing one or more words in the text sequence input;

modifying the text sequence input by simplifying or complexifying one or more words in the text sequence input;

modifying the text sequence input by paraphrasing one or more words in the text sequence input;

modifying the text sequence input by de-toxifying one or more words in the text sequence input; and

modifying the text sequence input by using formal or informal terms for one or more words in the text sequence input or changing a sentence structure.

6 . The method of claim 1 , further comprising:

determining a first suggestion plot for a plurality of attributes before applying the one or more text suggestions for the plurality of words of the text sequence input;

determining a second suggestion plot for the plurality of attributes after applying the one or more text suggestions for the plurality of words of the text sequence input;

determining a suggestion improvement by comparing the first suggestion plot to the second suggestion plot; and

in response to determining the suggestion improvement is above a predetermined threshold, accepting the text suggestions for the plurality of words of the text sequence input.

7 . The method of claim 6 , further comprising, in response to determining that the suggestion improvement is below the predetermined threshold, rejecting the one or more text suggestions for the plurality of words of the text sequence input.

8 . The method of claim 1 , further comprising:

before executing the inference stage: receiving first dimension input specifying one or more of the attributes of natural language to check, and receiving second dimension input specifying one or more of the attributes of natural language not to check;

determining two or more input prefixes corresponding to the first dimension input and the second dimension input; and

programmatically transmitting the two or more input prefixes to the trained unified machine learning model to limit the outputting of the one or more text suggestions for the text sequence input and explanation data in relation to the attributes of natural language corresponding to the first dimension input and the second dimension input.

9 . The method of claim 8 , further comprising receiving the first dimension input and the second dimension input from a user computer associated with an end user or an administrator.

10 . The method of claim 8 , further comprising determining the first dimension input and the second dimension input by reading configuration data.

11 . The method of claim 1 , wherein the unified machine learning model has been trained on a corpus of training data in which one or more unmodified natural language text strings in the plurality of pairs of records is labeled concurrently with two or more prefixes among the one or more prefixes.

12 . The method of claim 1 , wherein the unified machine learning model has been trained on a parallel corpus of training data in which one or more unmodified natural language text strings in the plurality of pairs of records are labeled using each combination of every possible combination of at least three different prefixes among the one or more prefixes.

13 . One or more computer-readable non-transitory storage media and storing one or more sequences of instructions which when executed by one or more processors cause the one or more processors to execute:

receiving, from a client device, a text sequence input that comprises a plurality of words;

using a server computer, executing an inference stage of a trained unified machine learning model over the text sequence input, the unified machine learning model having been trained on a training dataset comprising a plurality of pairs of records, each of the pairs of records comprising an unmodified natural language text string and a modified natural language text string, each of the unmodified natural language text strings being labeled using one or more prefixes, each prefix among the one or more prefixes corresponding to a different attribute of natural language that is represented in the modified natural language text string, the modified natural language text string comprising one or more modifications corresponding to the one or more prefixes;

using the unified machine learning model, outputting one or more text suggestions for the text sequence input and explanation data comprising one or more prefixes corresponding to the one or more text suggestions, wherein the one or more text suggestions and the explanation data are outputs of the unified machine learning model; and

transmitting, to the client device, instructions for presenting a user interface comprising the one or more text suggestions for the text sequence input and the explanation data.

14 . The computer-readable non-transitory storage media of claim 13 , wherein the unified machine learning model comprises a multi-class neural network.

15 . The computer-readable non-transitory storage media of claim 13 , such that the one or more text suggestions for the text sequence input comprise a plurality of unified suggestions to modify the text sequence input in a plurality of different attributes.

16 . The computer-readable non-transitory storage media of claim 13 , wherein the plurality of attributes comprises two or more members of the set consisting of: correctness, clarity, length, simplification, diversity, sensitivity, and tone.

17 . The computer-readable non-transitory storage media of claim 13 , the unified machine learning model having been trained to output the one or more text suggestions for all of:

a grammatic error correction (GEC) to correct a grammatic error in the text sequence input;

modifying the text sequence input by merging or splitting one or more words in the text sequence input;

modifying the text sequence input by expanding or compressing one or more words in the text sequence input;

modifying the text sequence input by simplifying or complexifying one or more words in the text sequence input;

modifying the text sequence input by paraphrasing one or more words in the text sequence input;

modifying the text sequence input by de-toxifying one or more words in the text sequence input; and

modifying the text sequence input by using formal or informal terms for one or more words in the text sequence input.

18 . The computer-readable non-transitory storage media of claim 13 , further comprising sequences of instructions which when executed by the one or more processors cause the one or more processors to execute:

determining a first suggestion plot for a plurality of attributes before applying the one or more text suggestions for the plurality of words of the text sequence input;

determining a second suggestion plot for the plurality of attributes after applying the one or more text suggestions for the plurality of words of the text sequence input;

determining a suggestion improvement by comparing the first suggestion plot to the second suggestion plot; and

in response to determining the suggestion improvement is above a predetermined threshold, accepting the text suggestions for the plurality of words of the text sequence input.

19 . The computer-readable non-transitory storage media of claim 18 , further comprising sequences of instructions which when executed by the one or more processors cause the one or more processors to execute, in response to determining that the suggestion improvement is below the predetermined threshold, rejecting the text suggestions for the plurality of words of the text sequence input.

20 . The computer-readable non-transitory storage media of claim 13 , further comprising sequences of instructions which when executed by the one or more processors cause the one or more processors to execute:

before executing the inference stage: receiving first dimension input specifying one or more of the attributes of natural language to check, and receiving second dimension input specifying one or more of the attributes of natural language not to check;

determining two or more input prefixes corresponding to the first dimension input and the second dimension input; and

programmatically transmitting the two or more input prefixes to the trained unified machine learning model to limit the outputting of the one or more text suggestions for the text sequence input and explanation data to the attributes of natural language corresponding to the first dimension input and the second dimension input.

21 . The computer-readable non-transitory storage media of claim 20 , further comprising sequences of instructions which when executed by the one or more processors cause the one or more processors to execute: receiving the first dimension input and the second dimension input from a user computer associated with an end user or an administrator.

22 . The computer-readable non-transitory storage media of claim 20 , further comprising sequences of instructions which when executed by the one or more processors cause the one or more processors to execute: determining the first dimension input and the second dimension input by reading configuration data.