Controllable style-based text conversion

文档序号:1087374 发布日期:2020-10-20 浏览:4次 中文

阅读说明:本技术 可控的基于风格的文本转换 (Controllable style-based text conversion ) 是由 A·米什拉 P·贾因 A·P·阿扎德 K·桑卡拉纳拉亚南 于 2020-03-25 设计创作,主要内容包括:本文提供了用于多风格文本转换的方法、系统和计算机程序产品。计算机实现的方法包括获得输入文本和选择用于转换输入文本的一组风格规范。该组风格规范包括从多个书写风格领域中选择的一个或多个目标书写风格领域、针对目标书写风格领域中的每个目标书写风格领域的权重和用于输入文本的转换的一组语言学方面中的每个语言学方面的权重。针对目标书写风格领域的权重表示目标书写风格领域对输入文本的转换的相对影响。该计算机实现的方法还包括利用无监督神经网络至少部分地基于该组风格规范生成一个或多个经风格转换的输出文本。(Methods, systems, and computer program products for multi-style text conversion are provided herein. A computer-implemented method includes obtaining input text and selecting a set of style specifications for converting the input text. The set of style specifications includes one or more target writing style fields selected from a plurality of writing style fields, a weight for each target writing style field in the target writing style fields, and a weight for each linguistic aspect in a set of linguistic aspects of a conversion of the input text. The weights for the target writing style field represent the relative impact of the target writing style field on the conversion of the input text. The computer-implemented method also includes generating, with the unsupervised neural network, one or more style-converted output texts based at least in part on the set of style specifications.)

1. A computer-implemented method comprising the steps of:

obtaining an input text;

selecting a set of style specifications for converting the input text, the set of style specifications comprising: one or more target writing style fields selected from a plurality of writing style fields; a weight for each of the target writing style fields, the weight representing a relative impact of the target writing style field on the conversion of the input text; and a weight for each linguistic aspect of the converted set of linguistic aspects of the input text; and

generating, with an unsupervised neural network, one or more style-converted output texts based at least in part on the set of style specifications;

wherein the steps are performed by at least one processing device.

2. The computer-implemented method of claim 1, wherein the plurality of writing style fields comprises two or more of: defaulting the domain; the field of academia; the technical field; the field of advertising; the field of law; and in the medical field.

3. The computer-implemented method of claim 1, wherein the set of linguistic aspects includes at least one of: formality, emotional intensity, and tone.

4. The computer-implemented method of claim 1, wherein the selecting the set of style specifications comprises: providing a real number input as a weight for the selected target writing style field proportional to a desired relative impact of the selected target writing style field on the style-converted output text.

5. The computer-implemented method of claim 1, wherein the selecting the set of style specifications comprises: providing a real input corresponding to a desired impact of the set of linguistic aspects on the style-converted output text as a weight for each linguistic aspect in the set of linguistic aspects.

6. The computer-implemented method of claim 1, wherein the unsupervised neural network comprises a deep learning network comprising a plurality of gated loop units.

7. The computer-implemented method of claim 1, wherein the generating the one or more stylized output texts comprises:

generating an embedding for the input text;

generating a domain-specific, stylized output text with each decoder of a subset of a plurality of decoders, the subset of the plurality of decoders being associated with the selected targeted writing style domain and provided with the embedding for the input text, weights for the selected targeted writing style domain, and weights for the set of linguistic aspects; and

generating a given one of the style-converted output texts as a combination of the domain-specific style-converted output texts from each decoder of the subset of the plurality of decoders.

8. The computer-implemented method of claim 1, comprising:

training the unsupervised neural network, wherein training the unsupervised neural network comprises:

generating an embedding for a given training text from a given domain of the plurality of domains;

generating domain-specific, stylized, transformed training output text utilizing a plurality of decoders associated with the plurality of writing style domains, a given decoder of the decoders corresponding to a given domain provided with a set of training weights for a set of training writing style domains and the set of linguistic aspects, other decoders of the decoders corresponding to other domains of the plurality of domains provided with zero values of weights for the training writing style domains and the set of linguistic aspects; and

generating a given style-converted training output text as a combination of the domain-specific style-converted training output texts from the plurality of decoders.

9. The computer-implemented method of claim 8, wherein the training the unsupervised neural network comprises:

determining a domain style score vector for the given style-converted training output text, the domain style score vector comprising a list of scores, wherein each score represents how well the given style-converted training output text follows a style of one of a set of training writing style domains; and

determining a linguistic aspect score vector for the given style-converted output text, the linguistic aspect score vector including a score corresponding to each linguistic aspect in the set of linguistic aspects, the score calculated using a natural language processing tool trained for the linguistic aspect.

10. The computer-implemented method of claim 9, wherein the training the unsupervised neural network comprises:

calculating a first control loss indicative of a gap between (i) training weights for the set of training writing style domains and (ii) the scores in the domain style score vector;

calculating a second control penalty indicating a gap between (i) the training weights for the set of linguistic aspects and (ii) the scores in the linguistic aspect score vector;

calculating a reconstruction loss by comparing the fluency of the training input text to the fluency of the given style-converted training output text; and

calculating a reverse translation loss by performing a reverse translation of the given style-converted training output text via the plurality of decoders.

11. The computer-implemented method of claim 10, wherein the training the unsupervised neural network comprises: minimizing the first control penalty, the second control penalty, the reconstruction penalty, and the reverse translation penalty.

