[go: up one dir, main page]

RU2792579C2 - Systems and methods for translating natural language sentences into database queries - Google Patents

Systems and methods for translating natural language sentences into database queries Download PDF

Info

Publication number
RU2792579C2
RU2792579C2 RU2021100172A RU2021100172A RU2792579C2 RU 2792579 C2 RU2792579 C2 RU 2792579C2 RU 2021100172 A RU2021100172 A RU 2021100172A RU 2021100172 A RU2021100172 A RU 2021100172A RU 2792579 C2 RU2792579 C2 RU 2792579C2
Authority
RU
Russia
Prior art keywords
output
encoder
sentence
decoder
input
Prior art date
Application number
RU2021100172A
Other languages
Russian (ru)
Other versions
RU2021100172A (en
Inventor
Ребедя ТРАЯН
Бурчану ЕЛЕНА
Брад ФЛОРИН
Original Assignee
БИТДЕФЕНДЕР АйПиАр МЕНЕДЖМЕНТ ЛТД
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by БИТДЕФЕНДЕР АйПиАр МЕНЕДЖМЕНТ ЛТД filed Critical БИТДЕФЕНДЕР АйПиАр МЕНЕДЖМЕНТ ЛТД
Publication of RU2021100172A publication Critical patent/RU2021100172A/en
Application granted granted Critical
Publication of RU2792579C2 publication Critical patent/RU2792579C2/en

Links

Images

Abstract

FIELD: automatic translation.
SUBSTANCE: invention relates to a method, systems and a computer-readable medium for automatic translation from a natural language into an artificial machine-readable language. The method’s first step is execution of an artificial language (AL) encoder and a decoder associated with the AL encoder, wherein the AL encoder is configured to receive the first input array containing an artificial language representation of the AL input sentence and, in response, generate the first internal array, wherein the decoder is configured to receive the first internal array and, in response, produce the first output array containing a representation of the first artificial language AL output sentence; in response to providing the first input array to the encoder AL, the first similarity score indicating a degree of similarity between the AL input sentence and the first AL output sentence is determined; the first set of decoder parameters is adjusted in accordance with the first similarity score to improve the match between the AL encoder input and the decoder output; it is determined whether the first stage training completion condition is satisfied; in response to determining whether the learning completion condition of the first stage is satisfied, if the learning completion condition of the first stage is satisfied, a second stage is executed, which is execution of the natural language (NL) encoder configured to receive the second input array containing a representation of the NL input sentence formulated in natural language, and, in response, outputting the second internal array to the decoder; the second output array generated by the decoder in response to receiving the second internal array is determined, the second output array containing a representation of the second AL output sentence formulated in an artificial language; a second similarity score indicating a degree of similarity between the second AL output sentence and the target AL sentence containing the artificial language translation of the NL input sentence is determined; and the second set of NL encoder parameters is adjusted in accordance with the second similarity score to improve the match between the decoder output and target output representing respective artificial language translations of the input received by the NL encoder.
EFFECT: increasing the accuracy of translation into an artificial machine-readable language through the use of two stages of training on different types of data.
14 cl, 14 dwg

Description

УРОВЕНЬ ТЕХНИКИBACKGROUND OF THE INVENTION

[0001] Настоящее изобретение относится к системам и способам автоматического перевода с естественного языка на искусственный машиночитаемый язык.[0001] The present invention relates to systems and methods for automatic translation from natural language to artificial machine-readable language.

[0002] В последние годы все большее количество продуктов и сервисов полагаются на сбор и анализ больших объемов данных. Примеры охватывают практически все области человеческой деятельности, от производства до торговли, научных исследований, здравоохранения и обороны. К ним относятся, например, система розничной торговли, управляющая запасами, клиентами и продажами во множестве магазинов и складов, программное обеспечение для логистики для управления большим и разнообразным парком перевозчиков, а также служба интернет-рекламы, основанная на профилировании пользователей для нацеливания предложений на потенциальных клиентов. Управление большими объемами данных способствовало инновациям и развитию архитектуры баз данных, а также систем и способов взаимодействия с соответствующими данными. По мере увеличения размера и сложности баз данных использование людей-операторов для поиска, извлечения и анализа данных быстро становится непрактичным.[0002] In recent years, an increasing number of products and services rely on the collection and analysis of large amounts of data. The examples cover almost all areas of human activity, from manufacturing to trade, research, health and defense. These include, for example, a retail system that manages inventory, customers and sales across multiple stores and warehouses, logistics software to manage a large and diverse fleet of carriers, and an online advertising service based on user profiling to target offers to potential clients. Big data management has driven innovation and development in database architecture, as well as systems and ways of interacting with related data. As databases grow in size and complexity, using human operators to search, extract, and analyze data quickly becomes impractical.

[0003] Параллельно наблюдается взрывной рост и диверсификация электронных устройств, широко известных как «Интернет вещи». Устройства от мобильных телефонов до бытовой техники, носимых устройств, развлекательных устройств, а также различных датчиков и устройств, встроенных в автомобили, дома и т.д., обычно подключаются к удаленным компьютерам и/или различным базам данных для выполнения своих функций. Очень желательной особенностью таких устройств и услуг является удобство использования. Коммерческое давление с целью сделать такие продукты и услуги доступными для широкой аудитории стимулирует исследования и разработки инновационных человеко-машинных интерфейсов. Некоторые примеры таких технологий включают личных помощников, таких как Apple Siri® и Echo® от Amazon®, помимо прочего.[0003] In parallel, there has been an explosive growth and diversification of electronic devices, commonly known as the "Internet of Things". Devices ranging from mobile phones to home appliances, wearables, entertainment devices, and various sensors and devices embedded in cars, homes, etc., typically connect to remote computers and/or various databases to perform their functions. A highly desirable feature of such devices and services is ease of use. Commercial pressure to make such products and services available to a wide audience is driving the research and development of innovative human-machine interfaces. Some examples of such technologies include personal assistants such as Apple's Siri® and Amazon®'s Echo®, among others.

[0004] Следовательно, существует значительный интерес к разработке систем и способов, которые облегчают взаимодействие между людьми и компьютерами, особенно в приложениях, которые включают доступ к базе данных и/или управление.[0004] Therefore, there is considerable interest in developing systems and methods that facilitate interaction between humans and computers, especially in applications that involve database access and/or control.

КРАТКОЕ ОПИСАНИЕ ИЗОБРЕТЕНИЯBRIEF DESCRIPTION OF THE INVENTION

[0005] Согласно одному аспекту, способ включает использование по меньшей мере одного аппаратного процессора компьютерной системы для выполнения кодера искусственного языка (AL) и декодера, соединенного с кодером AL, причем кодер AL конфигурирован для приема первого входного массива, содержащего представление входного предложения AL, сформулированного на искусственном языке, и в ответ, создания первого внутреннего массива. Декодер конфигурирован для приема первого внутреннего массива и, в ответ, создания первого выходного массива, содержащего представление первого выходного предложения AL, сформулированного на искусственном языке. Способ дополнительно включает в себя, в ответ на предоставление первого входного массива кодеру AL, определение первой оценки сходства, указывающей степень сходства между входным предложением AL и первым выходным предложением AL, и регулирование первого набора параметров декодера в соответствии с первой оценкой сходства, чтобы улучшить соответствие между входными данными кодера AL и выходными данными декодера. Способ дополнительно включает в себя, в ответ на определение, удовлетворяется ли условие завершения обучения первого этапа, в ответ, если условие завершения обучения первого этапа удовлетворено, исполнение кодера естественного языка (NL), конфигурированного для приема второго входного массива, содержащего представление входного предложения NL, сформулированного на естественном языке, и, в ответ, выведения второго внутреннего массива в декодер. Способ дополнительно включает в себя определение второго выходного массива, созданного декодером в ответ на прием второго внутреннего массива, причем второй выходной массив содержит представление второго выходного предложения AL, сформулированного на искусственном языке, и определение второй оценки сходства, указывающей степень сходства между вторым выходным предложением AL и целевым предложением AL, содержащим перевод входного предложения NL на искусственный язык. Способ дополнительно включает в себя регулирование второго набора параметров кодера NL в соответствии со второй оценкой сходства, чтобы улучшить соответствие между выходными данными декодера и целевыми выходными данными, представляющими соответствующие переводы на искусственный язык входных данных, полученных кодером NL.[0005] According to one aspect, the method includes using at least one computer system hardware processor to execute an artificial language (AL) encoder and a decoder coupled to the AL encoder, the AL encoder being configured to receive a first input array containing a representation of the AL input sentence, formulated in artificial language, and in response, the creation of the first internal array. The decoder is configured to receive a first internal array and, in response, create a first output array containing a representation of the first artificial language output sentence AL. The method further includes, in response to providing the first input array to the AL encoder, determining a first similarity score indicating a degree of similarity between the input AL sentence and the first output AL sentence, and adjusting the first set of decoder parameters in accordance with the first similarity score to improve the match. between the encoder input AL and the decoder output. The method further includes, in response to determining whether the first stage learning termination condition is satisfied, in response, if the first stage learning termination condition is satisfied, executing a natural language (NL) encoder configured to receive a second input array containing a representation of the NL input sentence. , formulated in natural language, and, in response, outputting the second internal array to the decoder. The method further includes determining a second output array generated by the decoder in response to receiving the second internal array, the second output array comprising a representation of the second output sentence AL formulated in artificial language, and determining a second similarity score indicating a degree of similarity between the second output sentence AL and a target sentence AL containing a translation of the input sentence NL into an artificial language. The method further includes adjusting the second set of NL encoder parameters in accordance with the second similarity score to improve the match between the decoder output and target output representing respective artificial language translations of the input received by the NL encoder.

[0006] Согласно другому аспекту, компьютерная система содержит по меньшей мере один аппаратный процессор и память, причем по меньшей мере один аппаратный процессор конфигурирован для исполнения кодера AL и декодера, связанного с кодером AL, причем кодер AL конфигурирован для приема первого входного массива, содержащего представление входного предложения AL, сформулированного на искусственном языке, и в ответ, создания первого внутреннего массива. Декодер конфигурирован для приема первого внутреннего массива и, в ответ, создания первого выходного массива, содержащего представление первого выходного предложения AL, сформулированного на искусственном языке. По меньшей мере один аппаратный процессор конфигурирован для, в ответ на предоставление первого входного массива кодеру AL, определения первой оценки сходства, указывающей степень сходства между входным предложением AL и первым выходным предложением AL, и регулирования первого набора параметров декодера в соответствии с первой оценкой сходства, чтобы улучшить соответствие между входными данными кодера AL и выходными данными декодера. По меньшей мере один аппаратный процессор дополнительно конфигурирован для определения, удовлетворяется ли условие завершения обучения первого этапа, и в ответ, если условие завершения обучения первого этапа удовлетворено, исполнения кодера NL, конфигурированного для приема второго входного массива, содержащего представление входного предложения NL, сформулированного на естественном языке, и, в ответ, выведения второго внутреннего массива в декодер. По меньшей мере один аппаратный процессор дополнительно конфигурирован для определения второго выходного массива, созданного декодером в ответ на прием второго внутреннего массива, причем второй выходной массив содержит представление второго выходного предложения AL, сформулированного на искусственном языке. По меньшей мере один аппаратный процессор дополнительно конфигурирован для определения второй оценки сходства, указывающей степень сходства между вторым выходным предложением AL и целевым предложением AL, содержащим перевод входного предложения NL на искусственный язык, и для регулирования второго набора параметров кодера NL в соответствии со второй оценкой сходства для улучшения соответствия между выходными данными декодера и целевыми выходными данными, представляющими соответствующие переводы на искусственный язык входных данных, полученных кодером NL.[0006] According to another aspect, a computer system includes at least one hardware processor and memory, wherein at least one hardware processor is configured to execute an AL encoder and a decoder associated with the AL encoder, wherein the AL encoder is configured to receive a first input array comprising representation of the input sentence AL, formulated in an artificial language, and in response, the creation of the first internal array. The decoder is configured to receive a first internal array and, in response, create a first output array containing a representation of the first artificial language output sentence AL. At least one hardware processor is configured to, in response to providing the first input array to the AL encoder, determining a first similarity score indicating the degree of similarity between the input AL sentence and the first output AL sentence, and adjusting the first set of decoder parameters in accordance with the first similarity score, to improve the match between the AL encoder input and the decoder output. The at least one hardware processor is further configured to determine if the first stage learning termination condition is satisfied, and in response, if the first stage learning termination condition is satisfied, executing the NL encoder configured to receive a second input array containing a representation of the NL input sentence formulated in natural language, and, in response, outputting the second internal array to the decoder. The at least one hardware processor is further configured to determine a second output array generated by the decoder in response to receiving the second internal array, the second output array comprising a representation of the second artificial language output sentence AL. The at least one hardware processor is further configured to determine a second similarity score indicating a degree of similarity between the second output sentence AL and the target sentence AL containing an artificial language translation of the input sentence NL, and to adjust the second set of NL encoder parameters in accordance with the second similarity score. to improve the match between the decoder output and the target output representing the corresponding artificial language translations of the input received by the NL encoder.

[0007] Согласно другому аспекту невременный машиночитаемый носитель хранит инструкции, которые при исполнении первым аппаратным процессором первой компьютерной системы побуждают первую компьютерную систему формировать модуль обученного переводчика, содержащий кодер NL и декодер, соединенный с кодером NL, при этом обучение модуля переводчика включает использование второго аппаратного процессора второй компьютерной системы для соединения декодера с кодером AL, конфигурированным для приема первого входного массива, содержащего представление входного предложения AL, сформулированного на искусственном языке, и, в ответ, создания первого внутреннего массива. Кодер AL соединен с декодером, так что декодер принимает первый внутренний массив и, в ответ, создает первый выходной массив, содержащий представление первого выходного предложения AL, сформулированного на искусственном языке. Обучение модуля переводчика включает дополнительно включает в себя, в ответ на предоставление первого входного массива кодеру AL, определение первой оценки сходства, указывающей степень сходства между входным предложением AL и первым выходным предложением AL, и регулирование первого набора параметров декодера в соответствии с первой оценкой сходства, чтобы улучшить соответствие между входными данными кодера AL и выходными данными декодера. Обучение модуля переводчика дополнительно включает определение, удовлетворяется ли условие завершения обучения первого этапа, и, в ответ, если условие завершения обучения первого этапа удовлетворено, соединение кодера NL с декодером, так что кодер NL принимает второй входной массив, содержащий представление входного предложения NL, сформулированного на естественном языке, и, в ответ, выводит второй внутренний массив в декодер. Обучение модуля переводчика дополнительно включает определение второго выходного массива, созданного декодером в ответ на прием второго внутреннего массива, причем второй выходной массив содержит представление второго выходного предложения AL, сформулированного на искусственном языке, и определение второй оценки сходства, указывающей степень сходства между вторым выходным предложением AL и целевым предложением AL, содержащим перевод входного предложения NL на искусственный язык. Обучение модуля переводчика дополнительно включает регулирование второго набора параметров кодера NL в соответствии со второй оценкой сходства, чтобы улучшить соответствие между выходными данными декодера и целевыми выходными данными, представляющими соответствующие переводы на искусственный язык входных данных, полученных кодером NL.[0007] According to another aspect, the non-transitory computer-readable medium stores instructions that, when executed by the first hardware processor of the first computer system, cause the first computer system to generate a trained interpreter module comprising an NL encoder and a decoder coupled to the NL encoder, wherein training the interpreter module includes using a second hardware a second computer system processor for connecting the decoder to an AL encoder configured to receive a first input array containing an artificial language representation of the input sentence AL and, in response, create a first internal array. The AL encoder is connected to the decoder such that the decoder receives a first internal array and, in response, creates a first output array containing a representation of the first artificial language output sentence AL. Learning the translator module further includes, in response to providing the first input array to the AL encoder, determining a first similarity score indicating a degree of similarity between the input AL sentence and the first output AL sentence, and adjusting the first set of decoder parameters in accordance with the first similarity score, to improve the match between the AL encoder input and the decoder output. Training the translator module further includes determining whether the first stage learning termination condition is satisfied and, in response, if the first stage learning termination condition is satisfied, connecting the NL encoder to the decoder such that the NL encoder receives a second input array containing a representation of the NL input sentence formulated in natural language, and, in response, outputs the second internal array to the decoder. Training the translator module further includes determining a second output array generated by the decoder in response to receiving the second internal array, the second output array comprising a representation of the second output sentence AL formulated in artificial language, and determining a second similarity score indicating the degree of similarity between the second output sentence AL and a target sentence AL containing a translation of the input sentence NL into an artificial language. Training the translator module further includes adjusting the second set of NL encoder parameters according to the second similarity score to improve the match between the decoder output and the target output representing the respective artificial language translations of the input received by the NL encoder.

[0008] Согласно другому аспекту компьютерная система содержит первый аппаратный процессор, конфигурированный для исполнения модуля обученного переводчика, содержащего кодер NL и декодер, соединенный с кодером NL, при этом обучение модуля переводчика включает использование второго аппаратного процессора второй компьютерной системы для соединения декодера с кодером AL, конфигурированным для приема первого входного массива, содержащего представление входного предложения AL, сформулированного на искусственном языке, и, в ответ, создания первого внутреннего массива. Кодер AL соединен с декодером, так что декодер принимает первый внутренний массив и, в ответ, создает первый выходной массив, содержащий представление первого выходного предложения AL, сформулированного на искусственном языке. Обучение модуля переводчика дополнительно включает, в ответ на предоставление первого входного массива кодеру AL, определение первой оценки сходства, указывающей степень сходства между входным предложением AL и первым выходным предложением AL, и регулирование первого набора параметров декодера в соответствии с первой оценкой сходства, чтобы улучшить соответствие между входными данными кодера AL и выходными данными декодера. Обучение модуля переводчика дополнительно включает определение, удовлетворяется ли условие завершения обучения первого этапа, и, в ответ, если условие завершения обучения первого этапа удовлетворено, соединение кодера NL с декодером, так что кодер NL принимает второй входной массив, содержащий представление входного предложения NL, сформулированного на естественном языке, и, в ответ, выводит второй внутренний массив в декодер. Обучение модуля переводчика дополнительно включает определение второго выходного массива, созданного декодером в ответ на прием второго внутреннего массива, причем второй выходной массив содержит представление второго выходного предложения AL, сформулированного на искусственном языке. Обучение модуля переводчика дополнительно включает определение второй оценки сходства, указывающей степень сходства между вторым выходным предложением AT и целевым предложением AT, содержащим перевод входного предложения NL на искусственный язык, и регулирование второго набора параметров кодера NL в соответствии со второй оценкой сходства для улучшения соответствия между выходными данными декодера и целевыми выходными данными, представляющими соответствующие переводы на искусственный язык входных данных, полученных кодером NL.[0008] According to another aspect, the computer system comprises a first hardware processor configured to execute a trained interpreter module comprising an NL encoder and a decoder coupled to the NL encoder, wherein training the interpreter module includes using a second hardware processor of the second computer system to couple the decoder to the AL encoder , configured to receive a first input array containing an artificial language representation of an input sentence AL and, in response, create a first internal array. The AL encoder is connected to the decoder such that the decoder receives a first internal array and, in response, creates a first output array containing a representation of the first artificial language output sentence AL. Training the translator module further includes, in response to providing the first input array to the AL encoder, determining a first similarity score indicating a degree of similarity between the input AL sentence and the first output AL sentence, and adjusting the first set of decoder parameters in accordance with the first similarity score to improve the match. between encoder input AL and decoder output. Training the translator module further includes determining whether the first stage learning termination condition is satisfied and, in response, if the first stage learning termination condition is satisfied, connecting the NL encoder to the decoder such that the NL encoder receives a second input array containing a representation of the NL input sentence formulated in natural language, and, in response, outputs the second internal array to the decoder. Training the translator module further includes determining a second output array generated by the decoder in response to receiving the second internal array, the second output array containing a representation of the second output sentence AL formulated in artificial language. Training the translator module further includes determining a second similarity score indicating a degree of similarity between the second output AT sentence and the target AT sentence containing the artificial language translation of the input NL sentence, and adjusting the second set of NL encoder parameters in accordance with the second similarity score to improve the match between the output sentences. the decoder data and the target output representing the corresponding artificial language translations of the input data received by the NL encoder.

КРАТКОЕ ОПИСАНИЕ ЧЕРТЕЖЕЙBRIEF DESCRIPTION OF THE DRAWINGS

[0009] Вышеупомянутые аспекты и преимущества настоящего изобретения станут более понятными после прочтения следующего ниже подробного описания, данного со ссылками на чертежи, на которых изображено следующее.[0009] The above aspects and advantages of the present invention will become more clear after reading the following detailed description, given with reference to the drawings, which depict the following.

[0009] Фиг. 1 иллюстрирует примерную автоматизированную систему доступа к базе данных, в которой набор клиентов взаимодействует с системой обучения переводчика и сервером базы данных согласно некоторым вариантам осуществления настоящего изобретения.[0009] FIG. 1 illustrates an exemplary automated database access system in which a set of clients interact with an interpreter training system and a database server in accordance with some embodiments of the present invention.

[0011] Фиг. 2-А иллюстрирует примерную конфигурацию аппаратного обеспечения клиентской системы согласно некоторым вариантам осуществления настоящего изобретения.[0011] FIG. 2-A illustrates an exemplary client system hardware configuration according to some embodiments of the present invention.

[0012] Фиг. 2-В иллюстрирует примерную конфигурацию оборудования системы обучения переводчика согласно некоторым вариантам осуществления настоящего изобретения.[0012] FIG. 2-B illustrates an exemplary hardware configuration of an interpreter training system in accordance with some embodiments of the present invention.

[0013] Фиг. 3 иллюстрирует набор примерных программных компонентов, исполняемых в клиентской системе согласно некоторым вариантам осуществления настоящего изобретения.[0013] FIG. 3 illustrates a set of exemplary software components executing on a client system in accordance with some embodiments of the present invention.

[0014] Фиг. 4 иллюстрирует примерный обмен данными между клиентской системой и сервером базы данных согласно некоторым вариантам осуществления настоящего изобретения.[0014] FIG. 4 illustrates an exemplary communication between a client system and a database server in accordance with some embodiments of the present invention.

[0015] Фиг. 5 иллюстрирует примерные компоненты системы обучения переводчика согласно некоторым вариантам осуществления настоящего изобретения.[0015] FIG. 5 illustrates exemplary components of a translator learning system in accordance with some embodiments of the present invention.

[0016] Фиг. 6 иллюстрирует примерную процедуру обучения переводчика согласно некоторым вариантам осуществления настоящего изобретения.[0016] FIG. 6 illustrates an exemplary interpreter training procedure in accordance with some embodiments of the present invention.

[0017] Фиг. 7 иллюстрирует примерную работу модуля переводчика согласно некоторым вариантам осуществления настоящего изобретения.[0017] FIG. 7 illustrates exemplary operation of a translator module according to some embodiments of the present invention.

[0018] Фиг. 8 иллюстрирует примерные компоненты и работу модуля переводчика согласно некоторым вариантам осуществления настоящего изобретения.[0018] FIG. 8 illustrates exemplary components and operation of a translator module according to some embodiments of the present invention.

[0019] Фиг. 9 иллюстрирует примерную последовательность этапов, выполняемых системой обучения переводчика согласно одному варианту осуществления настоящего изобретения.[0019] FIG. 9 illustrates an exemplary sequence of steps performed by an interpreter training system according to one embodiment of the present invention.

[0020] Фиг. 10 иллюстрирует примерный первый этап обучения модуля переводчика согласно некоторым вариантам осуществления настоящего изобретения.[0020] FIG. 10 illustrates an exemplary first step of training an interpreter module in accordance with some embodiments of the present invention.

[0021] Фиг. 11-А иллюстрирует примерный второй этап обучения модуля переводчика согласно некоторым вариантам осуществления настоящего изобретения.[0021] FIG. 11-A illustrates an exemplary second stage of training an interpreter module in accordance with some embodiments of the present invention.

[0022] Фиг. 11-В иллюстрирует альтернативный примерный второй этап обучения модуля переводчика согласно некоторым вариантам осуществления настоящего изобретения.[0022] FIG. 11-B illustrates an alternative exemplary second step of training an interpreter module according to some embodiments of the present invention.

[0023] Фиг. 12 иллюстрирует примерную последовательность этапов для обучения модуля переводчика на множестве обучающих корпусов согласно некоторым вариантам осуществления настоящего изобретения.[0023] FIG. 12 illustrates an exemplary sequence of steps for training an interpreter module on a plurality of training corpora, in accordance with some embodiments of the present invention.

ОСУЩЕСТВЛЕНИЕ ИЗОБРЕТЕНИЯIMPLEMENTATION OF THE INVENTION

[0024] Следует понимать, что в нижеследующем описании все перечисленные соединения между структурами могут быть прямыми функциональными соединениями или непрямыми функциональными соединениями через промежуточные структуры. Набор элементов включает в себя один или более элементов. Считается, что любое упоминание элемента относится по меньшей мере к одному элементу. Множество элементов включает по меньшей мере два элемента. Если не требуется иное, любые описанные этапы способа не обязательно должны выполняться в конкретном проиллюстрированном порядке. Первый элемент (например, данные), полученный из второго элемента, включает в себя первый элемент, равный второму элементу, а также первый элемент, сгенерированный путем обработки второго элемента и, опционально, других данных. Принятие определения или решения в соответствии с параметром включает в себя принятие определения или решения в соответствии с параметром и, опционально, в соответствии с другими данными. Если не указано иное, индикатором некоторого количества/данных может быть само количество/данные или индикатор, отличный от самого количества/данных. Компьютерная программа - это последовательность инструкций процессора, выполняющих задачу. Компьютерные программы, описанные в некоторых вариантах осуществления настоящего изобретения, могут быть автономными программными объектами или подобъектами (например, подпрограммами, библиотеками) других компьютерных программ. Термин «база данных» используется здесь для обозначения любого организованного набора данных. Если не указано иное, предложение представляет собой последовательность слов и/или лексем, сформулированных на естественном или искусственном языке. Два предложения, сформулированные на разных языках, здесь считаются переводами друг друга, когда два предложения являются семантическими эквивалентами друг друга, т.е. два предложения имеют одинаковое или очень похожее значение. Машиночитаемые носители включают невременные носители, такие как магнитные, оптические и полупроводниковые носители данных (например, жесткие диски, оптические диски, флэш-память, DRAM), а также каналы связи, такие как проводящие кабели и оптоволоконные линии. Согласно некоторым вариантам осуществления настоящее изобретение обеспечивает, среди прочего, компьютерные системы, содержащие аппаратные средства (например, один или более процессоров), запрограммированные для выполнения описанных здесь способов, а также машиночитаемые инструкции кодирования мультимедиа для выполнения способов, описанных в данном документе.[0024] It should be understood that in the following description, all listed connections between structures can be direct functional connections or indirect functional connections through intermediate structures. An element set includes one or more elements. Any reference to an element is considered to refer to at least one element. The set of elements includes at least two elements. Unless otherwise required, any of the method steps described need not be performed in the specific illustrated order. The first element (eg, data) derived from the second element includes a first element equal to the second element, as well as a first element generated by processing the second element and optionally other data. Making a determination or decision in accordance with a parameter includes making a determination or decision in accordance with the parameter and, optionally, in accordance with other data. Unless otherwise indicated, an indicator of a quantity/data may be the quantity/data itself or an indicator other than the quantity/data itself. A computer program is a sequence of processor instructions that perform a task. The computer programs described in some embodiments of the present invention may be stand-alone program objects or sub-objects (eg, routines, libraries) of other computer programs. The term "database" is used here to refer to any organized collection of data. Unless otherwise specified, a sentence is a sequence of words and/or lexemes formulated in natural or artificial language. Two sentences formulated in different languages are here considered translations of each other when the two sentences are semantic equivalents of each other, i.e. two sentences have the same or very similar meaning. Computer-readable media includes non-transitory media such as magnetic, optical, and semiconductor storage media (eg, hard disks, optical disks, flash memory, DRAM), as well as communication channels such as conductive cables and fiber optic lines. In some embodiments, the present invention provides, among other things, computer systems comprising hardware (e.g., one or more processors) programmed to perform the methods described herein, as well as computer-readable media encoding instructions for performing the methods described herein.

[0025] Нижеследующее описание иллюстрирует варианты осуществления изобретения в качестве примера, а не обязательно в качестве ограничения.[0025] The following description illustrates embodiments of the invention by way of example, and not necessarily as a limitation.

[0026] Фиг. 1 иллюстрирует примерную систему доступа к базе данных и управления ею в соответствии с некоторыми вариантами осуществления настоящего изобретения. Множество клиентских систем 12a-d может взаимодействовать с сервером 18 базы данных, например, для исполнения запроса, тем самым осуществляя доступ/извлечение/запись набора данных из базы данных 20 и в нее. Примерные базы данных 20 включают в себя, среди прочего, реляционную базу данных, базу данных расширяемого языка разметки (XML), электронную таблицу и хранилище значений ключей.[0026] FIG. 1 illustrates an exemplary database access and management system in accordance with some embodiments of the present invention. A plurality of client systems 12a-d may interact with the database server 18, for example, to execute a query, thereby accessing/retrieving/writing a set of data from and to the database 20. Exemplary databases 20 include, among others, a relational database, an extensible markup language (XML) database, a spreadsheet, and a key value store.

[0027] Примерные клиентские системы 12a-d включают в себя персональные компьютерные системы, мобильные вычислительные платформы (портативные компьютеры, планшеты, мобильные телефоны), развлекательные устройства (телевизоры, игровые консоли), носимые устройства (умные часы, фитнес-браслеты), бытовую технику и любые другие электронные устройства, содержащие процессор, память и интерфейс связи. Клиентские системы 12a-d соединены с сервером 18 через сеть 14 связи, например, Интернет. Части сети 14 могут включать в себя локальную сеть (LAN), такую как домашняя или корпоративная сеть. Сервер 18 базы данных в общем описывает набор вычислительных систем, коммуникативно связанных с базой 20 данных и конфигурированных для доступа к базе 20 данных для выполнения вставления данных, извлечения данных и/или других операций управления базой данных.[0027] Exemplary client systems 12a-d include personal computer systems, mobile computing platforms (laptops, tablets, mobile phones), entertainment devices (TVs, game consoles), wearables (smartwatches, fitness bands), consumer appliances and any other electronic devices containing a processor, memory and communication interface. The client systems 12a-d are connected to the server 18 via a communications network 14, such as the Internet. Portions of network 14 may include a local area network (LAN), such as a home or corporate network. Database server 18 generally describes a set of computing systems communicatively coupled to database 20 and configured to access database 20 to perform data insertion, data retrieval, and/or other database management operations.

[0028] В одном примерном применении проиллюстрированной системы клиентские системы 12a-d представляют отдельные компьютеры, используемые сотрудниками компании электронной коммерции, а база 20 данных представляет собой реляционную базу данных, в которой хранятся записи о продуктах, которые продает соответствующая компания. Сотрудники могут использовать проиллюстрированную систему, например, чтобы узнать, сколько единиц определенного продукта в настоящее время имеется в наличии на конкретном складе.[0028] In one exemplary application of the illustrated system, client systems 12a-d represent individual computers used by employees of an e-commerce company, and database 20 is a relational database that stores records of products that the respective company sells. Employees can use the illustrated system, for example, to find out how many units of a particular product are currently in stock in a particular warehouse.

[0029] В некоторых вариантах осуществления доступу к базе 20 данных способствует программное обеспечение, исполняемое в клиентских системах 12a-d и/или сервере 18 базы данных, соответствующее программное обеспечение содержит компонент переводчика, обеспечивающий автоматический перевод предложения, сформулированного на естественном языке (например, английском, китайском), в набор предложений, сформулированных на искусственном формальном языке, таком как язык структурированных запросов (SQL), язык программирования (например, С ++, Java®, байт-код) и/или язык разметки (например, XML, язык разметки гипертекста - HTML). В некоторых вариантах осуществления соответствующий переводчик содержит систему искусственного интеллекта, такую как набор нейронных сетей, обученных системой 16 обучения переводчика, также подключенной к сети 14. Работа системы 16 обучения переводчика, а также самого переводчика будет описана более подробно ниже.[0029] In some embodiments, access to the database 20 is facilitated by software running on the client systems 12a-d and/or the database server 18, the corresponding software includes a translator component that provides automatic translation of a natural language sentence (e.g., English, Chinese), into a set of sentences formulated in an artificial formal language such as Structured Query Language (SQL), a programming language (e.g. C++, Java®, bytecode) and/or a markup language (e.g. XML, hypertext markup language - HTML). In some embodiments, the respective interpreter comprises an artificial intelligence system, such as a set of neural networks trained by the interpreter training system 16 also connected to the network 14. The operation of the interpreter training system 16 as well as the interpreter itself will be described in more detail below.

[0030] Фиг. 2-А иллюстрирует примерную конфигурацию оборудования клиентской системы 12. Клиентская система 12 может представлять любую из клиентских систем 12a-d с фиг. 1. Без потери общности, проиллюстрированная клиентская система представляет собой компьютерную систему. Аппаратная конфигурация других клиентских систем (например, мобильных телефонов, умных часов) может несколько отличаться от конфигурации, показанной на фиг. 2-А. Клиентская система 12 содержит набор физических устройств, включая аппаратный процессор 22 и блок 24 памяти. Процессор 22 содержит физическое устройство (например, микропроцессор, многоядерную интегральную схему, сформированную на полупроводниковой подложке и т.д.), конфигурированное для исполнения вычислительных и/или логических операций с набором сигналов и/или данных. В некоторых вариантах осуществления такие операции доставляются процессору 22 в форме последовательности инструкций процессора (например, машинного кода или другого типа кодирования). Блок 24 памяти может содержать энергозависимый машиночитаемый носитель (например, DRAM, SRAM), на котором хранятся инструкции и/или данные, к которым осуществляется доступ, или которые генерируются процессором 22.[0030] FIG. 2-A illustrates an exemplary hardware configuration of client system 12. Client system 12 may represent any of the client systems 12a-d of FIG. 1. Without loss of generality, the illustrated client system is a computer system. The hardware configuration of other client systems (eg, mobile phones, smartwatches) may differ slightly from the configuration shown in FIG. 2-A. The client system 12 contains a set of physical devices, including a hardware processor 22 and a memory unit 24. The processor 22 includes a physical device (eg, a microprocessor, a multi-core integrated circuit formed on a semiconductor substrate, etc.) configured to perform computational and/or logic operations on a set of signals and/or data. In some embodiments, such operations are delivered to processor 22 in the form of a sequence of processor instructions (eg, machine code or other type of encoding). The memory unit 24 may include a volatile computer-readable medium (eg, DRAM, SRAM) that stores instructions and/or data that is accessed or generated by the processor 22.

[0031] Устройства 26 ввода могут включать в себя компьютерные клавиатуры, мыши и микрофоны, среди прочего, включая соответствующие аппаратные интерфейсы и/или адаптеры, позволяющие пользователю вводить данные и/или инструкции в клиентскую систему 12. Устройства 28 вывода могут включать в себя устройства отображения, такие как мониторы и динамики, среди прочего, а также аппаратные интерфейсы/адаптеры, такие как графические карты, позволяющие клиентской системе 12 передавать данные пользователю. В некоторых вариантах осуществления устройства 26 ввода и устройства 28 вывода могут совместно использовать общее оборудование, как в случае устройств с сенсорным экраном. Устройства 32 хранения включают в себя машиночитаемые носители, обеспечивающие долговременное хранение, чтение и запись программных инструкций и/или данных. Примерные устройства 32 хранения включают в себя магнитные и оптические диски и устройства флэш-памяти, а также съемные носители, такие как CD и/или DVD диски и приводы. Набор сетевых адаптеров 34 позволяет клиентской системе 12 подключаться к компьютерной сети и/или другим устройствам/компьютерным системам. Контроллер-концентратор 30 представляет собой множество системных, периферийных шин и/или шин набора микросхем и/или всех других схем, обеспечивающих связь между процессором 22 и устройствами 24, 26, 28, 32 и 34. Например, контроллер-концентратор 30 может включать в себя, среди прочего, контроллер памяти, контроллер ввода/вывода (I/O) и контроллер прерываний. В другом примере контроллер-концентратор 30 может содержать процессор 22 подключения северного моста к памяти 24 и/или процессор 22 подключения южного моста к устройствам 26, 28, 32 и 34.[0031] Input devices 26 may include computer keyboards, mice, and microphones, including, among other things, appropriate hardware interfaces and/or adapters to allow a user to enter data and/or instructions into client system 12. Output devices 28 may include devices displays such as monitors and speakers, among other things, as well as hardware interfaces/adapters such as graphics cards that allow the client system 12 to communicate data to the user. In some embodiments, input devices 26 and output devices 28 may share common hardware, as is the case for touch screen devices. Storage devices 32 include computer-readable media for permanent storage, reading, and writing of program instructions and/or data. Exemplary storage devices 32 include magnetic and optical disks and flash memory devices, as well as removable media such as CDs and/or DVDs and drives. A set of network adapters 34 allows the client system 12 to connect to a computer network and/or other devices/computer systems. Controller hub 30 is a plurality of system, peripheral, and/or chipset buses and/or all other circuitry that provides communication between processor 22 and devices 24, 26, 28, 32, and 34. For example, controller hub 30 may include itself, among other things, a memory controller, an input/output (I/O) controller, and an interrupt controller. In another example, controller hub 30 may include a northbridge connection processor 22 to memory 24 and/or a southbridge connection processor 22 to devices 26, 28, 32, and 34.

[0032] Фиг. 2-В иллюстрирует примерную конфигурацию оборудования системы обучения переводчика согласно некоторым вариантам осуществления настоящего изобретения. Проиллюстрированная система обучения включает в себя компьютер, содержащий по меньшей мере процессор 122 обучения (например, микропроцессор, многоядерную интегральную схему), физическую память 124, набор устройств 132 хранения обучения и набор сетевых адаптеров 134 обучения. Устройства 132 хранения включают в себя машиночитаемые носители, обеспечивающие долговременное хранение, чтение и запись программных инструкций и/или данных. Адаптеры 134 могут включать в себя сетевые карты и другие интерфейсы связи, позволяющие системе 16 обучения подключаться к сети 14 связи. В некоторых вариантах осуществления система 16 обучения переводчика дополнительно содержит устройства ввода и вывода, которые могут быть аналогичны по функциям устройствам 26 и 28 ввода и вывода клиентской системы 12 соответственно.[0032] FIG. 2-B illustrates an exemplary hardware configuration of an interpreter training system in accordance with some embodiments of the present invention. The illustrated learning system includes a computer including at least a learning processor 122 (eg, microprocessor, multi-core integrated circuit), physical memory 124, a set of learning storage devices 132, and a set of learning network adapters 134. Storage devices 132 include computer-readable media capable of permanently storing, reading, and writing program instructions and/or data. Adapters 134 may include network cards and other communication interfaces that allow the training system 16 to connect to the communication network 14 . In some embodiments, interpreter education system 16 further comprises input and output devices that may be similar in function to input and output devices 26 and 28 of client system 12, respectively.

[0033] Фиг. 3 иллюстрирует примерные компьютерные программы, исполняемые в клиентской системе 12 согласно некоторым вариантам осуществления настоящего изобретения. Такое программное обеспечение может включать в себя операционную систему (ОС) 40, которая может включать любую широко доступную операционную систему, такую как Microsoft Windows®, MacOS®, Finux®, iOS® или Android™, среди других. ОС 40 обеспечивает связь между аппаратным обеспечением клиентской системы 12 и набором приложений, включая, например, приложение 41 перевода. В некоторых вариантах осуществления приложение 41 конфигурировано для автоматического перевода предложений на естественном языке (NF) в предложения на искусственном языке (AF), например, в набор SQL-запросов и/или в последовательность программных инструкций (кода). Приложение 41 перевода включает в себя модуль 62 переводчика, выполняющий фактический перевод, и может дополнительно включать, среди прочего, компоненты, которые принимают соответствующие предложения на естественном языке от пользователя (например, в виде текста или речи через устройства 26 ввода), компоненты, которые разбирают и анализируют соответствующие входные данные NL (например, синтаксический анализатор речи, токенизатор, различные словари и т.д.), компоненты, передающие переведенные выходные данные AL на сервер 18 базы данных, и компоненты, отображающие содержимое ответа от сервера 18 пользователю. Модуль 62 переводчика содержит экземпляр системы искусственного интеллекта (например, набор нейронных сетей), обученный системой 16 обучения переводчика выполнять преобразования NL в AL, как дополнительно описано ниже. Такое обучение может привести к созданию набора оптимальных значений параметров переводчика 62, то есть значений, которые могут быть переданы из системы 16 обучения клиенту 12 и/или серверу 18 базы данных, например, посредством периодических обновлений программного обеспечения или обновлений программного обеспечения по запросу. Термин «обученный переводчик» в данном документе относится к модулю переводчика, экземпляр которого создан с такими оптимальными значениями параметров, полученными из системы 16 обучения переводчика.[0033] FIG. 3 illustrates exemplary computer programs executing on client system 12 in accordance with some embodiments of the present invention. Such software may include an operating system (OS) 40, which may include any widely available operating system such as Microsoft Windows®, MacOS®, Finux®, iOS®, or Android™, among others. The OS 40 provides communication between the hardware of the client system 12 and a set of applications, including, for example, a translation application 41. In some embodiments, application 41 is configured to automatically translate natural language (NF) sentences into artificial language (AF) sentences, such as a set of SQL queries and/or a sequence of program instructions (code). The translation application 41 includes a translator module 62 that performs the actual translation and may further include, among other things, components that accept appropriate natural language sentences from the user (e.g., in the form of text or speech via input devices 26), components that parsing and parsing the appropriate NL inputs (eg, speech parser, tokenizer, various dictionaries, etc.), components passing the translated output AL to the database server 18, and components displaying the contents of the response from the server 18 to the user. The translator module 62 contains an instance of an artificial intelligence system (eg, a set of neural networks) trained by the translator training system 16 to perform NL to AL transformations, as further described below. Such training may result in the creation of a set of optimal parameter values for the interpreter 62, i.e. values that can be communicated from the training system 16 to the client 12 and/or the database server 18, for example, through periodic software updates or on-demand software updates. The term "trained interpreter" in this document refers to a translator module that is instantiated with such optimal parameter values obtained from the interpreter training system 16 .

[0034] Для ясности нижеследующее описание будет сфокусировано на примерном приложении, в котором модуль 62 переводчика выводит запрос к базе данных, то есть набору предложений, сформулированных на языке запросов, таком как SQL. Таким образом, проиллюстрированные системы и способы направлены на то, чтобы позволить оператору-человеку выполнять запросы к базе данных. Однако специалисту в данной области техники понятно, что описанные системы и способы могут быть изменены и адаптированы к другим приложениям, в которых переводчик конфигурирован для создания компьютерного кода (например, Java®), байт-код и т.д.), данных разметки (например, XML) или выходных данных, сформулированных на любом другом искусственном языке.[0034] For clarity, the following description will focus on an exemplary application in which the translator module 62 queries a database, that is, a set of sentences formulated in a query language such as SQL. Thus, the illustrated systems and methods are directed to allowing a human operator to execute database queries. However, one of ordinary skill in the art will appreciate that the systems and methods described may be modified and adapted to other applications in which the translator is configured to generate computer code (e.g., Java®), bytecode, etc.), markup data ( e.g. XML) or output formulated in any other artificial language.

