Generation of text from structured data
US-2020356729-A1 · Nov 12, 2020 · US
US2022138435A1 · US · A1
| Field | Value |
|---|---|
| Publication number | US-2022138435-A1 |
| Application number | US-202217572930-A |
| Country | US |
| Kind code | A1 |
| Filing date | Jan 11, 2022 |
| Priority date | Jun 30, 2021 |
| Publication date | May 5, 2022 |
| Grant date | — |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
The disclosure provides a method for generating a text. The method includes: obtaining a coding sequence of a first text by coding the first text; obtaining a controllable attribute of a second text to be generated; predicting a hidden state of the second text based on the coding sequence of the first text and the controllable attribute of the second text; and obtaining a second text corresponding to the first text by decoding the coding sequence of the first text based on the hidden state of the second text.
Opening claim text (preview).
What is claimed is: 1 . A method for generating a text, comprising: obtaining a coding sequence of a first text by coding the first text; obtaining a controllable attribute of a second text to be generated; predicting a hidden state of the second text based on the coding sequence of the first text and the controllable attribute of the second text; and obtaining a second text corresponding to the first text by decoding the coding sequence of the first text based on the hidden state of the second text. 2 . The method according to claim 1 , wherein obtaining the controllable attribute of the second text to be generated comprises: obtaining a target value of the controllable attribute; and predicting a value of a controllable attribute of each character in the second text based on the target value and codes of each character of the first text in the coding sequence in a case that the controllable attribute is a local attribute. 3 . The method according to claim 2 , wherein after obtaining the target value of the controllable attribute, the method further comprises: determining that the value of the controllable attribute of each character in the second text is the target value in a case that the controllable attribute is a global attribute. 4 . The method according to claim 2 , wherein obtaining the target value of the controllable attribute comprises: determining the target value of the controllable attribute by a user operation; or obtaining the target value by predicting the controllable attribute based on the coding sequence of the first text. 5 . The method according to claim 2 , wherein predicting the hidden state of the second text based on the coding sequence of the first text and the controllable attribute of the second text comprises: obtaining a hidden state of a first character in the second text by fusing the coding sequence and the controllable attribute of the first character of the second text and decoding using a first recurrent neural network; and obtaining a hidden state of an n th character in the second text by fusing a hidden state of an (n−1) th character in the second text and a controllable attribute of the n th character in the second text, and decoding using the first recurrent neural network, where n is an integer greater than 1. 6 . The method according to claim 5 , wherein obtaining the second text corresponding to the first text by decoding the coding sequence of the first text based on the hidden state of the second text, comprises: obtaining a code of the first character in the second text by fusing the coding sequence and the hidden state of the first character in the second text, and decoding by using a second recurrent neural network; obtaining a code of the n th character in the second text by fusing the coding sequence of the first text, the hidden state of the n th character in the second text and a code of the (n−1) th character in the second text, and decoding by using the second recurrent neural network; and determining the second text based on a code of each character in the second text. 7 . The method according to claim 2 , wherein predicting the value of the controllable attribute of each character of the second text based on the target value and the code of each character of the first text, comprises: obtaining a value of the controllable attribute of a first character in the second text by fusing the target value and the coding sequence of the first text, and inputting into a third recurrent neural network; and obtaining a value of the controllable attribute of the n th character in the second text by fusing the value of the controllable attribute of the (n−1) th character in the second text, the target value and the coding sequence of the first text, and decoding by the third recurrent neural network. 8 . An apparatus for generating a text, comprising: at least one processor and a memory communicatively connected with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the at least one processor is configured to: obtain a coding sequence of a first text by coding the first text; obtain a controllable attribute of a second text to be generated; predict a hidden state of the second text based on the coding sequence of the first text and the controllable attribute of the second text; and obtain a second text corresponding to the first text by decoding the coding sequence of the first text based on the hidden state of the second text. 9 . The apparatus according to claim 8 , wherein the at least one processor is configured to: obtain a target value of the controllable attribute; and predict a value of a controllable attribute of each character in the second text based on the target value and codes of each character of the first text in the coding sequence in a case that the controllable attribute is a local attribute. 10 . The apparatus according to claim 9 , wherein the at least one processor is configured to: determine that the value of the controllable attribute of each character in the second text is the target value in a case that the controllable attribute is a global attribute. 11 . The apparatus according to claim 9 , wherein the at least one processor is configured to: determine the target value of the controllable attribute by a user operation; or obtain the target value by predicting the controllable attribute based on the coding sequence of the first text. 12 . The apparatus according to claim 9 , wherein the at least one processor is configured to: obtain a hidden state of a first character in the second text by fusing the coding sequence and the controllable attribute of the first character of the second text and decode using a first recurrent neural network; and obtain a hidden state of an n th character in the second text by fusing a hidden state of an (n−1) th character in the second text and a controllable attribute of the n th character in the second text, and decode using the first recurrent neural network, where n is an integer greater than 1. 13 . The apparatus according to claim 12 , wherein the at least one processor is configured to: obtain a code of the first character in the second text by fusing the coding sequence and the hidden state of the first character in the second text, and decoding by using a second recurrent neural network; obtain a code of the n th character in the second text by fusing the coding sequence of the first text, the hidden state of the n th character in the second text and a code of the (n−1) th character in the second text, and decoding by using the second recurrent neural network; and determine the second text based on a code of each character in the second text. 14 . The apparatus according to claim 9 , wherein the at least one processor is configured to: obtain a value of the controllable attribute of a first character in the second text by fusing the target value and the coding sequence of the first text, and inputting into a third recurrent neural network; and obtain a value of the controllable attribute of the n th character in the second text by fusing the value of the controllable attribute of the (n−1) th character in the second text, the target value and the coding sequence of the first text, and decoding by the third recurrent neural network. 15 . A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are configured to make a computer execute the method according to claim 1 , and the method comprises:
Natural language generation · CPC title
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) · CPC title
Dictionaries · CPC title
Processing or translation of natural language (natural language analysis G06F40/20; semantic analysis G06F40/30) · CPC title
Semantic analysis · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.