CPC G06F 16/2452 (2019.01) [G06N 3/02 (2013.01)] | 11 Claims |
1. A method for controlling an electronic apparatus, the method comprising:
translating, by the electronic apparatus, a first query text of a first language to acquire a second query text of a second language;
transmitting, by the electronic apparatus, the acquired second query text to an external device;
acquiring, from the external device, a first response text of the second language in response to the second query text;
acquiring, by the electronic apparatus, a second response text acquired by translating the first response text into the first language, and identifying whether the second response text semantically matches to the first query text by inputting the second response text and the first query text into a first neural network model that identifies whether or not a query and a response semantically match; and
acquiring, by the electronic apparatus, a third query text of the second language by retranslating the first query text based on a result of identifying that the first query text and the second response text do not semantically match,
wherein the acquiring the third query text includes:
identifying, by the electronic apparatus, a first number of queries included in the first query text and a second number of queries included in the second query text, based on the result of identifying that the first query text and the second response text do not semantically match;
based on a result of identifying that the first number is different from the second number, acquiring, by the electronic apparatus, a fourth query text of the first language by dividing the first query text based on the first number of queries included in the first query text; and
acquiring, by the electronic apparatus, the third query text by translating the fourth query text into the second language,
wherein the method further comprises:
acquiring, by the electronic apparatus, a fifth query text of the first language in which the first query text is paraphrased by inputting the first query text into a paraphrase neural network that generates a paraphrased query text, based on a result of identifying that the first number is equal to the second number; and
acquiring, by the electronic apparatus, the third query text by translating the fifth query text into the second language,
wherein the paraphrase neural network performs learning by using a learning text of the first language as input data, and a text of the first language having a query intention that is same as a query intention of the input learning text as an output text.
|