[0035] Фиг. 4 иллюстрирует примерный обмен данными между клиентской системой 12 и сервером 18 базы данных согласно некоторым вариантам осуществления настоящего изобретения. Клиентская система 12 отправляет запрос 50 на сервер 18 базы данных и в ответ получает результат 52 запроса, содержащий результат выполнения запроса 50. Запрос 50 содержит кодирование набора инструкций, которые при исполнении сервером 18 побуждают сервер 18 выполнять определенные манипуляции с базой 20 данных, например, путем выборочного вставления или извлечения данных в базы 20 данных или из них, соответственно. Результат 52 запроса может содержать, например, кодирование набора записей базы данных, выборочно извлеченных из базы 20 данных согласно запросу 50.[0035] FIG. 4 illustrates an exemplary communication between a client system 12 and a database server 18 in accordance with some embodiments of the present invention. The client system 12 sends a request 50 to the database server 18 and in response receives a request result 52 containing the result of the request 50. The request 50 contains an encoding of a set of instructions that, when executed by the server 18, cause the server 18 to perform certain manipulations with the database 20, for example, by selectively inserting or extracting data into or out of the databases 20, respectively. Query result 52 may contain, for example, an encoding of a set of database records selectively retrieved from database 20 according to query 50.

[0036] В некоторых вариантах осуществления запрос 50 сформулирован на искусственном языке, таком как SQL. В альтернативном варианте осуществления запрос 50 может быть сформулирован как набор предложений естественного языка. В таких вариантах осуществления модуль переводчика, описанный в данном документе, может исполняться на сервере 18 базы данных.[0036] In some embodiments, query 50 is formulated in an artificial language such as SQL. In an alternative embodiment, query 50 may be formulated as a set of natural language sentences. In such embodiments, the implementation of the translator module described in this document may be executed on the server 18 database.

