US11809804B2ActiveUtilityA1

Text formatter

95
Assignee: TWILIO INCPriority: May 26, 2021Filed: May 26, 2021Granted: Nov 7, 2023
Est. expiryMay 26, 2041(~14.9 yrs left)· nominal 20-yr term from priority
G06F 40/30G06F 40/103G06F 40/166G06N 20/00G06F 40/16G06F 40/253G06F 40/232G06F 40/216G06F 40/284G06F 40/111G06F 40/117
95
PatentIndex Score
6
Cited by
72
References
23
Claims

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

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A computer-implemented method comprising:
 accessing raw text comprising a plurality of words corresponding to one or more sentences; 
 creating a plurality of sub-words corresponding to the raw text; 
 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 indicating a formatting operation for the corresponding sub-word; and 
 generating, based on the formatting operations in the outputs for the sub-words, formatted text corresponding to the raw text, the text being formatted according to a meaning of words spoken by a speaker associated with the raw text. 
 
     
     
       2. The method as recited in  claim 1 , wherein the raw text comprises unformatted text excluding any punctuation. 
     
     
       3. The method as recited in  claim 1 , wherein the formatted text comprises text with correct grammar, proper punctuation, and proper capitalization. 
     
     
       4. The method as recited in  claim 1 , wherein the ML model outputs punctuation marks for the sub-words, the punctuation marks comprising one or more of: commas, periods, or question marks. 
     
     
       5. The method as recited in  claim 1 , wherein the ML model is obtained by training an ML program with training data that includes words from conversations organized into paragraphs, proper formatting of the paragraphs, and corresponding raw text of the paragraphs. 
     
     
       6. The method as recited in  claim 5 , wherein features used by the ML program include sub-words, commas, periods, and question marks. 
     
     
       7. The method as recited in  claim 1 , wherein the ML model capitalizes acronyms and formats words that have been spelled out by the speaker. 
     
     
       8. The method as recited in  claim 1 , wherein the ML model formats phone numbers. 
     
     
       9. The method as recited in  claim 1 , wherein generating formatted text comprises one or more of:
 capitalizing acronyms and word spellings; 
 punctuating text; 
 capitalizing names of entities; 
 formatting members and Uniform Resource Locators (URLs); or 
 formatting phone numbers. 
 
     
     
       10. The method as recited in  claim 9 , wherein each operation for formatting text is performed by a respective ML model. 
     
     
       11. The method as recited in  claim 9 , wherein the operations for formatting text are performed by a multi-purpose ML model. 
     
     
       12. The method as recited in  claim 1 , wherein generating formatted text includes utilizing at least one ML model and at least one heuristic formatting algorithm. 
     
     
       13. A system comprising:
 a memory comprising instructions; and 
 one or more computer processors, wherein the instructions, when executed by the one or more computer processors, cause the system to perform operations comprising:
 accessing raw text comprising a plurality of words corresponding to one or more sentences; 
 creating a plurality of sub-words corresponding to the raw text; 
 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 indicating a formatting operation for the corresponding sub-word; and 
 generating, based on the formatting operations in the outputs for the sub-words, formatted text corresponding to the raw text, the text being formatted according to a meaning of words spoken by a speaker associated with the raw text. 
 
 
     
     
       14. The system as recited in  claim 13 , wherein the raw text comprises unformatted text excluding any punctuation, wherein the formatted text comprises text with correct grammar, proper punctuation, and proper capitalization. 
     
     
       15. The system as recited in  claim 13 , wherein the ML model outputs punctuation marks for the sub-words, the punctuation marks comprising one or more of: commas, periods, or question marks. 
     
     
       16. The system as recited in  claim 13 , wherein the ML model is obtained by training an ML program with training data that includes words from conversations organized into paragraphs, proper formatting of the paragraphs, and corresponding raw text of the paragraphs. 
     
     
       17. The system as recited in  claim 16 , wherein features used by the ML program include sub-words, commas, periods, and question marks. 
     
     
       18. The system as recited in  claim 13 , wherein the ML model capitalizes acronyms and formats words that have been spelled out by the speaker. 
     
     
       19. A tangible machine-readable storage medium including instructions that, when executed by a machine, cause the machine to perform operations comprising:
 accessing raw text comprising a plurality of words corresponding to one or more sentences; 
 creating a plurality of sub-words corresponding to the raw text; 
 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 indicating a formatting operation for the corresponding sub-word; and 
 generating, based on formatting operations in the outputs for the sub-words, formatted text corresponding to the raw text, the text being formatted according to a meaning of words spoken by a speaker associated with the raw text. 
 
     
     
       20. The tangible machine-readable storage medium as recited in  claim 19 , wherein the raw text comprises unformatted text excluding any punctuation, wherein the formatted text comprises text with correct grammar, proper punctuation, and proper capitalization. 
     
     
       21. The tangible machine-readable storage medium as recited in  claim 19 , wherein the ML model outputs punctuation marks for the sub-words, the punctuation marks comprising one or more of: commas, periods, or question marks. 
     
     
       22. The tangible machine-readable storage medium as recited in  claim 19 , wherein the ML model is obtained by training an ML program with training data that includes words from conversations organized into paragraphs, proper formatting of the paragraphs, and corresponding raw text of the paragraphs. 
     
     
       23. The tangible machine-readable storage medium as recited in  claim 22 , wherein features used by the ML program include sub-words, commas, periods, and question marks.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.