12. A computer program product comprising a computer readable storage medium having program instructions embodied therein, the program instructions being executable by at least one computing device to cause the at least one computing device to perform the steps of any of claims 1 to 11.

13. A system, comprising:

a memory; and

at least one processor coupled to the memory and configured to perform the steps of any of claims 1 to 11.

14. A computer-implemented method comprising the steps of:

receiving an input text segment to be style converted according to a set of style control parameters specified in a control vector;

passing the input text segment to an unsupervised neural network comprising a plurality of gated loop units;

determining a hidden representation of the input text segment with a first subset of the plurality of gated loop units arranged in a stack providing an encoder; and

generating a style-converted output text segment with a second subset of the plurality of gating cycle units that provide a decoder that generates each word in the style-converted output text segment with a non-linear function that outputs a probability distribution for a given word in the style-converted output text segment based on (i) embedding of a previously-generated word of the style-converted output text segment, (ii) the control vector, (iii) a vector obtained by focusing on the hidden representation of the input text segment, and (iv) a hidden state of a decoder of the unsupervised neural network;

wherein the steps are performed by at least one processing device.

15. The computer-implemented method of claim 14, comprising:

training the unsupervised neural network by repeating the passing, determining, and generating steps for each of a plurality of training input text segments, and for each generated style-converted output text segment corresponding to a given training input text segment of the training input text segments:

generating a set of variants of the generated style-converted output text segment;

selecting a given variant of the variants of the generated stylized output text passage based at least in part on a semantic relevance of the given training input text passage, a fluency of the given variant of the generated stylized output text passage as measured using a specified language model, and a readability grade score of the given variant of the generated stylized output text passage; and

determining a set of style control parameters associated with the given variant of the generated style-converted output text segment.

16. The computer-implemented method of claim 15, comprising:

training the encoder and decoder of the unsupervised neural network using the given variant of the generated style-converted output text segment and its associated set of style control parameters as labeled training data.

Technical Field

The present invention relates to information technology, and more particularly, to text conversion.

Background

Natural language generation techniques are used in a variety of application domains (including translators, summarizers, and dialog generators). An automated dialog system or a dialog system may be used, for example, to create various workspaces with different dialog flows for implementing a chat robot for customer support, user interaction, and the like. A chat bot is a computer program or other software that is capable of performing conversational communication via auditory and/or text processing. Natural language generation techniques may be used to generate portions of such conversational communication.

Disclosure of Invention

Embodiments of the present invention provide techniques for controlled style-based text conversion.

In one embodiment, a computer-implemented method comprises the steps of: obtaining an input text; selecting a set of style specifications for converting input text, the set of style specifications comprising: one or more target writing style fields selected from a plurality of writing style fields; a weight for each of the target writing style fields, the weight representing a relative impact of the target writing style field on a transformation of the input text; and a weight for each linguistic aspect in the set of linguistic aspects of the conversion of the input text; and generating, with the unsupervised neural network, one or more style-converted output texts based at least in part on the set of style specifications. The steps are performed by at least one processing device.

In another embodiment, a computer-implemented method comprises the steps of: receiving an input text segment to be style converted according to a set of style control parameters specified in a control vector; passing the input text segment to an unsupervised neural network comprising a plurality of gated recurrents units; determining a hidden representation of the input text segment with a first subset of the plurality of gated loop units arranged in a stack providing an encoder; and generating a style-converted output text segment using a second subset of the plurality of gating cycle units providing a decoder, the decoder generating each word in the style-converted output text segment using a non-linear function that outputs a probability distribution for a given word in the style-converted output text segment based on (i) embedding of a previously generated word of the style-converted output text segment, (ii) a control vector, (iii) a vector obtained by focusing on a hidden representation of the input text segment, and (iv) a hidden state of the decoder of the unsupervised neural network. The steps are performed by at least one processing device.

Another embodiment of the invention or elements thereof may be implemented in the form of an article of manufacture tangibly embodying computer readable instructions which, when implemented, cause a computer to perform a plurality of method steps as described herein. Furthermore, another embodiment of the invention or elements thereof may be implemented in the form of an apparatus comprising a memory and at least one processor coupled to the memory and configured to perform the proposed method steps. Still further, another embodiment of the invention or elements thereof may be implemented in the form of an apparatus for performing the method steps or elements thereof described herein; the apparatus may include hardware modules or a combination of hardware and software modules, where the software modules are stored in a tangible computer-readable storage medium (or multiple such media).

These and other objects, features and advantages of the present invention will become apparent from the following detailed description of illustrative embodiments thereof, which is to be read in connection with the accompanying drawings.

Drawings

FIG. 1 illustrates a tunable multi-style text conversion system according to an exemplary embodiment of the present invention.

FIG. 2 illustrates an example of text conversion using the system of FIG. 1, according to an exemplary embodiment of the present invention.

FIG. 3 illustrates another tunable multi-format text conversion system according to an exemplary embodiment of the present invention.

FIG. 4 illustrates a process for controllable style-based text conversion according to an exemplary embodiment of the present invention.

FIG. 5 illustrates another process for controlled style-based text conversion according to an exemplary embodiment of the present invention.

FIG. 6 illustrates a computer system according to which one or more components/steps of the present technology may be implemented, according to an exemplary embodiment of the present invention.

FIG. 7 illustrates a cloud computing environment in accordance with an exemplary embodiment of the present invention.

Fig. 8 illustrates abstraction model layers according to an exemplary embodiment of the present invention.

Detailed Description

26页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:对话文本生成方法、装置、计算机设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!