[0037] Фиг. 5 иллюстрирует примерные компоненты системы обучения переводчика согласно некоторым вариантам осуществления настоящего изобретения. Система 16 обучения может исполнять механизм 60 обучения переводчика, содержащий экземпляр модуля 62 переводчика и модуль 64 обучения, подключенный к модулю 62 переводчика. В некоторых вариантах осуществления настоящего изобретения механизм 60 коммуникативно связан с набором обучающих корпусов 17, используемых модулем 64 обучения для обучения модуля 62 переводчика. Корпус 17 может содержать по меньшей мере один корпус 66 обучения искусственному языку (AL) и/или набор корпусов 68а-b обучения преобразованию естественного языка в искусственный язык (NL-AL).[0037] FIG. 5 illustrates exemplary components of a translator learning system in accordance with some embodiments of the present invention. The learning system 16 may execute a translator learning engine 60 comprising an instance of the translator module 62 and a learning module 64 connected to the translator module 62 . In some embodiments of the present invention, engine 60 is communicatively coupled to a set of training corpuses 17 used by learning module 64 to train translator module 62. The corpus 17 may comprise at least one artificial language (AL) learning corpus 66 and/or a set of natural language to artificial language (NL-AL) learning corpus 68a-b.

[0038] В некоторых вариантах осуществления корпус 66 обучения AL содержит множество записей, причем все записи сформулированы на одном и том же искусственном языке. В одном примере каждая запись состоит из по меньшей мере одного оператора AL, генерированного автоматически или оператором-человеком. Некоторые записи могут включать множество операторов AL, некоторые из которых считаются синонимами или семантическими эквивалентами друг друга. В примере, в котором соответствующий AL является языком запросов к базе данных, два оператора AL могут считаться синонимами, когда они вызывают извлечение одних и тех же данных из базы данных. Аналогично, в примере языка программирования два оператора AL (то есть части кода) могут быть синонимами/семантическими эквивалентами, если они производят одинаковый результат вычислений.[0038] In some embodiments, the AL training corpus 66 contains multiple entries, all of which are formulated in the same artificial language. In one example, each entry consists of at least one AL statement generated automatically or by a human operator. Some entries may include multiple AL statements, some of which are considered synonymous or semantically equivalent to each other. In an example where the corresponding AL is a database query language, two AL statements can be considered synonymous when they cause the same data to be retrieved from the database. Likewise, in an example programming language, two AL statements (that is, parts of code) can be synonymous/semantically equivalent if they produce the same result of computation.

