# US 2019/0057081 A1 · Method and apparatus for generating natural language

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

- Number: US 2019/0057081 A1
- Document ID: US20190057081A1
- Status: Published application
- Kind: A1
- Application number: 15/837,626
- Filed: 2017-12-11
- Published: 2019-02-21
- Earliest claimed: 2017-08-18
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Junhwi CHOI; Young-Seok KIM; Sang Hyun YOO; Jehun JEON
- Web page: https://patentgrep.com/patent/US20190057081A1

## CPC

- G06F 40/30: Semantic analysis
- G06F 40/56: Natural language generation
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G10L 25/30: using neural networks
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06Q 30/0251: Targeted advertisements
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G10L: SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR

## Abstract

A natural language generation method and apparatus are provided. The natural language generation apparatus converts an input sentence to a first vector using a first neural network model-based encoder, determines whether a control word is to be provided based on a criterion, and converts the first vector to an output sentence using a neural network model-based decoder, based on whether the control word is to be provided.

## Claims

### Claim 1

A method of generating a natural language, the method comprising:
converting an input sentence to a first vector using a first neural network model-based encoder;
determining whether a control word is to be provided based on a condition; and
converting the first vector to an output sentence using a neural network model-based decoder based on whether the control word is to be provided.

### Claim 2 (depends on 1)

The method of claim 1, wherein the converting of the first vector to the output sentence comprises, in response to a determination that the control word is to be provided:
converting the control word to a second vector using a second neural network model-based encoder; and
converting the first vector to the output sentence based on the second vector using the decoder.

### Claim 3 (depends on 1)

The method of claim 1, wherein the converting of the first vector to the output sentence comprises, converting the first vector to the output sentence using the decoder, in response to a determination that the control word is not to be provided.

### Claim 4 (depends on 1)

The method of claim 1, wherein the determining of whether the control word is to be provided comprises determining whether the control word is to be provided based on a similarity between the first vector and a reference vector.

### Claim 5 (depends on 1)

The method of claim 1, wherein the determining of whether the control word is to be provided comprises:
recognizing a conversation pattern of the input sentence and a sentence that is input prior to the input sentence; and
determining whether the control word is to be provided based on whether the recognized conversation pattern corresponds to a reference pattern.

### Claim 6 (depends on 1)

The method of claim 1, wherein the determining of whether the control word is to be provided comprises determining whether the control word is to be provided based on any one or any combination of whether a point in time at which the input sentence is input corresponds to a preset time, whether the input sentence is input in a preset conversational turn, or a preset frequency of providing the control word.

### Claim 7 (depends on 1)

The method of claim 1, wherein the control word comprises a content word that is a target of an advertisement.

### Claim 8 (depends on 1)

The method of claim 1, wherein the control word comprises a function word that is used to determine a structure of a sentence.

### Claim 9 (depends on 1)

The method of claim 1, wherein the control word comprises a function word to perform a function in response to the input sentence.

### Claim 10 (depends on 1)

A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the method of claim 1.

### Claim 11

A method of training a natural language generation apparatus, the method comprising:
converting a training sentence to a first vector using a first neural network model-based encoder;
determining whether a control word is to be provided based on a criterion;
converting the first vector to an output sentence using a neural network model-based decoder based on whether the control word is to be provided; and
training the first encoder and the decoder by evaluating an accuracy of the output sentence.

### Claim 12 (depends on 11)

The method of claim 11, wherein
the converting of the first vector to the output sentence comprises, in response to a determination that the control word is to be provided:
converting the control word to a second vector using a second neural network model-based encoder; and
converting the first vector to the output sentence based on the second vector using the decoder, and
the training of the first encoder and the decoder comprises training the first encoder, the second encoder and the decoder by evaluating the accuracy of the output sentence.

### Claim 13 (depends on 11)

The method of claim 11, wherein the converting of the first vector to the output sentence comprises, converting the first vector to the output sentence using the decoder, in response to a determination that the control word is not to be provided.

### Claim 14 (depends on 11)

The training method of claim 11, wherein
the determining of whether the control word is to be provided comprises determining whether the control word is to be provided based on a similarity between the first vector and a reference vector, and
the training of the first encoder and the decoder comprises modulating the criterion by evaluating the accuracy of the output sentence.

### Claim 15 (depends on 11)

The method of claim 11, wherein
the determining of whether the control word is to be provided comprises:
recognizing a conversation pattern for the training sentence and a sentence that is input prior to the training sentence; and
determining whether the control word is to be provided based on whether the recognized conversation pattern corresponds to a reference pattern, and the training of the first encoder and the decoder comprises modulating the criterion by evaluating the accuracy of the output sentence.

### Claim 16 (depends on 11)

The method of claim 11, wherein the training sentence comprises the input sentence and a natural language output sentence corresponding to the input sentence, and the evaluating of the accuracy of the output sentence comprises a comparison of the natural language output sentence with the output sentence.

### Claim 17

An apparatus for generating a natural language, the apparatus comprising:
a processor configured to:
convert an input sentence to a first vector using a first neural network model-based encoder;
determine whether a control word is to be provided based on a criterion; and
convert the first vector to an output sentence using a neural network model-based decoder based on whether the control word is to be provided.

### Claim 18 (depends on 17)

The apparatus of claim 17 further comprising:
a second neural network model-based encoder configured to convert the control word to a second vector, in response to a determination that the control word is to be provided, and
the decoder is configured to convert the first vector to the output sentence based on the second vector.

### Claim 19 (depends on 18)

The apparatus of claim 18, further comprising a memory coupled to the processor, the memory comprising an instruction executed by the processor, and the memory being configured to store the input sentence, the first vector to which the input sentence is converted, the control word, one or more criterion used to determine whether the control word is to be provided, the second vector to which the control word is converted, a result obtained by combining the first vector and the second vector, and the output sentence.

### Claim 20

An apparatus for training a natural language generation apparatus, the apparatus comprising:
a processor configured to:
convert a training sentence to a first vector using a first neural network model-based encoder;
determine whether a control word is to be provided based on a criterion;
convert the first vector to an output sentence using a neural network model-based decoder based on whether the control word is to be provided; and
train the first encoder and the decoder by evaluating an accuracy of the output sentence.

### Claim 21 (depends on 20)

The apparatus of claim 20, further comprising a memory coupled to the processor, the memory storing an instruction executed by the processor to convert the training sentence to the first vector, to determine whether to provide the control word, to convert the first vector to the output sentence, and to evaluate the accuracy of the output sentence.
