# US 2025/0094684 A1 · Text formatter

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

- Number: US 2025/0094684 A1
- Document ID: US20250094684A1
- Status: Published application
- Kind: A1
- Application number: 18/961,757
- Filed: 2024-11-27
- Published: 2025-03-20
- Earliest claimed: 2021-05-26
- Assignees: Twilio Inc.
- Applicants: Twilio Inc.
- Inventors: Alfredo Láinez Rodrigo; Luke Percival de Oliveira; Umair Akeel; Tyler Cole
- Web page: https://patentgrep.com/patent/US20250094684A1

## CPC

- G06F 40/103: Formatting, i.e. changing of presentation of documents (automatic justification G06F40/189; automatic line break hyphenation G06F40/191)
- G06F 40/16: Automatic learning of transformation rules, e.g. from examples
- G06F 40/111: Mathematical or scientific formatting; Subscripts; Superscripts
- G06F 40/117: Tagging; Marking up (details of markup languages G06F40/143); Designating a block; Setting of attributes (style sheets, e.g. eXtensible Stylesheet Language Transformation [XSLT], G06F40/154)
- G06F 40/166: Editing, e.g. inserting or deleting
- G06F 40/216: using statistical methods
- 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
- G06N 20/00: Machine learning
- G06F 40/30: Semantic analysis
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Methods, systems, and computer programs are presented for formatting raw text. One method includes an operation for accessing raw text comprising words corresponding to one or more sentences. The raw text is lowercase text without any punctuation. Further, the method includes operations for creating a plurality of sub-words corresponding to the raw text, and for generating, by a machine-learning (ML) model, an output for each sub-word based on the created sub-words. The output for each sub-word indicates a formatting operation for the corresponding sub-word. The method further includes an operation for generating, based on the formatting operations in the outputs for the sub-words, formatted text corresponding to the raw text. The formatted text is text with correct grammar, proper punctuation, and proper capitalization according to a meaning of words spoken by a speaker associated with the raw text.

## Claims

### Claim 1

A method comprising:
accessing, by one or more processors, text that includes words;
determining, by the one or more processors, parts of the words based on the text;
generating, by one or more machine-learning (ML) models, a vector in which each of multiple values specifies a corresponding formatting operation for a corresponding part among the parts of the words in the text; and
generating, by the one or more processors, a formatted output based on the vector generated by the one or more ML models.

### Claim 2 (depends on 1)

The method of claim 1, wherein:
the accessed text is unformatted text without punctuation;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate punctuation to be applied to determined parts of words; and
the formatted output is punctuated correctly.

### Claim 3 (depends on 1)

The method of claim 1, wherein:
the accessed text is unformatted text without capitalization;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate capitalization to be applied to determined parts of words; and
the formatted output is capitalized correctly.

### Claim 4 (depends on 1)

The method of claim 1, wherein:
the accessed text includes a word spelled letter by letter;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate joining spelled letters into words; and
the formatted output includes a joined word.

### Claim 5 (depends on 1)

The method of claim 1, wherein:
the accessed text includes an acronym spelled letter by letter;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate capitalization of acronyms; and
the formatted output includes a capitalized acronym.

### Claim 6 (depends on 1)

The method of claim 1, wherein:
the accessed text includes a phone number;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate formatting of phone numbers; and
the formatted output includes a formatted phone number.

### Claim 7 (depends on 1)

The method of claim 1, wherein:
the accessed text includes a uniform resource locator (URL);
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate formatting of URLs; and
the formatted output includes a formatted URL.

### Claim 8

A system comprising:
one or more processors; and
a memory storing instructions that, when executed by the one or more processors, cause the system to perform operations comprising:
accessing text that includes words;
determining parts of the words based on the text;
generating, by one or more machine-learning (ML) models, a vector in which each of multiple values specifies a corresponding formatting operation for a corresponding part among the parts of the words in the text; and
generating a formatted output based on the vector generated by the one or more ML models.

### Claim 9 (depends on 8)

The system of claim 8, wherein:
the accessed text is unformatted text without punctuation;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate punctuation to be applied to determined parts of words; and
the formatted output is punctuated correctly.

### Claim 10 (depends on 8)

The system of claim 8, wherein:
the accessed text is unformatted text without capitalization;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate capitalization to be applied to determined parts of words; and
the formatted output is capitalized correctly.

### Claim 11 (depends on 8)

The system of claim 8, wherein:
the accessed text includes a word spelled letter by letter;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate joining spelled letters into words; and
the formatted output includes a joined word.

### Claim 12 (depends on 8)

The system of claim 8, wherein:
the accessed text includes an acronym spelled letter by letter;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate capitalization of acronyms; and
the formatted output includes a capitalized acronym.

### Claim 13 (depends on 8)

The system of claim 8, wherein:
the accessed text includes a phone number;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate formatting of phone numbers; and
the formatted output includes a formatted phone number.

### Claim 14 (depends on 8)

The system of claim 8, wherein:
the accessed text includes a uniform resource locator (URL);
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate formatting of URLs; and
the formatted output includes a formatted URL.

### Claim 15

A non-transitory machine-readable medium comprising instructions that, when executed by one or more processors of a machine, cause the machine to perform operations comprising:
accessing text that includes words;
determining parts of the words based on the text;
generating, by one or more machine-learning (ML) models, a vector in which each of multiple values specifies a corresponding formatting operation for a corresponding part among the parts of the words in the text; and
generating a formatted output based on the vector generated by the one or more ML models.

### Claim 16 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein:
the accessed text is unformatted text without punctuation;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate punctuation to be applied to determined parts of words; and
the formatted output is punctuated correctly.

### Claim 17 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein:
the accessed text is unformatted text without capitalization;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate capitalization to be applied to determined parts of words; and
the formatted output is capitalized correctly.

### Claim 18 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein:
the accessed text includes a word spelled letter by letter;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate joining spelled letters into words; and
the formatted output includes a joined word.

### Claim 19 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein:
the accessed text includes an acronym spelled letter by letter;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate capitalization of acronyms; and
the formatted output includes a capitalized acronym.

### Claim 20 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein:
the accessed text includes a phone number;
an ML model among the one or more ML models is trained to output one or more formatting operations that indicate formatting of phone numbers; and
the formatted output includes a formatted phone number.