[0039] В некоторых вариантах осуществления корпус 68a-b NL-AL содержит множество записей, каждая запись состоит из кортежа (например, пары) предложений, причем по меньшей мере одно предложение сформулировано на искусственном языке, а другое предложение сформулировано на естественном языке. В некоторых вариантах осуществления сторона AL кортежа содержит перевод стороны NL соответствующего кортежа на искусственный язык. Другими словами, соответствующая сторона AL кортежа имеет то же или очень похожее значение, что и сторона NL соответствующего кортежа. Некоторые кортежи NL-AL могут состоять из одного предложения NL и множества синонимичных предложений AL. Другие кортежи NL-AL могут иметь множество предложений NL, соответствующих одному предложению AL. Отдельные корпуса 68а-b NL-AL могут соответствовать различным естественным языкам (например, английскому и китайскому). В другом примере отдельные корпуса NL-AL могут содержать различные наборы предложений NL, сформулированных на одном и том же естественном языке (например, английском). В одном из таких примеров один корпус NL-AL используется для обучения переводчика, который будет использоваться англоговорящим торговым представителем, в то время как другой корпус NL-AL может использоваться для обучения переводчика для использования англоязычным администратором базы данных.[0039] In some embodiments, NL-AL corpus 68a-b contains a plurality of entries, each entry consisting of a tuple (e.g., a pair) of sentences, with at least one sentence in artificial language and the other sentence in natural language. In some embodiments, the AL side of a tuple contains an artificial language translation of the NL side of the corresponding tuple. In other words, the corresponding AL side of a tuple has the same or very similar meaning as the NL side of the corresponding tuple. Some NL-AL tuples may consist of one NL clause and many synonymous AL clauses. Other NL-AL tuples may have multiple NL clauses corresponding to a single AL clause. Individual cases 68a-b NL-AL may correspond to different natural languages (eg, English and Chinese). In another example, separate NL-AL corpora may contain different sets of NL sentences formulated in the same natural language (eg, English). In one such example, one NL-AL corpus is used to train a translator to be used by an English speaking sales representative, while another NL-AL corpus can be used to train a translator to be used by an English speaking DBA.

[0040] Обучающий модуль 64 конфигурирован для обучения модуля 62 переводчика для получения требуемого результата, например, для правильного перевода предложений на естественном языке в предложения на искусственном языке, как более подробно изложено ниже. Здесь обучение в целом означает процесс регулирования набора параметров модуля 62 переводчика в попытке получить требуемый результат (например, правильный перевод). Примерная последовательность этапов, иллюстрирующая обучение, показана на фиг. 6. Последовательность этапов 302-304 может выбрать элемент корпуса (например, предложение на естественном языке) и ввести соответствующий элемент корпуса в модуль 62 переводчика. Модуль 62 может затем генерировать выходные данные в соответствии с принятыми входными данными. На этапе 308 соответствующие выходные данные сравниваются с требуемыми выходными данными, и определяется оценка производительности, например ошибка перевода, указывающая степень сходства между фактическими выходными данными модуля 62 и требуемыми выходными данными. В ответ на определение оценки производительности на этапе 310 модуль 64 обучения может обновить параметры модуля 62 таким образом, чтобы повысить производительность модуля 62 переводчика, например, за счет уменьшения ошибки перевода. Такая регулировка параметров может осуществляться любым способом, известным в данной области техники. Некоторые примеры включают обратное распространение с использованием градиентного спуска, симуляции восстановления и генетических алгоритмов. В некоторых вариантах осуществления обучение заканчивается, когда какое-либо условие завершения (этап 312) удовлетворено. Более подробная информация об условиях завершения приведена ниже.[0040] The training module 64 is configured to train the translator module 62 to produce a desired result, such as correctly translating natural language sentences into artificial language sentences, as discussed in more detail below. Here, learning generally means the process of adjusting a set of parameters of the translator module 62 in an attempt to obtain a desired result (eg, a correct translation). An exemplary sequence of steps illustrating training is shown in FIG. 6. The sequence of steps 302-304 may select a corpus element (eg, a natural language sentence) and enter the corresponding corpus element into translator module 62. Module 62 may then generate output in accordance with the received input. At block 308, the corresponding output is compared with the desired output and a performance score, such as a translation error, is determined indicating the degree of similarity between the actual output of module 62 and the desired output. In response to determining the performance score at step 310, learning module 64 may update the parameters of module 62 in a manner that improves the performance of translator module 62, such as by reducing translation error. Such adjustment of the parameters can be carried out by any method known in the art. Some examples include backpropagation using gradient descent, recovery simulation, and genetic algorithms. In some embodiments, training ends when any termination condition (block 312) is satisfied. See below for more information on termination conditions.

[0041] В некоторых вариантах осуществления после завершения обучения на этапе 314 система 16 обучения переводчика выводит набор значений 69 параметров переводчика. Когда модуль 62 содержит искусственные нейронные сети, значения 69 параметров переводчика могут включать в себя, например, набор весов синапсов и/или набор значений параметров сетевой архитектуры (например, количество слоев, количество нейронов на слой, карты связности и т.д.). Значения 69 параметров могут быть затем переданы в клиентские системы 12a-d и/или сервер 18 базы данных и использованы для создания экземпляров соответствующих модулей локального переводчика, выполняющих автоматический перевод с естественного языка на искусственный.[0041] In some embodiments, upon completion of training at step 314, the interpreter training system 16 outputs a set of interpreter parameter values 69. When the module 62 contains artificial neural networks, the translator parameter values 69 may include, for example, a set of synapse weights and/or a set of network architecture parameter values (eg, number of layers, number of neurons per layer, connectivity maps, etc.). Parameter values 69 may then be passed to client systems 12a-d and/or database server 18 and used to instantiate appropriate local translator modules that perform automatic natural-to-artificial translation.

[0042] Фиг. 7 иллюстрирует примерную работу модуля 62 переводчика согласно некоторым вариантам осуществления настоящего изобретения. Модуль 62 конфигурирован для автоматического перевода предложения естественного языка (NL), такого как примерное предложение 54, в предложение искусственного языка (AL), такое как примерное предложение 56. Термин «предложение» используется здесь для обозначения любой последовательности слов/лексем, сформулированных на естественном или искусственном языке. Примеры естественных языков включают, среди прочего, английский, немецкий и китайский. Искусственный язык содержит набор токенов (например, ключевые слова, идентификаторы, операторы) вместе с набором правил для объединения соответствующих токенов. Правила обычно известны как грамматика или синтаксис и обычно зависят от языка. Примеры искусственных языков включают формальные компьютерные языки, такие как языки запросов (например, SQL), языки программирования (например, С ++, Perl, Java®, байт-код) и языки разметки (например, XML, HTML). Примеры предложений NL включают, среди прочего, утверждение, вопрос и команду. Примеры предложений AL включают в себя, например, часть компьютерного кода и SQL-запрос.[0042] FIG. 7 illustrates exemplary operation of translator module 62 in accordance with some embodiments of the present invention. Module 62 is configured to automatically translate a natural language (NL) sentence, such as example sentence 54, into an artificial language (AL) sentence, such as example sentence 56. The term "sentence" is used herein to refer to any sequence of words/lexemes formulated in natural language. or artificial language. Examples of natural languages include, among others, English, German, and Chinese. An artificial language contains a set of tokens (eg, keywords, identifiers, operators) along with a set of rules for combining the corresponding tokens. The rules are usually known as grammar or syntax and are usually language specific. Examples of artificial languages include formal computer languages such as query languages (eg SQL), programming languages (eg C++, Perl, Java®, bytecode), and markup languages (eg XML, HTML). Examples of NL sentences include statement, question, and command, among others. Examples of AL sentences include, for example, a piece of computer code and a SQL query.

[0043] В некоторых вариантах осуществления модуль 62 переводчика принимает входной массив 55, содержащий машиночитаемое представление предложения NL, и создает выходной массив 57, содержащий кодирование предложения (й) AL, полученного в результате перевода входного предложения NL. Входные и/или выходные массивы могут содержать массив числовых значений, вычисленных с использованием любого метода, известного в данной области техники, например однократного кодирования. В одном из таких примеров каждому слову словаря NL присвоена отдельная числовая метка. Например, «как» может иметь метку 2, а «много» может иметь метку 37. Затем однократное представление слова «как» может содержать двоичный вектор размером N×1, где N - размер словаря, а все элементы равны 0, кроме второго элемента, который имеет значение 1. Между тем, слово «много» может быть представлено как двоичный вектор А×1, в котором все элементы равны 0, кроме 37-го. В некоторых вариантах осуществления входной массив 55, кодирующий последовательность слов, такую как входное предложение 54, содержит двоичный массив N×М, где М обозначает количество слов входного предложения, при этом каждый столбец входного массива 55 представляет отдельное слово входного предложения. Последовательные столбцы входного массива 55 могут соответствовать последовательным словам входного предложения. Выходной массив 57 может использовать аналогичную стратегию однократного кодирования, хотя словари, используемые для кодирования входных и выходных данных, могут отличаться друг от друга. Поскольку входной массив 55 и выходной массив 57 представляют собой входное предложение 54 и выходное предложение 56, соответственно, выходной массив 57 будет здесь считаться переводом входного массива 55.[0043] In some embodiments, translator module 62 receives an input array 55 containing a machine-readable representation of an NL sentence and produces an output array 57 containing the encoding of the AL sentence(s) resulting from the translation of the NL input sentence. The input and/or output arrays may contain an array of numeric values calculated using any technique known in the art, such as one-time encoding. In one such example, each word in the NL dictionary is assigned a separate numeric label. For example, "how" might have a label of 2, and "many" might have a label of 37. Then a single representation of the word "like" might contain an Nx1 binary vector, where N is the size of the dictionary, and all elements are 0 except for the second element. , which has the value 1. Meanwhile, the word "many" can be represented as a binary vector A×1 in which all elements are 0 except the 37th. In some embodiments, input array 55 encoding a sequence of words, such as input sentence 54, contains an NxM binary array, where M is the number of words in the input sentence, with each column of input array 55 representing a single word in the input sentence. Consecutive columns of the input array 55 may correspond to successive words of the input sentence. The output array 57 may use a similar one-time encoding strategy, although the vocabularies used to encode the input and output data may be different. Since input array 55 and output array 57 are input sentence 54 and output sentence 56, respectively, output array 57 will here be considered a translation of input array 55.

[0044] Преобразование предложения 54 NL во входной массив 55, а также преобразование выходного массива 57 в предложение (я) 56 AL может включать в себя такие операции, как синтаксический анализ, токенизация и т.д., которые могут выполняться программными компонентами отдельно от модуля 62 переводчика.[0044] Converting NL sentence 54 to input array 55, as well as converting output array 57 to AL sentence(s) 56, may include operations such as parsing, tokenization, etc., which may be performed by software components separate from module 62 of the translator.

[0045] В некоторых вариантах осуществления модуль 62 содержит систему искусственного интеллекта, такую как искусственная нейронная сеть, обученная выполнять проиллюстрированный перевод. Такие системы искусственного интеллекта могут быть созданы с использованием любого метода, известного в данной области техники. В предпочтительном варианте осуществления с фиг. 8 модуль 62 включает в себя кодер 70 и декодер 72, подключенные к кодеру 70. Каждый из кодера 70 и декодера 72 может содержать нейронную сеть, например рекуррентную нейронную сеть (RNN). RNN образуют особый класс искусственных нейронных сетей, в которых соединения между узлами сети образуют ориентированный граф. Примеры рекуррентных нейронных сетей включают, среди прочего, сети долгой краткосрочной памяти (LSTM).[0045] In some embodiments, module 62 includes an artificial intelligence system, such as an artificial neural network, trained to perform illustrated translation. Such artificial intelligence systems can be created using any method known in the art. In the preferred embodiment of FIG. 8, module 62 includes an encoder 70 and a decoder 72 coupled to encoder 70. Each of encoder 70 and decoder 72 may comprise a neural network, such as a recurrent neural network (RNN). RNNs form a special class of artificial neural networks in which connections between network nodes form a directed graph. Examples of recurrent neural networks include, among others, long short term memory (LSTM) networks.

[0046] Кодер 70 принимает входной массив 55 и выводит внутренний массив 59, содержащий собственное внутреннее представление входного предложения 54 модуля переводчика. На практике внутренний массив 59 содержит математическое преобразование входного массива 55 посредством набора операций, специфичных для кодера 70 (например, умножение матриц, применение функций активации и т.д.). В некоторых вариантах осуществления размер внутреннего массива 59 является фиксированным, в то время как размер входного массива 55 может варьироваться в зависимости от входного предложения. Например, длинные входные предложения могут быть представлены с использованием относительно больших входных массивов по сравнению с короткими входными предложениями. С этой точки зрения можно сказать, что в некоторых вариантах осуществления кодер 70 преобразует входные данные переменного размера в кодирование фиксированного размера соответствующих входных данных. В некоторых вариантах осуществления декодер 72 принимает внутренний массив 59 в качестве входных данных и создает выходной массив 57 с помощью второго набора математических операций. Размер выходного массива 57 может изменяться в зависимости от содержимого внутреннего массива 59 и, следовательно, в соответствии с входным предложением.[0046] The encoder 70 receives an input array 55 and outputs an internal array 59 containing its own internal representation of the input sentence 54 of the translator module. In practice, internal array 59 contains a mathematical transformation of input array 55 through a set of operations specific to encoder 70 (eg, matrix multiplication, application of activation functions, etc.). In some embodiments, the size of the inner array 59 is fixed, while the size of the input array 55 may vary depending on the input sentence. For example, long input sentences can be represented using relatively large input arrays compared to short input sentences. From this point of view, it can be said that in some embodiments, encoder 70 converts the variable size input into a fixed size encoding of the corresponding input. In some embodiments, the implementation of the decoder 72 takes the internal array 59 as input and creates an output array 57 using the second set of mathematical operations. The size of the output array 57 may vary depending on the contents of the inner array 59 and, therefore, in accordance with the input sentence.

[0047] Фиг. 9 иллюстрирует примерный процесс обучения модуля 62 переводчика для выполнения автоматизированных преобразований NL в AL. В некоторых вариантах осуществления обучение включает по меньшей мере два этапа. Первый этап, представленный этапами 322-324, включает обучение экземпляра модуля 62 переводчика на корпусе искусственного языка (например, корпус 66 AL на фиг. 5). В некоторых вариантах осуществления этап 322 содержит модуль 62 обучения переводчика для создания выходных данных AL при подаче входных данных AL. В одном из таких примеров модуль 62 переводчика обучен воспроизводить ввод, сформулированный на соответствующем искусственном языке. В другом примере модуль 62 обучается, при подаче входных данных AL, производить синоним/семантический эквивалент соответствующих входных данных. В еще одном примере модуль 62 обучен так, чтобы его выходные данные были по меньшей мере грамматически правильными, то есть чтобы выходные данные соответствовали правилам грамматики/синтаксиса соответствующего искусственного языка.[0047] FIG. 9 illustrates an exemplary process for training translator module 62 to perform automated NL to AL conversions. In some embodiments, the implementation of training includes at least two stages. The first step, represented by steps 322-324, involves training an instance of translator module 62 on an artificial language corpus (eg, AL corpus 66 in FIG. 5). In some embodiments, step 322 includes a translator training module 62 to generate an AL output when the AL input is provided. In one such example, translator module 62 is trained to render input formulated in an appropriate artificial language. In another example, module 62 learns, when given input AL, to produce a synonym/semantic equivalent of the corresponding input. In yet another example, module 62 is trained so that its output is at least grammatically correct, that is, that the output conforms to the grammar/syntax rules of the corresponding artificial language.

[0048] В некоторых вариантах осуществления первый этап обучения продолжается до тех пор, пока не будет удовлетворен набор условий завершения (этап 324). Условия завершения могут включать в себя критерии производительности, например, является ли среднее отклонение от ожидаемых выходных данных модуля 62 (то есть ошибка перевода) меньше, чем предварительно определенный порог. Другой примерный критерий производительности состоит в том, являются ли выходные данные модуля 62 перевода в основном грамматически правильным, например, по меньшей мере, в 90% случаев. В варианте осуществления, в котором выходные данные модуля 62 сформулированы на языке программирования, проверка грамматической правильности может включать в себя попытку скомпилировать соответствующие выходные данные и определение того, что соответствующие выходные данные являются правильными, при отсутствии ошибок компиляции. Другие примерные условия завершения включают в себя критерии вычислительной стоимости, например, обучение может продолжаться до тех пор, пока не будет превышен предварительно определенный предел времени или количество итераций.[0048] In some embodiments, the first stage of training continues until the set of termination conditions is satisfied (block 324). Termination conditions may include performance criteria such as whether the average deviation from the expected output of module 62 (ie, translation error) is less than a predetermined threshold. Another exemplary performance criterion is whether the output of translation module 62 is generally grammatically correct, such as at least 90% of the time. In an embodiment in which the output of module 62 is formulated in a programming language, the grammatical check may include attempting to compile the corresponding output and determining that the corresponding output is correct in the absence of compilation errors. Other exemplary termination conditions include computational cost criteria, for example, training may continue until a predetermined time limit or number of iterations is exceeded.

[0049] В некоторых вариантах осуществления второй этап обучения, проиллюстрированный этапами 326-328 на фиг. 9, содержит модуль 62 обучения переводчика на корпусе с естественного языка на искусственный язык, то есть с использованием кортежей NL-AL. В одном таком примере модуль 62 обучается при подаче NL-стороны кортежа в качестве входных данных для вывода соответствующей AL-стороны кортежа. В альтернативном варианте осуществления модуль 62 можно обучить выводить по меньшей мере синоним AL-стороны соответствующего кортежа. Второй этап обучения может продолжаться до тех пор, пока не будут удовлетворены критерии завершения (например, пока не будет достигнут желаемый процент правильных преобразований NL в AL). Затем, на этапе 330, система 16 обучения переводчика может выводить значения 69 параметров переводчика, полученные в результате обучения. В примерном варианте осуществления, в котором модуль 62 переводчика использует нейронные сети, значения 69 параметров могут включать в себя значения весов синапсов, полученные посредством обучения.[0049] In some embodiments, the second training step, illustrated by steps 326-328 in FIG. 9 contains a translator training module 62 on a natural language to artificial language corpus, that is, using NL-AL tuples. In one such example, module 62 is trained on the NL side of the tuple as input to output the corresponding AL side of the tuple. In an alternative embodiment, module 62 can be trained to output at least a synonym for the AL side of the corresponding tuple. The second stage of training may continue until the completion criteria are met (eg, until the desired percentage of correct NL to AL conversions is reached). Then, at step 330, the interpreter training system 16 may output the interpreter parameter values 69 resulting from the training. In an exemplary embodiment in which translator module 62 uses neural networks, parameter values 69 may include synapse weight values obtained through training.

[0050] Фиг. 10 дополнительно иллюстрирует тренировку первого этапа в предпочтительном варианте осуществления настоящего изобретения. Проиллюстрированный модуль 62а переводчика первой этапа содержит кодер 70а искусственного языка, подключенный к декодеру 72. Кодер 70а AL принимает входной массив 55а и выводит внутренний массив 59а, который, в свою очередь, преобразуется декодером 72 в выходной массив 57а. В некоторых вариантах осуществления обучение на первом этапе включает обеспечение модуля 62а переводчика множеством входов AL и настройку параметров модуля 62а для генерации выходных данных AL, которые аналогичны соответствующим представленным входным данным. Другими словами, в некоторых вариантах осуществления цель обучения на первом этапе может состоять в том, чтобы сделать выходные данные более похожими на входные данные. В альтернативных вариантах осуществления цель обучения может заключаться в том, чтобы выходные данные были по меньшей мере, синонимами соответствующих входных данных, или чтобы выходные данные были грамматически правильными на соответствующем искусственном языке.[0050] FIG. 10 further illustrates the first stage training in the preferred embodiment of the present invention. The illustrated first stage interpreter module 62a includes an artificial language encoder 70a coupled to a decoder 72. The AL encoder 70a receives an input array 55a and outputs an internal array 59a, which is in turn converted by the decoder 72 to an output array 57a. In some embodiments, learning in the first step includes providing translator module 62a with a plurality of AL inputs and setting the parameters of module 62a to generate AL output data that is similar to the corresponding input data presented. In other words, in some embodiments, the goal of learning in the first step may be to make the output more similar to the input. In alternative embodiments, the goal of learning may be that the output is at least synonymous with the corresponding input, or that the output is grammatically correct in the corresponding artificial language.

[0051] В одном примере обучения первого этапа для каждой пары входных/выходных массивов обучающий модуль 64 может вычислять оценку сходства, указывающую степень сходства между выходными и входными массивами (57а и 55а на фиг. 10, соответственно). Оценка сходства может быть вычислена с использованием любого метода, известного в данной области техники, например, в соответствии с расстоянием Манхэттена или Левенштейна между входными и выходными массивами. Обучающий модуль 64 может затем отрегулировать параметры кодера 70а AL и/или декодера 72 для увеличения сходства между выходными данными декодера 72 и входными данными кодера 70а AL, например, чтобы уменьшить среднее манхэттенское расстояние между массивами 55а и 57а.[0051] In one example of first stage training, for each pair of input/output arrays, training module 64 may calculate a similarity score indicating the degree of similarity between the output and input arrays (57a and 55a in FIG. 10, respectively). The similarity score can be calculated using any method known in the art, for example, according to the Manhattan or Levenshtein distance between the input and output arrays. Teaching module 64 may then adjust the parameters of AL encoder 70a and/or decoder 72 to increase the similarity between the output of decoder 72 and the input of AL encoder 70a, such as to reduce the average Manhattan distance between arrays 55a and 57a.

[0052] Обучение на первом этапе может продолжаться до тех пор, пока не будут выполнены условия завершения первого этапа (например, пока не будет достигнут предварительно определенный уровень производительности, пока все элементы корпуса 66 AL не будут использованы в обучении, и т.д.).[0052] Training in the first stage may continue until the conditions for completing the first stage are met (for example, until a predetermined performance level is reached, until all elements of the 66 AL body have been used in training, etc. ).

[0053] Фиг. 11-А иллюстрирует примерный процесс обучения второго этапа, который включает обучение переводу между естественным языком и искусственным языком, используемым в обучении первого этапа. В некоторых вариантах осуществления переход от первого ко второму этапу включает переключение на модуль 62b переводчика второго этапа, полученный заменой кодера 70а AL кодером 70b естественного языка, при сохранении уже обученного декодера 72. Иначе говоря, декодер 72 сохраняет экземпляры со значениями параметров, полученными в результате обучения на первом этапе. Архитектура и/или значения параметров кодера 70b NL могут существенно отличаться от кодера 70а AL. Одна причина такого различия состоит в том, что словари искусственных и естественных языков обычно отличаются друг от друга, поэтому входные массивы, представляющие предложения NL, могут отличаться по меньшей мере по размеру от входных массивов, представляющих предложения AL. Другая причина, по которой кодеры 70а-b могут иметь разные архитектуры, заключается в том, что грамматика/синтаксис искусственных языков обычно существенно отличается от грамматики/синтаксиса естественных языков.[0053] FIG. 11-A illustrates an exemplary second stage learning process that includes learning to translate between natural language and artificial language used in first stage learning. In some embodiments, the transition from the first to the second stage includes switching to the second stage interpreter module 62b obtained by replacing the AL encoder 70a with the natural language encoder 70b, while maintaining the already trained decoder 72. In other words, the decoder 72 stores the instances with the parameter values obtained as a result learning at the first stage. The architecture and/or parameter values of NL encoder 70b may differ significantly from AL encoder 70a. One reason for this difference is that the vocabularies of artificial and natural languages usually differ from each other, so the input arrays representing NL sentences may differ at least in size from the input arrays representing AL sentences. Another reason why encoders 70a-b may have different architectures is that the grammar/syntax of artificial languages is usually quite different from the grammar/syntax of natural languages.

[0054] Кодер 70b NL принимает входной массив 55b, представляющий предложение NL, и выводит внутренний массив 59b. В некоторых вариантах осуществления внутренний массив 59b имеет тот же размер и/или структуру, что и внутренний массив 59а, выводимый кодером 59а AL модуля 62а перевода (см. Фиг. 10). Затем внутренний массив 59b подается в качестве входных данных в декодер 72, который, в свою очередь, создает выходной массив 57 с, представляющий предложение AL.[0054] The NL encoder 70b receives an input array 55b representing the NL sentence and outputs the inner array 59b. In some embodiments, internal array 59b has the same size and/or structure as internal array 59a output by AL encoder 59a of translation module 62a (see FIG. 10). The internal array 59b is then fed as input to the decoder 72 which in turn creates an output array 57c representing the AL sentence.

[0055] В некоторых вариантах осуществления, обучение на втором этапе использует кортежи NL-AL, причем AL-сторона кортежа представляет перевод в целевую AL-NL сторону соответствующего кортежа. Обучение на втором этапе может включать предоставление кодеру 70b NL множества входных данных NL, при этом каждые входные данные NL содержат NL-сторону кортежа NL-AL, и настройку параметров модуля 62b переводчика так, чтобы выходные данные декодера 72 был подобны AL-стороне соответствующего кортежа NL-AL. Иначе говоря, цель обучения на втором этапе состоит в том, чтобы сделать выходные данные декодера 72 более похожими на переводы в целевой AL соответствующих входов NL.[0055] In some embodiments, the second stage training uses NL-AL tuples, where the AL side of the tuple represents the translation to the target AL-NL side of the corresponding tuple. Training in the second step may include providing the NL encoder 70b with a set of NL inputs, with each NL input containing the NL side of the NL-AL tuple, and setting the parameters of the translator module 62b so that the output of the decoder 72 is similar to the AL side of the corresponding tuple. NL-AL. In other words, the goal of training in the second step is to make the output of the decoder 72 more like the translations in the target AL of the corresponding NL inputs.

[0056] В одном примерном варианте осуществления, в ответ на подачу NL-стороны каждого кортежа (представленного как массив 55b на фиг. 11-А) в кодер 70b NL, модуль 64 обучения может сравнивать выходные данные декодера 72 (массив 57с) с AL-стороны соответствующего кортежа (массив 57b). Сравнение может включать в себя вычисление оценки сходства, указывающей степень сходства между массивами 57b и 57с. Обучающий модуль 64 может отрегулировать параметры кодера 70b NL и/или декодера 72 в направлении увеличения сходства между массивами 57b и 57с. [0056] In one exemplary embodiment, in response to feeding the NL side of each tuple (represented as array 55b in FIG. 11-A) to NL encoder 70b, learning module 64 may compare the output of decoder 72 (array 57c) to AL -sides of the corresponding tuple (array 57b). The comparison may include calculating a similarity score indicating the degree of similarity between the arrays 57b and 57c. Teaching module 64 may adjust the parameters of NL encoder 70b and/or decoder 72 to increase the similarity between arrays 57b and 57c.

[0057] Альтернативный сценарий для второго этапа тренировки проиллюстрирован на фиг. 11-В. В данном альтернативном сценарии используются (обученный) кодер AL, полученный путем обучения на первом этапе (например, кодер 70а AL на фиг. 10, конкретизированный со значениями параметров, полученными в результате обучения на первом этапе), так и кодер 70b NL. В некоторых вариантах осуществления в кодер 70b NL подается входной массив 55b, представляющий NL-сторону кортежа NL-AL, в то время как в кодер AL подается выходной массив 57b, представляющий AL-сторону соответствующего кортежа. Способ основан на наблюдении, что кодер 70а AL уже конфигурирован во время первого этапа обучения для преобразования входных данных AL в «правильный» внутренний массив 59с, который декодер 72 может затем преобразовать обратно в соответствующие входные данные AL. Иначе говоря, для того, чтобы декодер 72 сформировал выходной массив 57а, его входные данные должен быть как можно ближе к выходным данным (уже обученного) кодера 70а AL. Следовательно, в варианте осуществления с фиг. 11-В модуль 64 обучения может сравнивать выходные данные кодера 72 NL (то есть внутренний массив 59b) с внутренним массивом 59с и количественно определять разницу как оценку сходства. Модуль 64 обучения может регулировать параметры кодера 70b NL и/или декодера 72 в направлении увеличения сходства между массивами 59b и 59 с. [0057] An alternative scenario for the second training step is illustrated in FIG. 11-B. This alternative scenario uses a (trained) AL encoder obtained from first stage training (eg, AL encoder 70a in FIG. 10 instantiated with parameter values obtained from stage one training) and an NL encoder 70b. In some embodiments, an NL encoder 70b is fed an input array 55b representing the NL side of an NL-AL tuple, while an AL encoder is fed an output array 57b representing the AL side of the corresponding tuple. The method relies on the observation that the AL encoder 70a is already configured during the first training step to convert the AL inputs into a "correct" internal array 59c, which the decoder 72 can then convert back to the corresponding AL inputs. In other words, for decoder 72 to generate output array 57a, its input must be as close as possible to the output of (already trained) AL encoder 70a. Therefore, in the embodiment of FIG. 11-B, learning module 64 may compare the output of NL encoder 72 (ie, inner array 59b) with inner array 59c and quantify the difference as a similarity score. Learning module 64 may adjust parameters of NL encoder 70b and/or decoder 72 to increase the similarity between arrays 59b and 59c.

[0058] Фиг. 12 иллюстрирует примерную последовательность этапов для обучения модуля 62 переводчика на множестве обучающих корпусов согласно некоторым вариантам осуществления настоящего изобретения. Проиллюстрированный способ основан на наблюдении, что декодер 72 может быть обучен только один раз для каждого целевого искусственного языка (см. первый этап обучения выше), а затем повторно использован в уже обученной форме для получения множества модулей переводчика, например, модулей, которые могут переводить с множества исходных естественных языков (например, английского, немецкого и т.д.) на соответствующий целевой искусственный язык (например, SQL).[0058] FIG. 12 illustrates an exemplary sequence of steps for training translator module 62 on a plurality of training corpora, in accordance with some embodiments of the present invention. The illustrated method is based on the observation that the decoder 72 can only be trained once for each target artificial language (see the first stage of training above) and then reused in the already trained form to obtain a plurality of translator modules, e.g., modules that can translate from a plurality of source natural languages (eg, English, German, etc.) to a corresponding target artificial language (eg, SQL).

[0059] В другом примере каждый отдельный модуль переводчика можно обучить на отдельном наборе предложений NL, сформулированных на одном и том же естественном языке (например, английском). Данный конкретный вариант осуществления основан на наблюдении, что язык обычно является специализированным и специфичным для конкретной задачи, то есть предложения/команды, которые люди-операторы используют для решения определенных проблем, отличаются от предложений/команд, используемых при других обстоятельствах. Следовательно, в некоторых вариантах осуществления используется один корпус (то есть набор предложений NL) для обучения переводчика, который будет использоваться продавцом, и другой корпус, чтобы обучить переводчика, который будет использоваться техническим персоналом.[0059] In another example, each individual translator module can be trained on a separate set of NL sentences formulated in the same natural language (eg, English). This particular embodiment is based on the observation that language is usually specialized and task specific, i.e. the sentences/commands that human operators use to solve certain problems are different from the sentences/commands used in other circumstances. Therefore, in some embodiments, one corpus (ie, a set of NL sentences) is used to train an interpreter to be used by a salesperson and another corpus to train an interpreter to be used by technicians.

[0060] Этапы 342-344 на фиг. 12 иллюстрируют процесс обучения первого этапа, содержащий обучение кодера 70а AL и/или декодера 72. В ответ на успешное обучение первого этапа этап 346 заменяет кодер 70а AL на кодер NL. В некоторых вариантах осуществления затем выполняется второй этап обучения кодера NL для каждого доступного корпуса NL-AL. При переключении с одного корпуса NL-AL на другой (например, при переключении с английского на испанский или с «коммерческого английского» на «технический английский») некоторые варианты осуществления заменяют существующий кодер NL на новый кодер NL, подходящий для текущего NL-AL корпуса (этап 358) с сохранением уже обученного декодера 72. Такие оптимизации могут существенно облегчить и ускорить обучение автоматических переводчиков.[0060] Steps 342-344 in FIG. 12 illustrates a first stage learning process comprising training an AL encoder 70a and/or a decoder 72. In response to successful first stage learning, step 346 replaces the AL encoder 70a with an NL encoder. In some embodiments, a second stage of NL encoder training is then performed for each available NL-AL frame. When switching from one NL-AL package to another (for example, when switching from English to Spanish or from "commercial English" to "technical English"), some embodiments replace the existing NL encoder with a new NL encoder suitable for the current NL-AL package (step 358) while retaining the already trained decoder 72. Such optimizations can greatly facilitate and speed up the training of automatic translators.

[0061] В некоторых вариантах осуществления, обучение второго этапа только регулирует параметры кодера 70b NL (см. фиг. 11-А-В), сохраняя при этом параметры декодера 72 фиксированными на значении (значениях), полученном посредством обучения первого этапа. Такая стратегия обучения направлена на сохранение производительности декодера 72 на уровне, достигаемом посредством обучения первого этапа, независимо от выбора исходного естественного языка или корпуса NL-AL. В других вариантах осуществления, в которых обучение включает регулирование параметров как кодера 70b NL, так и декодера 72, этап 358 может дополнительно содержать сброс параметров декодера 72 до значений, полученных по завершении обучения первого этапа.[0061] In some embodiments, the second stage training only adjusts the parameters of the NL encoder 70b (see FIGS. 11-A-B) while keeping the parameters of the decoder 72 fixed at the value(s) obtained through the first stage training. Such a learning strategy aims to keep the performance of the decoder 72 at the level achieved by learning the first stage, regardless of the choice of the original natural language or NL-AL corpus. In other embodiments where training includes adjusting the parameters of both the NL encoder 70b and the decoder 72, step 358 may further comprise resetting the parameters of the decoder 72 to the values obtained upon completion of the first step training.

[0062] Примерные системы и способы, описанные выше, обеспечивают автоматический перевод с исходного естественного языка, такого как английский, на целевой искусственный язык (например, SQL, язык программирования, язык разметки и т.д.). Одно примерное применение некоторых вариантов осуществления настоящего изобретения позволяет непрофессионалу выполнять запросы к базе данных с использованием простых вопросов, сформулированных на естественном языке, без необходимости знания языка запросов, такого как SQL. Например, оператор по продажам может спросить клиентскую машину: «Сколько у нас клиентов младше 30 лет в Колорадо?». В ответ машина может преобразовать соответствующий вопрос в запрос к базе данных и выполнить соответствующий запрос, чтобы получить ответ на вопрос оператора.[0062] The exemplary systems and methods described above provide automatic translation from a source natural language, such as English, to a target artificial language (eg, SQL, programming language, markup language, etc.). One exemplary application of some embodiments of the present invention allows the layperson to query a database using simple natural language questions without the need for knowledge of a query language such as SQL. For example, a sales operator might ask a client machine, "How many customers do we have under the age of 30 in Colorado?" In response, the machine can convert the corresponding question into a database query and execute the corresponding query to obtain an answer to the operator's question.

[0063] В некоторых вариантах осуществления используется модуль переводчика для перевода последовательности слов NL в предложение AL, например, в действительный запрос, используемый для выборочного извлечения данных из базы данных. Модуль переводчика может содержать набор искусственных нейронных сетей, таких как сеть кодера и сеть декодера. Кодер и декодер могут быть созданы с использованием рекуррентных нейронных сетей (RNN) или любой другой технологии искусственного интеллекта.[0063] In some embodiments, a translator module is used to translate a sequence of NL words into an AL sentence, such as a valid query used to selectively retrieve data from a database. The translator module may comprise a set of artificial neural networks such as an encoder network and a decoder network. The encoder and decoder can be created using recurrent neural networks (RNN) or any other artificial intelligence technology.

[0064] В некоторых вариантах осуществления обучение модуля переводчика включает, по меньшей мере, два этапа. На первом этапе модуль переводчика обучается формировать выходные данные AL в ответ на входные данные AL. Например, первый этап обучения может включать обучение модуля переводчика воспроизводить входные данные AL. В альтернативном варианте осуществления переводчик обучается создавать грамматически правильные предложения AL в ответ на ввод AL. Используя удобную метафору, можно сказать, что обучение первого этапа учит модуль переводчика «говорить» на соответствующем искусственном языке. На практике обучение первого этапа включает в себя представление переводчику обширного корпуса предложений AL (например, SQT-запросов). Для каждого входного предложения выходные данные переводчика оцениваются для определения оценки производительности, а параметры переводчика регулируются для повышения производительности переводчика при обучении.[0064] In some embodiments, training the interpreter module includes at least two steps. In the first step, the translator module is trained to generate output AL in response to input AL. For example, the first stage of training may include training the translator module to render AL input. In an alternative embodiment, the interpreter is trained to create grammatically correct sentences AL in response to input AL. To use a convenient metaphor, the first stage training teaches the translator module to "speak" the corresponding artificial language. In practice, learning the first stage involves presenting a large corpus of AL sentences (eg SQT queries) to the translator. For each input sentence, the translator's output is evaluated to determine a performance score, and the translator's parameters are adjusted to improve the translator's performance in training.

[0065] Последующий второй этап включает обучение модуля переводчика для создания выходных данных AL в ответ на входные данные NT, сформулированные на исходном языке. На втором этапе обучения может использоваться корпус NL-AL, содержащий множество кортежей предложений (например, пар), каждый кортеж имеет по меньшей мере NL-сторону и AL-сторону. В примерном варианте осуществления каждая AL-сторона кортежа может представлять перевод соответствующей NL-стороны, то есть желаемый результат переводчика, когда он представлен соответствующей NL-стороной кортежа. Примерное обучение второго этапа происходит следующим образом: для каждого кортежа NL-AL переводчик принимает NL-сторону в качестве входных данных. Выходные данные переводчика сравниваются с AL-стороной кортежа для определения ошибки перевода, и параметры переводчика регулируются для уменьшения ошибки переводчика.[0065] The subsequent second step includes training the translator module to generate output AL in response to input NT formulated in the source language. The second stage of training may use an NL-AL corpus containing a plurality of sentence tuples (eg, pairs), each tuple having at least an NL side and an AL side. In an exemplary embodiment, each AL-side of the tuple may represent the translation of the corresponding NL-side, that is, the desired result of the translator when represented by the corresponding NL-side of the tuple. The exemplary training of the second stage proceeds as follows: for each NL-AL tuple, the translator takes the NL side as input. The translator output is compared to the AL-side of the tuple to determine the translation error, and the translator parameters are adjusted to reduce the translator error.

[0066] Традиционные автоматические переводчики обычно обучаются с использованием пар элементов, в которых один член пары сформулирован на исходном языке, а другой член пары сформулирован на целевом языке. Одним из технических препятствий, с которыми сталкивается такое традиционное обучение, является размер учебного корпуса. В данной области хорошо известно, что более крупные и разнообразные корпуса производят более надежных и производительных переводчиков. Для достижения приемлемой производительности перевода могут потребоваться десятки тысяч кортежей NL-AL или больше. Но поскольку кортежи NL-AL, как правило, не могут быть созданы автоматически, объем квалифицированного человеческого труда, необходимый для создания таких больших корпусов, непрактичен.[0066] Conventional automatic translators are typically trained using element pairs in which one member of the pair is articulated in the source language and the other member of the pair is articulated in the target language. One of the technical hurdles that such traditional teaching faces is the size of the teaching building. It is well known in the art that larger and more diverse corpora produce more reliable and productive translators. Tens of thousands of NL-AL tuples or more may be required to achieve acceptable translation performance. But since NL-AL tuples typically cannot be created automatically, the amount of skilled human labor required to create such large corpora is impractical.

[0067] Напротив, предложения AL могут производиться автоматически в большом количестве. В некоторых вариантах осуществления настоящего изобретения это понимание используется для повышения производительности, облегчения обучения и сокращения времени вывода модуля переводчика на рынок. Первый этап обучения может проводиться на относительно большом, автоматически генерируемом корпусе AL, в результате чего частично обученный переводчик способен надежно создавать грамматически правильные предложения AL на целевом искусственном языке. Затем второй этап обучения может быть проведен на корпусе NL-AL меньшего размера.[0067] In contrast, AL offers can be auto-produced in bulk. In some embodiments of the present invention, this understanding is used to improve performance, facilitate learning, and reduce the time to market of the translator module. The first stage of training can be carried out on a relatively large, automatically generated AL corpus, whereby a partially trained translator is able to reliably generate grammatically correct AL sentences in the target artificial language. Then the second stage of training can be carried out on a smaller NL-AL body.

[0068] Другое преимущество двухэтапного обучения, как описано в данном документе, состоит в том, что множество переводчиков NL-AL могут быть разработаны независимо друг от друга, без необходимости повторения первого этапа обучения. Таким образом, часть декодера модуля переводчика может быть повторно использована как есть (т.е. без переобучения) во множестве переводчиков, что может существенно снизить их затраты на разработку и время вывода на рынок. Каждый такой отдельный переводчик может соответствовать, например, отдельному исходному естественному языку, такому как английский, немецкий и китайский. В другом примере каждый отдельный переводчик может быть обучен разному набору предложений одного и того же естественного языка (например, английского). Такие ситуации могут возникнуть, когда каждый переводчик используется для отдельной задачи/приложения, например, один переводчик используется в продажах, а другой - в управлении базой данных.[0068] Another advantage of two-stage training as described herein is that multiple NL-AL interpreters can be developed independently of each other, without the need to repeat the first training stage. Thus, the decoder part of the translator module can be reused as is (ie without retraining) in multiple translators, which can significantly reduce their development costs and time to market. Each such separate translator may correspond to, for example, a separate source natural language such as English, German, and Chinese. In another example, each individual translator may be trained on a different set of sentences from the same natural language (eg, English). Such situations can arise when each translator is used for a separate task/application, for example one translator is used in sales and the other in database management.

[0069] Хотя основная часть настоящего описания была направлена на обучение автоматическому переводу с естественного языка на язык запросов, такой как SQL, специалисту в данной области техники понятно, что описанные системы и способы могут быть адаптированы для других приложений и искусственных языков. Альтернативные языки запросов включают SPARQL и другие языки запросов формата описания ресурсов (RDF). Примеры применения таких переводов включают облегчение доступа к данным, представленным в RDF, например, для извлечения информации из всемирной паутины и/или разнородных баз знаний, таких как Wikipedia®. Другим примерным применением некоторых вариантов осуществления настоящего изобретения является автоматическая генерация кода RDF, например, для автоматической организации/структурирования разнородных данных или для ввода данных в базу знаний без специальных знаний в области программирования или языков запросов.[0069] Although the bulk of the present disclosure has been directed to learning automatic translation from a natural language to a query language such as SQL, one of skill in the art will appreciate that the systems and methods described may be adapted for other applications and artificial languages. Alternative query languages include SPARQL and other Resource Description Format (RDF) query languages. Examples of applications for such translations include facilitating access to data represented in RDF, for example, to extract information from the World Wide Web and/or heterogeneous knowledge bases such as Wikipedia®. Another exemplary application of some embodiments of the present invention is the automatic generation of RDF code, for example, for automatically organizing/structuring heterogeneous data or for entering data into a knowledge base without special knowledge of programming or query languages.

[0070] Приложения некоторых вариантов осуществления, в которых целевой язык является языком программирования, могут включать, среди прочего, автоматическое создание кода (например, сценария оболочки), обеспечивающего взаимодействие человека с машиной. Например, пользователь может попросить машину выполнить действие (например, позвонить по телефонному номеру, получить доступ к веб-странице, получить объект и т.д.). Автоматический переводчик может преобразовывать соответствующую команду NL в набор машиночитаемых инструкций, которые могут выполняться в ответ на получение команды пользователя. Другие примерные приложения включают в себя автоматический перевод кода между двумя разными языками программирования (например, с Python на Java(№) и автоматическую обработку мультимедийных данных (например, аннотирование изображений и видео).[0070] Applications of some embodiments where the target language is a programming language may include, among other things, automatic generation of code (eg, shell script) for human-machine interaction. For example, the user may ask the machine to perform an action (eg, call a phone number, access a web page, retrieve an object, etc.). The automatic translator can translate the corresponding NL command into a set of machine-readable instructions that can be executed in response to receiving the user's command. Other exemplary applications include automatic code translation between two different programming languages (eg, from Python to Java(#) and automatic processing of multimedia data (eg, image and video annotation).

[0071] В еще одном примере некоторые поставщики услуг компьютерной безопасности, специализирующиеся на обнаружении вредоносного программного обеспечения, используют специальный язык программирования (версию байт-кода) для кодирования процедур обнаружения вредоносных программ и/или сигнатур, указывающих на наличие вредоносных программ. Некоторые варианты осуществления настоящего изобретения могут облегчить такие исследования и разработки в области защиты от вредоносных программ, позволяя оператору без специальных знаний о байт-коде автоматически генерировать подпрограммы байт-кода.[0071] In yet another example, some computer security service providers specializing in malware detection use a special programming language (bytecode version) to encode malware detection routines and/or malware signatures. Some embodiments of the present invention may facilitate such anti-malware research and development by allowing an operator without special knowledge of bytecode to automatically generate bytecode routines.

[0072] Специалисту в данной области техники понятно, что вышеупомянутые варианты осуществления могут быть различным образом изменены, без выхода при этом за рамки объема правовой охраны настоящего изобретения. Соответственно, объем правовой охраны настоящего изобретения определен следующей ниже формулой изобретения и ее юридическими эквивалентами.[0072] Those skilled in the art will appreciate that the above embodiments may be varied in various ways without departing from the scope of the present invention. Accordingly, the scope of protection of the present invention is defined by the following claims and their legal equivalents.

Claims (76)

1. Способ автоматического перевода с естественного языка на искусственный машиночитаемый язык, включающий использование по меньшей мере одного аппаратного процессора компьютерной системы, чтобы:1. A method for automatically translating from a natural language into an artificial machine-readable language, which includes using at least one hardware processor of a computer system to: выполнять первый этап, на котором:carry out the first stage, in which: исполняют кодер искусственного языка (AL) и декодер, связанный с кодером AL, причем кодер AL конфигурирован для приема первого входного массива, содержащего представление входного предложения AL, сформулированного на искусственном языке, и, в ответ, создания первого внутреннего массива, причем декодер конфигурирован для приема первого внутреннего массива и, в ответ, создания первого выходного массива, содержащего представление первого выходного предложения AL, сформулированного на искусственном языке; в ответ на предоставление первого входного массива кодеру AL, определяют первую оценку сходства, указывающую степень сходства между входным предложением AL и первым выходным предложением AL;an artificial language (AL) encoder and a decoder associated with the AL encoder are executed, the AL encoder being configured to receive a first input array containing a representation of an artificial language input sentence AL and, in response, producing a first internal array, the decoder being configured to receiving a first internal array and, in response, creating a first output array containing a representation of the first output sentence AL formulated in an artificial language; in response to providing the first input array to the encoder AL, determining a first similarity score indicating a degree of similarity between the input sentence AL and the first output sentence AL; регулируют первый набор параметров декодера в соответствии с первой оценкой сходства, чтобы улучшить соответствие между входными данными кодера AL и выходными данными декодера; определяют, удовлетворяется ли условие завершения обучения первого этапа;adjusting the first set of decoder parameters in accordance with the first similarity score to improve the match between encoder input AL and decoder output; determining whether the first stage training completion condition is satisfied; в ответ на определение, удовлетворяется ли условие завершения обучения первого этапа, если условие завершения обучения первого этапа удовлетворено, выполнять второй этап, на котором:in response to determining whether the learning completion condition of the first stage is satisfied, if the learning completion condition of the first stage is satisfied, perform the second stage, in which: исполняют кодер естественного языка (NL), конфигурированный для приема второго входного массива, содержащего представление входного предложения NL, сформулированного на естественном языке, и, в ответ, выведения второго внутреннего массива в декодер;executing a natural language (NL) encoder configured to receive a second input array containing a natural language representation of the NL input sentence and, in response, output a second internal array to the decoder; определяют второй выходной массив, созданный декодером в ответ на прием второго внутреннего массива, причем второй выходной массив содержит представление второго выходного предложения AL, сформулированного на искусственном языке;determining a second output array generated by the decoder in response to receiving the second internal array, the second output array containing a representation of the second output sentence AL formulated in an artificial language; определяют вторую оценку сходства, указывающую степень сходства между вторым выходным предложением AL и целевым предложением AL, содержащим перевод входного предложения NL на искусственный язык; иdetermining a second similarity score indicating a degree of similarity between the second output sentence AL and the target sentence AL containing the artificial language translation of the input sentence NL; And регулируют второй набор параметров кодера NL в соответствии со второй оценкой сходства, чтобы улучшить соответствие между выходными данными декодера и целевыми выходными данными, представляющими соответствующие переводы на искусственный язык входных данных, полученных кодером NL.adjusting the second set of NL encoder parameters in accordance with the second similarity score to improve the match between the decoder output and the target output representing respective artificial language translations of the input received by the NL encoder. 2. Способ по п. 1, в котором искусственный язык содержит элемент, выбранный из группы, включающей в себя язык запросов к базе данных, язык программирования и язык разметки.2. The method of claim 1, wherein the artificial language comprises an element selected from the group consisting of a database query language, a programming language, and a markup language. 3. Способ по п. 2, в котором искусственный язык представляет собой язык структурированных запросов (SQL).3. The method of claim 2, wherein the artificial language is Structured Query Language (SQL). 4. Способ по п. 1, дополнительно включающий определение второй оценки сходства в соответствии со степенью сходства между вторым выходным массивом и целевым массивом, содержащим представление целевого предложения AL.4. The method of claim 1, further comprising determining a second similarity score according to a degree of similarity between the second output array and a target array containing a representation of the target sentence AL. 5. Способ по п. 1, в котором определение второй оценки сходства включает использование по меньшей мере одного аппаратного процессора компьютерной системы для:5. The method of claim 1, wherein determining the second similarity score includes using at least one computer system hardware processor to: введения представления целевого предложения AL в кодер AL;introducing a target sentence representation AL into the AL encoder; определения третьего внутреннего массива, содержащего выходные данные кодера А в ответ на получение представления целевого предложения AL в качестве входных данных; иdetermining a third internal array containing the output of encoder A in response to receiving a representation of the target sentence AL as input; And определения второй оценки сходства в соответствии со степенью сходства между вторым и третьим внутренними массивами.determining a second similarity score according to the degree of similarity between the second and third internal arrays. 6. Способ по п. 1, в котором дополнительно, в ответ на определение, удовлетворяется ли условие завершения обучения на первом этапе, если условие завершения обучения на первом этапе не удовлетворено, используют по меньшей мере один аппаратный процессор компьютерной системы для:6. The method of claim 1, further comprising, in response to determining whether the first stage training completion condition is satisfied, if the first stage training completion condition is not satisfied, using at least one hardware processor of the computer system to: предоставления кодеру AL третьего входного массива, причем третий входной массив содержит представление третьего предложения AL, сформулированного на искусственном языке;providing the encoder AL with a third input array, the third input array containing a representation of the third sentence AL formulated in an artificial language; определения третьего выходного массива, содержащего выходные данные декодера в ответ на прием кодером AL третьего входного массива, причем третий выходной массив содержит представление третьего выходного предложения AL;determining a third output array containing the output of the decoder in response to the encoder AL receiving the third input array, the third output array containing a representation of the third output sentence AL; определения третьей оценки сходства, указывающей степень сходства между третьим входным предложением AL и третьим выходным предложением AL;determining a third similarity score indicating a degree of similarity between the third input sentence AL and the third output sentence AL; регулирования первого набора параметров декодера в соответствии с третьей оценкой сходства, чтобы улучшить соответствие между входными данными кодера AL и выходными данными декодера.adjusting the first set of decoder parameters according to the third similarity score to improve the match between the encoder input AL and the decoder output. 7. Способ по п. 1, в котором дополнительно, в ответ на регулирование второго набора параметров кодера NL, используют по меньшей мере один аппаратный процессор компьютерной системы для:7. The method of claim 1, further comprising, in response to adjusting the second set of NL encoder parameters, at least one computer system hardware processor is used to: исполнения другого кодера NL, конфигурированного для приема третьего входного массива, содержащего представление другого предложения NL, и, в ответ, для вывода третьего внутреннего массива в декодер, при этом другое предложение NL сформулировано на другом естественном языке, отличном от естественного языка;executing another NL encoder configured to receive a third input array containing a representation of another NL sentence and, in response, to output a third internal array to the decoder, the other NL sentence being formulated in a different natural language than natural language; определения третьего выходного массива, созданного декодером в ответ на прием третьего внутреннего массива, причем третий выходной массив содержит представление третьего выходного предложения AL;determining a third output array generated by the decoder in response to receiving the third internal array, the third output array containing a representation of the third output sentence AL; определения третьей оценки сходства, указывающей степень сходства между третьим выходным предложением AL и третьим целевым предложением AL, содержащим перевод другого предложения NL на искусственный язык; иdetermining a third similarity score indicating a degree of similarity between the third output sentence AL and the third target sentence AL containing the artificial language translation of another sentence NL; And регулирования третьего набора параметров другого кодера NL в соответствии с третьей оценкой сходства, чтобы улучшить соответствие между выходными данными декодера и другим набором целевых выходных данных, представляющих соответствующие переводы на искусственный язык входных данных, принятых другим декодером NL.adjusting the third set of parameters of the other NL encoder according to the third similarity score to improve the match between the output of the decoder and the other set of target outputs representing respective artificial language translations of the inputs received by the other NL decoder. 8. Способ по п. 1, в котором кодер NL содержит рекуррентную нейронную сеть.8. The method of claim 1, wherein the NL encoder comprises a recurrent neural network. 9. Компьютерная система для автоматического перевода с естественного языка на искусственный машиночитаемый язык, содержащая по меньшей мере один аппаратный процессор и память, причем по меньшей мере один аппаратный процессор конфигурирован, чтобы:9. A computer system for automatic translation from a natural language into an artificial machine-readable language, comprising at least one hardware processor and memory, the at least one hardware processor being configured to: выполнять первый этап, включающий:carry out the first stage, including: исполнение кодера AL и декодера, связанного с кодером AL, причем кодер AL конфигурирован для приема первого входного массива, содержащего представление входного предложения AL, сформулированного на искусственном языке, и, в ответ, создания первого внутреннего массива, при этом декодер конфигурирован для приема первого внутреннего массива и, в ответ, создания первого выходного массива, содержащего представление первого выходного предложения AL, сформулированного на искусственном языке;executing an AL encoder and a decoder associated with the AL encoder, wherein the AL encoder is configured to receive a first input array containing a representation of an artificial language input sentence AL and, in response, create a first internal array, wherein the decoder is configured to receive a first internal an array and, in response, creating a first output array containing a representation of the first output sentence AL formulated in an artificial language; в ответ на предоставление первого входного массива кодеру AL, определение первой оценки сходства, указывающей степень сходства между входным предложением AL и первым выходным предложением AL;in response to providing the first input array to the encoder AL, determining a first similarity score indicating a degree of similarity between the input sentence AL and the first output sentence AL; регулирование первого набора параметров декодера в соответствии с первой оценкой сходства, чтобы улучшить соответствие между входными данными кодера AL и выходными данными декодера; определение, удовлетворяется ли условие завершения обучения первого этапа;adjusting the first set of decoder parameters in accordance with the first similarity score to improve the match between encoder input AL and decoder output; determining whether the first stage training termination condition is satisfied; в ответ на определение, удовлетворяется ли условие завершения обучения первого этапа, если условие завершения обучения первого этапа удовлетворено, выполнять второй этап, включающий:in response to determining whether the learning completion condition of the first stage is satisfied, if the learning completion condition of the first stage is satisfied, perform the second stage, including: исполнение кодера NL, конфигурированного для приема второго входного массива, содержащего представление входного предложения NL, сформулированного на естественном языке, и, в ответ, выведения второго внутреннего массива в декодер;executing an NL encoder configured to receive a second input array containing a representation of the NL input sentence formulated in natural language and, in response, output a second internal array to the decoder; определение второго выходного массива, созданного декодером в ответ на прием второго внутреннего массива, причем второй выходной массив содержит представление второго выходного предложения AL, сформулированного на искусственном языке;determining a second output array generated by the decoder in response to receiving the second internal array, the second output array containing a representation of the second output sentence AL formulated in an artificial language; определение второй оценки сходства, указывающей степень сходства между вторым выходным предложением AL и целевым предложением AL, содержащим перевод входного предложения NL на искусственный язык; иdetermining a second similarity score indicating a degree of similarity between the second output sentence AL and the target sentence AL containing the artificial language translation of the input sentence NL; And регулирование второго набора параметров кодера NL в соответствии со второй оценкой сходства, чтобы улучшить соответствие между выходными данными декодера и целевыми выходными данными, представляющими соответствующие переводы на искусственный язык входных данных, полученных кодером NL.adjusting the second set of NL encoder parameters according to the second similarity score to improve the match between the decoder output and a target output representing respective artificial language translations of the input received by the NL encoder. 10. Компьютерная система по п. 9, причем искусственный язык содержит элемент, выбранный из группы, включающей в себя язык запросов к базе данных, язык программирования и язык разметки.10. The computer system of claim 9, wherein the artificial language comprises an element selected from the group consisting of a database query language, a programming language, and a markup language. 11. Компьютерная система по п. 10, причем искусственный язык является языком структурированных запросов (SQL).11. The computer system of claim 10, wherein the artificial language is Structured Query Language (SQL). 12. Компьютерная система по п. 9, причем по меньшей мере один аппаратный процессор дополнительно конфигурирован для определения второй оценки сходства в соответствии со степенью сходства между вторым выходным массивом и целевым массивом, содержащим представление целевого предложения AL.12. The computer system of claim 9, wherein the at least one hardware processor is further configured to determine a second similarity score in accordance with a degree of similarity between the second output array and the target array containing the representation of the target sentence AL. 13. Компьютерная система по п. 9, причем определение второй оценки сходства включает использование по меньшей мере одного аппаратного процессора компьютерной системы для:13. The computer system of claim 9, wherein determining the second similarity score includes using at least one hardware processor of the computer system to: введения представления целевого предложения AL в кодер AL;introducing a target sentence representation AL into the AL encoder; определения третьего внутреннего массива, содержащего выходные данные кодера AL в ответ на получение представления целевого предложения AL в качестве входных данных; иdetermining a third internal array containing the output of the AL encoder in response to receiving a target AL sentence representation as input; And определения второй оценки сходства в соответствии со степенью сходства между вторым и третьим внутренними массивами.determining a second similarity score according to the degree of similarity between the second and third internal arrays. 14. Компьютерная система по п. 9, причем по меньшей мере один аппаратный процессор дополнительно конфигурирован, в ответ на определение, удовлетворяется ли первое условие завершения, если первое условие завершения не удовлетворено, для:14. The computer system of claim 9, wherein the at least one hardware processor is further configured, responsive to determining whether the first termination condition is satisfied, if the first termination condition is not satisfied, to: предоставления третьего входного массива кодеру AL, причем третий входной массив содержит представление третьего предложения AL, сформулированного на искусственном языке;providing a third input array to the AL encoder, the third input array containing a representation of the third sentence AL formulated in an artificial language; определения третьего выходного массива, содержащего выходные данные декодера в ответ на прием кодером AL третьего входного массива, причем третий выходной массив содержит представление третьего выходного предложения AL;determining a third output array containing the output of the decoder in response to the encoder AL receiving the third input array, the third output array containing a representation of the third output sentence AL; определения третьей оценки сходства, указывающей степень сходства между третьим входным предложением AL и третьим выходным предложением AL;determining a third similarity score indicating a degree of similarity between the third input sentence AL and the third output sentence AL; регулирования первого набора параметров декодера в соответствии с третьей оценкой сходства, чтобы улучшить соответствие между входными данными кодера AL и выходными данными декодера.adjusting the first set of decoder parameters according to the third similarity score to improve the match between the encoder input AL and the decoder output. 15. Компьютерная система по п. 9, причем по меньшей мере один аппаратный процессор дополнительно конфигурирован, в ответ на регулирование второго набора параметров кодера NL, для:15. The computer system of claim 9, wherein the at least one hardware processor is further configured, responsive to adjusting the second set of NL encoder parameters, to: исполнения другого кодера NL, конфигурированного для приема третьего входного массива и, в ответ, выведения третьего внутреннего массива в декодер, при этом другое предложение NL сформулировано на другом естественном языке, отличном от естественного языка;executing another NL encoder configured to receive a third input array and, in response, output a third internal array to the decoder, the other NL sentence being formulated in a different natural language than natural language; определения третьего выходного массива, созданного декодером в ответ на прием третьего внутреннего массива, причем третий выходной массив содержит представление третьего выходного предложения AL;determining a third output array generated by the decoder in response to receiving the third internal array, the third output array containing a representation of the third output sentence AL; определения третьей оценки сходства, указывающей степень сходства между третьим выходным предложением AL и третьим целевым предложением AL, содержащим перевод другого предложения NL на искусственный язык;determining a third similarity score indicating a degree of similarity between the third output sentence AL and the third target sentence AL containing the artificial language translation of another sentence NL; и регулирования третьего набора параметров другого кодера NL в соответствии с третьей оценкой сходства, чтобы улучшить соответствие между выходными данными декодера и другим набором целевых выходных данных, представляющих соответствующие переводы на искусственный язык входных данных, принятых другим декодером NL.and adjusting the third set of parameters of the other NL encoder according to the third similarity score to improve the match between the decoder output and the other set of target outputs representing respective artificial language translations of the inputs received by the other NL decoder. 16. Компьютерная система по п. 9, в которой кодер NL содержит рекуррентную нейронную сеть.16. The computer system of claim 9, wherein the NL encoder comprises a recurrent neural network. 17. Невременный машиночитаемый носитель, хранящий инструкции, которые при исполнении первым аппаратным процессором первой компьютерной системы побуждают первую компьютерную систему формировать модуль обученного переводчика, содержащий кодер NL и декодер, соединенный с кодером NL, при этом обучение модуля переводчика включает использование второго аппаратного процессора второй компьютерной системы, чтобы:17. A non-transitory computer-readable medium storing instructions that, when executed by a first hardware processor of a first computer system, cause the first computer system to generate a trained interpreter module comprising an NL encoder and a decoder coupled to the NL encoder, wherein learning the interpreter module includes using a second hardware processor of the second computer system. systems to: выполнять первый этап, включающий:carry out the first stage, including: соединение декодера с кодером AL, конфигурированным для приема первого входного массива, содержащего представление входного предложения AL, сформулированного на искусственном языке, и, в ответ, создания первого внутреннего массива, причем кодер AL соединен с декодером так, чтобы декодер принимал первый внутренний массив и, в ответ, создавал первый выходной массив, содержащий представление первого выходного предложения AL, сформулированного на искусственном языке;connecting a decoder to an AL encoder configured to receive a first input array containing an artificial language representation of an input sentence AL and, in response, create a first internal array, the AL encoder being connected to the decoder such that the decoder receives the first internal array and, in response, create a first output array containing a representation of the first output sentence AL formulated in an artificial language; в ответ на предоставление первого входного массива кодеру AL, определение первой оценки сходства, указывающей степень сходства между входным предложением AL и первым выходным предложением AL;in response to providing the first input array to the AL encoder, determining a first similarity score indicating a degree of similarity between the input AL sentence and the first output AL sentence; регулирование первого набора параметров декодера в соответствии с первой оценкой сходства, чтобы улучшить соответствие между входными данными кодера AL и выходными данными декодера;adjusting the first set of decoder parameters in accordance with the first similarity score to improve the match between encoder input AL and decoder output; определение, удовлетворяется ли условие завершения обучения первого этапа;determining whether the first stage training termination condition is satisfied; в ответ на определение, удовлетворяется ли условие завершения обучения первого этапа, если условие завершения обучения первого этапа удовлетворено, выполнять второй этап, включающий:in response to determining whether the learning completion condition of the first stage is satisfied, if the learning completion condition of the first stage is satisfied, perform the second stage, including: соединение кодера NL с декодером так, что кодер NL принимает второй входной массив, содержащий представление входного предложения NL, сформулированного на естественном языке, и, в ответ, выводит второй внутренний массив в декодер;connecting the NL encoder to the decoder, such that the NL encoder receives a second input array containing a natural language representation of the NL input sentence and outputs the second internal array to the decoder in response; определение второго выходного массива, созданного декодером в ответ на прием второго внутреннего массива, причем второй выходной массив содержит представление второго выходного предложения AL, сформулированного на искусственном языке;determining a second output array generated by the decoder in response to receiving the second internal array, the second output array containing a representation of the second output sentence AL formulated in an artificial language; определение второй оценки сходства, указывающей степень сходства между вторым выходным предложением AL и целевым предложением AL, содержащим перевод входного предложения NL на искусственный язык; иdetermining a second similarity score indicating a degree of similarity between the second output sentence AL and the target sentence AL containing the artificial language translation of the input sentence NL; And регулирование второго набора параметров кодера NL в соответствии со второй оценкой сходства, чтобы улучшить соответствие между выходными данными декодера и целевыми выходными данными, представляющими соответствующие переводы на искусственный язык входных данных, полученных кодером NL.adjusting the second set of NL encoder parameters according to the second similarity score to improve the match between the decoder output and the target output representing respective artificial language translations of the input received by the NL encoder. 18. Компьютерная система для автоматического перевода с естественного языка на искусственный машиночитаемый язык, содержащая первый аппаратный процессор, конфигурированный для исполнения обученного модуля переводчика, содержащего кодер NL и декодер, соединенный с кодером NL, при этом обучение модуля переводчика включает использование второго аппаратного процессора второй компьютерной системы, чтобы:18. A computer system for automatic translation from a natural language into an artificial machine-readable language, comprising a first hardware processor configured to execute a trained translator module containing an NL encoder and a decoder connected to the NL encoder, wherein the training of the translator module includes the use of a second hardware processor of the second computer systems to: выполнять первый этап, включающий:carry out the first stage, including: соединение декодера с кодером AL, конфигурированным для приема первого входного массива, содержащего представление входного предложения AL, сформулированного на искусственном языке, и, в ответ, создания первого внутреннего массива, причем кодер AL соединен с декодером так, что декодер принимает первый внутренний массив и, в ответ, создает первый выходной массив, содержащий представление первого выходного предложения AL, сформулированного на искусственном языке;connecting a decoder to an AL encoder configured to receive a first input array containing an artificial language representation of an input sentence AL and, in response, create a first internal array, the AL encoder being connected to the decoder such that the decoder receives the first internal array and, in response, creates a first output array containing a representation of the first output sentence AL, formulated in an artificial language; в ответ на предоставление первого входного массива кодеру AL, определение первой оценки сходства, указывающей степень сходства между входным предложением AL и первым выходным предложением AL;in response to providing the first input array to the AL encoder, determining a first similarity score indicating a degree of similarity between the input AL sentence and the first output AL sentence; регулирование первого набора параметров декодера в соответствии с первой оценкой сходства, чтобы улучшить соответствие между входными данными кодера AL и выходными данными декодера; определение, удовлетворяется ли условие завершения обучения первого этапа;adjusting the first set of decoder parameters in accordance with the first similarity score to improve the match between encoder input AL and decoder output; determining whether the first stage training termination condition is satisfied; в ответ на определение, удовлетворяется ли условие завершения обучения первого этапа, если условие завершения обучения первого этапа удовлетворено, выполнять второй этап, включающий:in response to determining whether the learning completion condition of the first stage is satisfied, if the learning completion condition of the first stage is satisfied, perform the second stage, including: соединение кодера NL с декодером так, что кодер принимает второй входной массив, содержащий представление входного предложения NL, сформулированного на естественном языке, и, в ответ, выводит второй внутренний массив в декодер;connecting the NL encoder to the decoder, such that the encoder receives a second input array containing a natural language representation of the NL input sentence and outputs the second internal array to the decoder in response; определение второго выходного массива, созданного декодером в ответ на прием второго внутреннего массива, причем второй выходной массив содержит представление второго выходного предложения AL, сформулированного на искусственном языке;determining a second output array generated by the decoder in response to receiving the second internal array, the second output array containing a representation of the second output sentence AL formulated in an artificial language; определение второй оценки сходства, указывающей степень сходства между вторым выходным предложением AL и целевым предложением AL, содержащим перевод входного предложения NL на искусственный язык; иdetermining a second similarity score indicating a degree of similarity between the second output sentence AL and the target sentence AL containing the artificial language translation of the input sentence NL; And регулирование второго набора параметров кодера NL в соответствии со второй оценкой сходства, чтобы улучшить соответствие между выходными данными декодера и целевыми выходными данными, представляющими соответствующие переводы на искусственный язык входных данных, полученных кодером NL.adjusting the second set of NL encoder parameters according to the second similarity score to improve the match between the decoder output and the target output representing respective artificial language translations of the input received by the NL encoder.
RU2021100172A 2018-06-27 2019-06-25 Systems and methods for translating natural language sentences into database queries RU2792579C2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US16/020,910 2018-06-27

Publications (2)

Publication Number Publication Date
RU2021100172A RU2021100172A (en) 2022-07-27
RU2792579C2 true RU2792579C2 (en) 2023-03-22

Family

ID=

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6665640B1 (en) * 1999-11-12 2003-12-16 Phoenix Solutions, Inc. Interactive speech based learning/training system formulating search queries based on natural language parsing of recognized user queries
US7310642B2 (en) * 2000-05-03 2007-12-18 Microsoft Corporation Methods, apparatus and data structures for facilitating a natural language interface to stored information
US20090112835A1 (en) * 2007-10-24 2009-04-30 Marvin Elder Natural language database querying
US20100005081A1 (en) * 1999-11-12 2010-01-07 Bennett Ian M Systems for natural language processing of sentence based queries
RU2393533C2 (en) * 2004-04-15 2010-06-27 Майкрософт Корпорейшн Offering allied terms for multisemantic inquiry
US8725493B2 (en) * 2004-01-06 2014-05-13 Neuric Llc Natural language parsing method to provide conceptual flow
US20160196335A1 (en) * 2012-12-31 2016-07-07 Facebook, Inc. Natural-Language Rendering of Structured Search Queries
US20170262514A1 (en) * 2012-12-31 2017-09-14 Facebook, Inc. Search Result Snippets for Structured Search Queries
RU2637992C1 (en) * 2016-08-25 2017-12-08 Общество с ограниченной ответственностью "Аби Продакшн" Method of extracting facts from texts on natural language

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6665640B1 (en) * 1999-11-12 2003-12-16 Phoenix Solutions, Inc. Interactive speech based learning/training system formulating search queries based on natural language parsing of recognized user queries
US20100005081A1 (en) * 1999-11-12 2010-01-07 Bennett Ian M Systems for natural language processing of sentence based queries
US7310642B2 (en) * 2000-05-03 2007-12-18 Microsoft Corporation Methods, apparatus and data structures for facilitating a natural language interface to stored information
US8725493B2 (en) * 2004-01-06 2014-05-13 Neuric Llc Natural language parsing method to provide conceptual flow
RU2393533C2 (en) * 2004-04-15 2010-06-27 Майкрософт Корпорейшн Offering allied terms for multisemantic inquiry
US20090112835A1 (en) * 2007-10-24 2009-04-30 Marvin Elder Natural language database querying
US20160196335A1 (en) * 2012-12-31 2016-07-07 Facebook, Inc. Natural-Language Rendering of Structured Search Queries
US20170262514A1 (en) * 2012-12-31 2017-09-14 Facebook, Inc. Search Result Snippets for Structured Search Queries
RU2637992C1 (en) * 2016-08-25 2017-12-08 Общество с ограниченной ответственностью "Аби Продакшн" Method of extracting facts from texts on natural language

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Srinivasan Iyer и др., "Learning a Neural Semantic Parser from User Feedback", 27.04.2017, URL: https://arxiv.org/pdf/1704.08760. Maxim Rabinovich и др., "Abstract Syntax Networks for Code Generation and Semantic Parsing", 25.04.2017, URL: https://arxiv.org/pdf/1704.07535. *

Similar Documents

Publication Publication Date Title
US11194799B2 (en) Systems and methods for translating natural language sentences into database queries
US20190163691A1 (en) Intent Based Dynamic Generation of Personalized Content from Dynamic Sources
US20200233927A1 (en) Context-based translation retrieval via multilingual space
EP4295245A1 (en) Methods and systems for controlled modeling and optimization of a natural language database interface
US12455911B2 (en) Cross-lingual meta-transfer learning adaptation to natural language understanding
US20220245353A1 (en) System and method for entity labeling in a natural language understanding (nlu) framework
US12175193B2 (en) System and method for lookup source segmentation scoring in a natural language understanding (NLU) framework
US12197869B2 (en) Concept system for a natural language understanding (NLU) framework
CN110263177A (en) Knowledge graph construction method and event prediction method for event prediction
US12499313B2 (en) Ensemble scoring system for a natural language understanding (NLU) framework
US12511491B2 (en) System and method for managing and optimizing lookup source templates in a natural language understanding (NLU) framework
WO2023098971A1 (en) Method and apparatus for self-supervised extractive question answering
US20220147719A1 (en) Dialogue management
WO2025097982A1 (en) Training method for text processing model, training apparatus for text processing model, electronic device, program product, and storage medium
US20240176962A1 (en) CROSS-LINGUAL NATURAL LANGUAGE UNDERSTANDING MODEL FOR MULTI-LANGUAGE NATURAL LANGUAGE UNDERSTANDING (mNLU)
US12299391B2 (en) System and method for repository-aware natural language understanding (NLU) using a lookup source framework
US20220229986A1 (en) System and method for compiling and using taxonomy lookup sources in a natural language understanding (nlu) framework
US12265796B2 (en) Lookup source framework for a natural language understanding (NLU) framework
RU2792579C2 (en) Systems and methods for translating natural language sentences into database queries
Ahkouk et al. A review of the text to SQL frameworks
HK40038098A (en) Systems and methods for translating natural language sentences into database queries
HK40038098B (en) Systems and methods for translating natural language sentences into database queries
CN113408293B (en) Semantic matching method, device, electronic device and storage medium
HK40094511A (en) Code processing model training method, device, electronic equipment and storage medium
HK40094511B (en) Code processing model training method, device, electronic equipment and storage medium