WO2023211305A1 - Method and system for generating text for a digital assistant - Google Patents

Method and system for generating text for a digital assistant Download PDF

Info

Publication number
WO2023211305A1
WO2023211305A1 PCT/RU2022/000147 RU2022000147W WO2023211305A1 WO 2023211305 A1 WO2023211305 A1 WO 2023211305A1 RU 2022000147 W RU2022000147 W RU 2022000147W WO 2023211305 A1 WO2023211305 A1 WO 2023211305A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
stylized
texts
array
digital assistant
Prior art date
Application number
PCT/RU2022/000147
Other languages
French (fr)
Russian (ru)
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 Публичное Акционерное Общество "Сбербанк России"
Priority claimed from RU2022111787A external-priority patent/RU2796208C1/en
Publication of WO2023211305A1 publication Critical patent/WO2023211305A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data

Definitions

  • the claimed technical solution generally relates to the field of computer technology, and in particular to a method and system for generating text for a digital assistant in dialogue systems.
  • the claimed technical solution proposes a new approach to generating text for a digital assistant in dialogue systems.
  • This solution uses a machine learning algorithm that allows the generation of stylized text for the digital assistant from the source text with high accuracy, ensuring the semantic proximity of the source and stylized text and excluding the distortion of the stylized text by new facts.
  • filtering an array of stylized texts is performed using regular expressions and a morphological analyzer.
  • filtering an array of stylized texts is performed based on the match of proper names in the source text and each stylized text from the array.
  • the matching of proper names is determined using the number of immutable named entities contained in the source text and the stylized text.
  • the number of immutable named entities is determined based on the recognition of named entities in the source text and each stylized text from the array.
  • the method further comprises the step of checking for the presence of text stylization.
  • the presence of text stylization is checked based on determining whether the target style indicators have been replaced.
  • an automatic text generation system for a digital assistant in dialogue systems comprising: at least one processor; • at least one memory coupled to the processor that contains computer-readable instructions that, when executed by the at least one processor, provide a method for generating text for digital assistants in conversational systems.
  • FIG. 1 illustrates a general block diagram of the proposed system.
  • FIG. 2 illustrates a block diagram of the claimed method.
  • FIG. 3 illustrates an example of a general view of a computing device that provides implementation of the claimed solution.
  • a model in machine learning is a set of artificial intelligence methods, the characteristic feature of which is not the direct solution of a problem, but learning in the process of applying solutions to many similar problems.
  • Named-entity recognition is an information extraction subtask that aims to find and classify mentions of named entities in unstructured text into predefined categories such as proper names, character names, organizations, locations, monetary values, percentages, etc.
  • Word embeddings are a general name for various approaches to language modeling and representation learning in natural language processing that aim to map words (and possibly phrases) from some dictionary of vectors from an n-dimensional real space R_n.
  • Tokenization is the process of breaking text into text units or tokens (most often these units are words, but they can also be letters, parts of a sentence, combinations of words, etc.).
  • a language model is a probability distribution on a set of vocabulary sequences.
  • the term “language model” is used to describe neural network language models that are designed to model a language by estimating the probability of a particular sequence of characters.
  • the claimed technical solution offers a new approach that improves the semantic accuracy of stylized text generation, which consists in ensuring the preservation of semantic content in the stylized text, as well as eliminating the addition of stylized text with new facts and logical units of language.
  • One of the features of the claimed technical solution is the ability to generate multiple stylized texts from a single source text, which also ensures automation of the process of generating stylized texts and significantly reduces the time of text stylization compared to manual generation of each individual stylized text.
  • the claimed technical solution can be implemented on a computer, in the form of an automated information system (AIS) or a machine-readable medium containing instructions for performing the above method.
  • AIS automated information system
  • the technical solution may also be implemented as a distributed computer system or computing device.
  • a system means a computer system, computer (electronic computer), CNC (computer numerical control), PLC (programmable logic controller), computerized control systems and any other devices capable of performing a given, clearly defined sequence of computing operations (actions, instructions).
  • a command processing device means an electronic unit or an integrated circuit (microprocessor) that executes machine instructions (programs)/
  • An instruction processing device reads and executes machine instructions (programs) from one or more data storage devices, such as devices such as random access memory (RAM) and/or read only memory (ROM). They can act as ROM, but not limited to hard drives (HDD), flash memory, solid state drives (SSD), optical storage media (CD, DVD, BD, MD, etc.), etc.
  • RAM random access memory
  • ROM read only memory
  • Program - a sequence of instructions intended for execution by a computer control device or command processing device.
  • instructions may refer generally to software instructions or software commands that are written in a given programming language to perform a specific function, such as, for example, text encoding and decoding, filtering, ranking , translation of texts into a dialogue system, etc.
  • Instructions can be implemented in a variety of ways, including, for example, object-oriented methods. For example, instructions can be implemented using the Python programming language, C++, Java, Python, various libraries (for example, MFC; Microsoft Foundation Classes), etc. Instructions that implement the processes described in this solution can be transmitted either over the wire, and via wireless data transmission channels, such as Wi-Fi, Bluetooth, USB, WLAN, LAN, etc.
  • FIG. 1 shows a general view of a text generation system 100 for a digital assistant in dialog systems.
  • the system 100 includes basic functional elements, such as: an encoding/decoding module 101, a style transfer module 102, a stylized text filtering module 103, a stylized text ranking module 104.
  • the elements of the system 100 are disclosed in more detail in FIG. 3.
  • the dialogue system can be system 120 and represent various solutions, for example, voice assistants, chat bots, robotic call centers, and other technologies that implement an automated process of communication with a user, such as user 110. It is worth noting that in this solution, dialogue systems should be understood as any automated human-machine system operating in dialogue mode, in which it responds to every user command and turns to him for information as needed.
  • Digital assistants can be systems for automating user interaction, implemented on the basis of artificial intelligence in a dialog format (chatbot, skills for voice assistant, etc.).
  • the digital assistant may be a computer system that simulates a conversation with users in a conversational format.
  • Text stylization in this solution refers to the generation of text by transforming the received source text into text that has stylistic speech features.
  • stylistic features can be the emotional color of the text (cheerful, sad, etc.).
  • stylistic speech features may be the conditions and goals of communication in some area of public activity, for example, official business activity, journalistic activity, conversational, artistic, etc. It is worth noting that stylization of the text can also be the giving of characteristic features to the text inherent in the characteristics of communication of individual individuals, characters, literary heroes, etc., without limitation.
  • text stylization may be the transformation of the original text into a stylized one, in accordance with the specified communication style of a particular digital assistant, which has conversational style features, for example, the use of certain pronouns emphasizing the informal/formal style of communication (“You” and “You”), gender, number, etc.
  • the encoding/decoding module 101 may be implemented on at least one computing device equipped with appropriate software and include a set of models for tokenizing and detokenizing text, vectorizing tokenized text, and converting tokens to text, such as one or more models machine learning for converting text information into vector form, for example, BERT, ELMo, ULMFit, XLNet, RoBerta, RuGPT3 and others.
  • module 101 may be implemented on system 300, which is described in more detail in FIG. 3. It is worth noting that the specific method of tokenization and vectorization depends on the selected language model on the basis of which module 102 is implemented.
  • tokenization is carried out using the BPE (Byte Pair Encoding) method, and subsequent vectorization is carried out by replacing each token with its index in the language model dictionary compiled at the stage of initial model training.
  • word tokenization may be used as the tokenization method.
  • Module 102 can be implemented on the basis of at least one neural network, pre-trained on specific sets of stylized texts in accordance with specified styles.
  • a machine learning model that implements the function of generating stylized texts in accordance with a given style, for example, a generative language model such as RuGPT3, XLNet, etc. can be used.
  • the MO was the Russian-language generative language model RuGPT3 -Large.
  • the model was trained on sources from different domains: Wikipedia, books, news, Russian Common Crawl, etc.
  • the model was trained for 14 days on 128 GPUs with a context window of 1024 and an additional few days on 16 GPUs with a context window of 2048.
  • the final model has a perplexity of 13.8 on test data set.
  • the result of training the language model was the ability to predict the probability of the next token based on the previous initial text fragment. So, if during the training process the model often encountered a certain phrase in the training data, then when predicting the next token after the known one from the phrase, the model will with a high probability predict exactly the token from the phrase in the training data set.
  • a parafraser was applied to the stylized replicas, for example, a parafraser based on the RuT5 generative model.
  • the paraphraser model is known from the prior art and is disclosed, for example, in a source available via the Internet link: https://huggingface.co/cointegrated/rut5-base-paraphraser.
  • 10 initial versions of the paraphrase were generated, from which the 2 closest initial replicas were then selected based on a semantic metric, for example, the LabSe metric.
  • This metric evaluates the cosine similarity between the vector representations of sentences obtained using the model, which corresponds to semantic proximity.
  • the final datasets for additional training of RuGPT3 for the style transfer task contained 4348, 4872, 64484 pairs of sentences (“original replica” - “replica in the assistant’s style”).
  • a tag was also added to the data that characterizes a specific digital assistant with its corresponding speech style to make it possible to determine in what style the stylized text will be generated.
  • the model was additionally trained for 5 epochs.
  • the resulting model was evaluated on a test set separately for each assistant.
  • the test data set was 1097 replicas for each assistant from the assistant sets.
  • the following metrics were used to assess quality: 1) BLEU (Papineni, K.; Roukos, S.; Ward, T.; Zhu, WJ (2002).
  • BLEU a method for automatic evaluation of machine translation (PDF).
  • ACL- 2002 40th Annual meeting of the Association for Computational Linguistics, pp. 311-318. CiteSeerX 10.1.1.19.9416.).
  • the BLEU algorithm compares the double translation phrases with the phrases it finds in the reference variant and calculates the number of matches in a weighted manner. These matches are independent of position.
  • a higher degree of match indicates a higher degree of similarity to the reference translation and a higher score. Clarity and grammar are not taken into account. 2) The number of common N-Grams, where sequences of words of length from 3 to 8 were taken as N-Grams. 3) Levenshtein - Levenshtein distance (V.I. Levenshtein. Binary codes with correction of deletions, insertions and substitutions of symbols. Reports of the Academys of Sciences USSR, 1965. 163.4:845-848.) (editorial distance, editing distance). A specified metric that measures the absolute value of the difference between two sequences of characters. It is defined as the minimum number of single-character operations (namely insertion, deletion, replacement) required to transform one sequence of characters into another.
  • Jaccard index - Jaccard index (Jaccard R. Distribution de la flore alpine dans le Bassin des Dranses et dans fruit regions voisines 11 Bull. Soc. Vaudoise sci. Natur. 1901. V. 37. Bd. 140. S. 241 - 272.), which was calculated as the number of common tokens in the stylized replica and the original sentence divided by the combination of tokens in these two text fragments.
  • Module 103 may be implemented on at least one computing device and include a morphological parser, such as a Unigram parser, N-gram parser, regular expression parser, etc. Also, module 103 may contain a neural network trained to solve the NER (named entity recognition) problem, for example, Slovnet BERT NER, DeepPavlov BERT NER, etc., but not limited to. In one particular embodiment, module 103 may contain a heavy model with BERT architecture, and be trained on a small manually annotated dataset.
  • NER named entity recognition
  • the stylized text ranking module 104 may be implemented on at least one computing device equipped with appropriate distance calculation software Levenshtein.
  • the specified module 104 is configured to implement an algorithm for calculating pairwise distances between the source text and stylized texts.
  • modules described above are presented as separate devices, these modules can also be combined within a single device, such as system 300.
  • FIG. 2 is a block diagram of a method 200 for automatically generating text for a digital assistant in conversational systems, which is described step by step in more detail below.
  • Said method 200 consists of performing steps to process various digital data. Processing is typically performed by a system, such as system 100, which may also represent, for example, a server, computer, mobile device, computing device, etc.
  • the system 100 receives input data containing the natural language source text and the target speech style of the digital assistant.
  • input data may be received from the dialog system 120 over data links such as the Internet.
  • the source text received from the dialog system 120 may represent, for example, a dialog response such as an answer to a user question, a question to the user, etc.
  • the target style of the digital assistant's remarks may represent certain characteristic features of the speech style, for example, a conversational style of communication, which is characterized, for example, by the presence of informal addresses to the user, a business style of communication, which is characterized by formal addresses, etc.
  • the target style of remarks may indicate the emotional color of the text, for example, sad, happy, neutral, etc.
  • the target style of the digital assistant's remarks may be determined by the settings of the conversational system 120.
  • a conversational system such as system 120, may contain a set of digital assistants, each of which has a different communication style.
  • the user can select a specific assistant in the system settings.
  • the specified data about the selected assistant is also transmitted to the system 100.
  • the source text is encoded, and during encoding, at least tokenization of the text data is performed.
  • This step 220 may be performed by module 101.
  • the input text may be divided into tokens.
  • a token should be understood as a sequence of characters in a text that is meaningful for analysis.
  • text tokenization can be performed using the BPE (Byte Pair encoding) algorithm.
  • tokenization may involve breaking text into words based on the space between words. Next, a dictionary of tokens of a fixed size (for example, 30,000 tokens) is compiled, where each token is associated with its index in the dictionary.
  • step 230 vectorization of the tokenized texts is performed.
  • the tokenization method depends on the language model that is used in module 102 at step 240.
  • each token is associated with its index in the dictionary.
  • a tokenized text fragment (list of tokens) after vectorization is mapped into a vector of token data indices in the dictionary.
  • Method 100 then proceeds to step 240.
  • vector representations of source text tokens are processed using module 103, during which an array of vectorized stylized texts is generated.
  • a machine learning model based on a neural network was additionally trained on text replicas of digital assistants stylized in accordance with the specified target style.
  • the model input is a vector representation of the source text.
  • the model generates several variants of stylized texts (candidates) in the form of vector representations.
  • the specified vector representations are saved into an array of stylized texts. The number of candidates generated by the model depends on the sampling methods used.
  • the specified sampling methods are disclosed in more detail in the source, found on the Internet at the link: https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277
  • the general principle of the model is the ability to predict the probability of the next token in a certain context.
  • the language model is able to predict the probability of the next token based on the previous initial text fragment.
  • the specified model To realize the possibility of generating stylized texts by the specified model, its weights are then changed so that the probabilities for the next token that the model predicts correspond to the current task of text stylization.
  • the specified change in weights is carried out on the basis of the training data set.
  • the additionally trained model is then able to generate from the source text a set of stylized texts with different degrees of probability of tokens in this text. Since the generated set of stylized texts can be very large, and the probability distribution in some of them will be too small, such candidates (generated stylized texts) can be cut off based on the sampling criteria specified above. As a result, an array of stylized texts is formed at the output of the model.
  • each vectorized stylized text from the array is decoded, and during decoding, at least the vectorized stylized text is converted into tokens and detokenized.
  • each vector of a fixed length, based on its dimension is mapped to a token by a dictionary index, which allows each vector to be represented as a token.
  • the process of detokenization is the reverse process of tokenization and consists of combining tokens into text.
  • the array of vectorized stylized texts is converted into an array of stylized natural language texts.
  • the array of stylized texts is filtered.
  • module 103 filters said array.
  • those candidates who do not satisfy the specified characteristic style features are excluded.
  • the candidate “This is what I found based on your application” is excluded. This filtering also improves the accuracy of text styling.
  • filtering of an array of stylized text is performed based on matches of named entities (eg, proper names) in the source text and each stylized text in the array.
  • a named entity recognition algorithm is executed, for example, using module 103, and the number of unchanged named entities contained in the source text and the stylized text is compared.
  • an array of stylized texts is generated.
  • the stylized text should not distort facts and should not be supplemented with new logical connections.
  • the specified array of stylized texts may contain relevant stylized texts that satisfy the characteristic stylistic features, however, such texts will be incorrect, for example, due to changes in the facts of such text.
  • the generated text satisfies the stylistic features of the official style (appeal to “You”), i.e. is relevant, however, it changes the facts of the text (the name of the author of the work).
  • step 260 the array of stylized texts is filtered.
  • the filtered stylized texts are ranked and the best stylized text is selected, the selection of the best text being based on the pairwise distance between the original text and each of the possible stylized texts.
  • the set of filtered stylized texts is ranked by character-by-character proximity to the original text. This ranking is done based on the Levenshtein distance. To do this, pairwise distances between the original neutral phrase and each of the possible candidates are calculated. The candidate whose Levenshtein distance is minimal is selected as the best one. Levenshtein distance is calculated using the distance function from the Levenshtein library. As a result, we get a stylized replica of the digital assistant, with the least change source text fragment, which accordingly increases the accuracy of the entire stylization algorithm and reduces the likelihood of adding new facts.
  • the text obtained as a result of ranking can be additionally checked for stylization.
  • Checking for text stylization is carried out by determining whether the target style indicators have been replaced.
  • system 100 may further include a styling checker implemented on the computing device.
  • the specified module is made with the ability to check for a pair (original replica, stylized replica) whether during stylization the replacement of target style indicators occurs, for example, gender/number or number in circulation You/You compared to the original phrase (there are many neutral phrases for which no replacement required). This module is designed to be replaced only if at least one change occurs. Thus, if a replacement occurs, then at the output we get a stylized replica, and if there is no replacement, then the original one, which is neutral and suitable for any style.
  • the stylized text is transmitted to the dialog system.
  • the stylized replica of the digital assistant may be stored in system memory as a file and sent to the dialog system via, for example, a data link for subsequent display to the user, for example, using the I/O interface of the dialog system 120.
  • One possible use of the system is to style an initially neutral response to match the style of a given assistant.
  • conversational systems can contain a set of digital assistants, each of which has its own communication style.
  • the dialogue system When a user requests, the dialogue system generates an initially neutral response (source text).
  • the specified method 200 provides the ability to generate from a specified neutral response, for example, a response from a digital assistant, a stylized response (stylized text) in accordance with a specified style of the digital assistant. This eliminates the need to generate multiple stylized replicas for each digital assistant.
  • another advantage of this approach is flexibility in choosing a style; generating a text response is a computationally complex operation, and it is necessary to train a large model for it.
  • the stated solution allows you to stylize the generated initial response using the 100 system for different styles.
  • FIG. 3 shows an example of a general view of a computer system (300), which provides the implementation of the claimed method or is part of a computer system, for example, modules 101-103, a server, a personal computer, part of a computing cluster that processes the necessary data to implement the claimed technical solution.
  • a computer system 300
  • modules 101-103 a server
  • a personal computer part of a computing cluster that processes the necessary data to implement the claimed technical solution.
  • the system (300) includes components such as: one or more processors (301), at least one memory (302), data storage means (303), input/output interfaces (304), means B /B (305), a means of network interaction (306), which are combined via a universal bus.
  • the processor (301) performs the basic computational operations necessary to process data when executing the method (200).
  • the processor (301) executes the necessary machine-readable instructions contained in the RAM (302).
  • the memory (302) is typically in the form of RAM and contains the necessary software logic to provide the required functionality.
  • the data storage medium (303) can be in the form of HDD, SSD drives, raid array, flash memory, optical storage devices (CD, DVD, MD, Blue-Ray disks), etc.
  • the means (303) allow carry out long-term storing various types of information, such as generated stylized replicas, user IDs, digital assistant IDs, etc.
  • I/O interfaces To organize the operation of system components (300) and organize the operation of external connected devices, various types of I/O interfaces (304) are used. The choice of appropriate interfaces depends on the specific design of the computing device, which can be, but is not limited to: PCI, AGP, PS/2, IrDa, FireWire, LPT, COM, SATA, IDE, Lightning, USB (2.0, 3.0, 3.1, micro, mini, type C), TRS/Audio jack (2.5, 3.5, 6.35), HDMI, DVI, VGA, Display Port, RJ45, RS232, etc.
  • interfaces (304) depends on the specific design of the system (300), which can be implemented on the basis of a wide class of devices, for example, a personal computer, mainframe, laptop, server cluster, thin client, smartphone, server, etc.
  • I/O data (305): keyboard, joystick, display (touch display), monitor, touch display, touchpad, mouse, light pen, stylus, touchpad, trackball, speakers, microphone, augmented reality tools, optical sensors, tablet, light indicators, projector, camera, biometric identification tools (retina scanner, fingerprint scanner, voice recognition module), etc.
  • Network interaction means (306) are selected from devices that provide network reception and transmission of data, for example, an Ethernet card, WLAN/Wi-Fi module, Bluetooth module, BLE module, NFC module, IrDa, RFID module, GSM modem, etc. etc.
  • the means (305) the organization of data exchange is ensured between, for example, the system (300), presented in the form of a server, and the user’s computing device, on which the received data (generated stylized replica of the digital assistant) can be displayed via a wired or wireless transmission channel data, for example WAN, PAN, LAN, Intranet, Internet, WLAN, WMAN or GSM.

Abstract

The claimed technical solution relates generally to the field of computing, and more particularly to a method and system for generating text for a digital assistant in dialogue systems. The technical result of implementing the claimed solution is an increase in the semantic accuracy with which stylized text is generated from a source text. This technical result is achieved using a method for automatically generating text for a digital assistant in dialogue systems comprising the steps of: receiving incoming data containing natural language source text and the target style of the utterances of a digital assistant; encoding the source text; vectorizing tokens; processing vector representations of the source text tokens using a neural network-based machine learning model trained on digital assistant text utterances stylized in accordance with the given target style, with an array of vectorized stylized texts being formed during processing; decoding each vectorized stylized text from the array, wherein decoding at least includes the conversion of a vectorized stylized text into tokens and detokenization; filtering the array of stylized texts; ranking the filtered stylized texts and selecting the best stylized text, wherein the best text is selected on the basis of the pairwise distance between the source text and each of the possible stylized texts; and sending the stylized text to the dialogue system.

Description

СПОСОБ И СИСТЕМА ГЕНЕРАЦИИ ТЕКСТА ДЛЯ ЦИФРОВОГО АССИСТЕНТА METHOD AND SYSTEM OF TEXT GENERATION FOR DIGITAL ASSISTANT
ОБЛАСТЬ ТЕХНИКИ TECHNICAL FIELD
[0001] Заявленное техническое решение в общем относится к области вычислительной техники, а в частности к способу и системе генерации текста для цифрового ассистента в диалоговых системах. [0001] The claimed technical solution generally relates to the field of computer technology, and in particular to a method and system for generating text for a digital assistant in dialogue systems.
УРОВЕНЬ ТЕХНИКИ BACKGROUND OF THE ART
[0002] В результате функционирования языка сложились его разновидности, принадлежащие к определенному стилю изложения текста, которому присущи определенные черты, языковые средства, жанры и т.д. Так, при публикации текста в научном журнале, такому тексту будут присущи черты научного стиля, в то время как при неформальном общении тексту будут присущи черты разговорного стиля, например, неформальные обращения на «ты», простота конструкции предложения, использование сленга и т.д. [0002] As a result of the functioning of the language, its varieties have developed, belonging to a certain style of text presentation, which is characterized by certain features, linguistic means, genres, etc. So, when publishing a text in a scientific journal, such a text will have features of a scientific style, while in informal communication the text will have features of a conversational style, for example, informal “you” addresses, simplicity of sentence construction, the use of slang, etc. .
[0003] В настоящее время, с развитием информационных технологий, активное развитие получили технологии переноса стиля речи в области обработки текстов на естественном языке (Natural Language Processing, NLP) и сегодня ее пытаются интегрировать в самые разные сферы. Автоматизация процесса или части процесса стилизации текста в определенном стиле может позволить существенно повысить эффективность в таких сферах, как журналистика, в издательских домах, например, редакторы текста, создание контента для медиа платформ и виртуальных ассистентов И т.д. [0003] Currently, with the development of information technology, speech style transfer technologies have received active development in the field of text processing in natural language (Natural Language Processing, NLP) and today they are trying to integrate it into a variety of areas. Automating the process or part of the process of styling text in a certain style can significantly increase efficiency in areas such as journalism, in publishing houses, for example, text editors, content creation for media platforms and virtual assistants, etc.
[0004] Однако, не смотря на востребованность данной технологии, существуют ряд трудностей, не позволяющих, например, генерировать стилизованный текст с высокой точностью. Так, проблемами стилизации текста является обеспечение сохранности исходной информации, обеспечение отсутствия в сгенерированных текстах новых фактов, сохранение смысловой нагрузки исходного текста и т.д. Кроме того, одной из немаловажных проблем, также является возможность обеспечения универсальности технологии, позволяющей генерировать текст не только в одном стиле, но и обеспечивать возможность стилизации исходного текста в нескольких стилях, в зависимости от сферы применения. Поэтому создание эффективного и точного способа автоматической генерации текста в заданных стилях является существенной задачей. [0004] However, despite the demand for this technology, there are a number of difficulties that do not allow, for example, generating stylized text with high accuracy. Thus, the problems of text stylization are ensuring the safety of the original information, ensuring the absence of new facts in the generated texts, preserving the semantic load of the source text, etc. In addition, one of the important problems is also the possibility of ensuring the versatility of the technology, which allows generating text not only in one style, but also providing the ability to stylize the source text in several styles, depending on the scope of application. Therefore, creating an effective and An accurate way to automatically generate text in given styles is an essential task.
[0005] Так, из уровня техники известен способ переноса стиля текста, раскрытый в источнике [1]. Указанный способ обеспечивает возможность генерирования стилизованного текста из исходного текста с помощью решения задачи машинного перевода. В качестве «языка», на который требуется перевести исходный текст, в данном случае выступает стиль текста. [0005] Thus, a method for transferring text style, disclosed in the source [1], is known from the prior art. This method provides the ability to generate stylized text from source text by solving a machine translation problem. In this case, the “language” into which the source text needs to be translated is the text style.
[0006] К недостаткам указанного решения можно отнести высокую сложность реализации и узконаправленность данного решения, в связи с огромным набором требуемых обучаемых данных, и невозможность адаптации под разные стили ввиду особенностей технологии языкового перевода. Кроме того, указанное решение также не обеспечивает высокую точность, т.к. в процессе такого «перевода» может теряться смысл исходной фразы из-за изменения всех слов исходного текста. [0006] The disadvantages of this solution include the high complexity of implementation and narrow focus of this solution, due to the huge set of required training data, and the inability to adapt to different styles due to the peculiarities of language translation technology. In addition, this solution also does not provide high accuracy, because in the process of such “translation” the meaning of the original phrase may be lost due to changes in all the words of the source text.
[0007] Из уровня техники также известен способ предоставления логических ответов, которые подражают стилю речи пользователя, раскрытый в патенте РФ № RU 2693332 С1 (ОБЩЕСТВО С ОГРАНИЧЕННОЙ ОТВЕТСТВЕННОСТЬЮ "ЯНДЕКС"), опубл. 02.07.2019. Указанный способ обеспечивает возможность выбора контекстного ответа на вопрос, в зависимости от контекста вопроса, за счет анализа векторного представления контекстного вопроса и поиска ближайшего ответа из набора ответов в базе данных. [0007] The prior art also knows a method for providing logical answers that imitate the user's speech style, disclosed in RF patent No. RU 2693332 C1 (LIMITED LIABILITY COMPANY "YANDEX"), publ. 07/02/2019. This method provides the ability to select a contextual answer to a question, depending on the context of the question, by analyzing the vector representation of the contextual question and searching for the closest answer from a set of answers in the database.
[0008] Недостатками данного решения являются невозможность генерирования стилизованного текста на основе исходного текста, высокие затраты вычислительной мощности и большой объем требуемой памяти на формирование базы данных (БД), ограниченность стилизации паттернами БД, низкая точность генерирования стилизованного текста ввиду подбора заранее созданных и сохраненных в БД стилистических ответов. [0008] The disadvantages of this solution are the inability to generate stylized text based on the source text, the high cost of computing power and the large amount of memory required to generate a database (DB), the limitation of stylization to DB patterns, the low accuracy of generating stylized text due to the selection of pre-created and stored in DB of stylistic responses.
[0009] Общими недостатками существующих решений является отсутствие эффективного способа генерации стилизованного текста с высокой точностью, обеспечивающей сохранность исходной информации и отсутствие в сгенерированных текстах новых фактов. Также, указанный способ должен обеспечивать сохранение смысловой нагрузки исходного текста. Кроме того, указанный способ должен обеспечивать универсальность технологии стилизации текста, позволяющей генерировать текст не только в одном стиле, но и обеспечивать возможность стилизации исходного текста в нескольких стилях, в зависимости от сферы применения. [0009] The general disadvantages of existing solutions are the lack of an effective way to generate stylized text with high accuracy, ensuring the safety of the original information and the absence of new facts in the generated texts. Also, this method must ensure that the semantic load of the source text is preserved. In addition, this method should ensure the versatility of text stylization technology, allowing you to generate text not only in one style, but also provide the ability stylization of the source text in several styles, depending on the scope of application.
РАСКРЫТИЕ ИЗОБРЕТЕНИЯ DISCLOSURE OF INVENTION
[0010] В заявленном техническом решении предлагается новый подход к генерации текста для цифрового ассистента в диалоговых системах. В данном решении используется алгоритм машинного обучения, который позволяет осуществлять генерацию стилизованного текста для цифрового ассистента из исходного текста с высокой точностью, обеспечивающей семантическую близость исходного и стилизованного текста и исключающий искажение стилизованного текста новыми фактами. [0010] The claimed technical solution proposes a new approach to generating text for a digital assistant in dialogue systems. This solution uses a machine learning algorithm that allows the generation of stylized text for the digital assistant from the source text with high accuracy, ensuring the semantic proximity of the source and stylized text and excluding the distortion of the stylized text by new facts.
[0011] Т аким образом, решается техническая проблема обеспечения возможности генерации стилизованного текста. [0011] Thus, the technical problem of providing the ability to generate stylized text is solved.
[0012] Техническим результатом, достигающимся при решении данной проблемы, является повышение семантической точности генерации стилизованного текста из исходного текста. [0012] The technical result achieved by solving this problem is to increase the semantic accuracy of generating stylized text from the source text.
[0013] Дополнительным техническим результатом, проявляющимся при решении вышеуказанной проблемы, является обеспечение возможности генерации множества стилизованных текстов из одного исходного. [0013] An additional technical result that appears when solving the above problem is the ability to generate multiple stylized texts from one source.
[0014] Указанные технические результаты достигаются благодаря осуществлению компьютерно-реализуемого способа автоматической генерации текста для цифрового ассистента в диалоговых системах, выполняемый по меньшей мере одним вычислительным устройством, и содержащий этапы, на которых: a) получают входные данные, содержащие исходный текст на естественном языке и целевой стиль реплик цифрового ассистента; b) осуществляют кодирование исходного текста, причем в ходе кодирования выполняют по меньшей мере токенизацию текстовых данных; c) выполняют векторизацию токенов, полученных на этапе Ь); d) осуществляют обработку векторных представлений токенов исходного текста, полученных на этапе с), с помощью модели машинного обучения на базе нейронной сети, обученной на стилизованных, в соответствии с заданным целевым стилем, текстовых репликах цифрового ассистента, в ходе которой осуществляется формирование массива векторизированных стилизованных текстов; e) осуществляют декодирование каждого векторизированного стилизованного текста из массива, полученного на этапе d), причем в ходе декодирования выполняют по меньшей мере преобразование векторизированного стилизованного текста в токены и детокенизацию; f) выполняют фильтрацию массива стилизованных текстов, полученных на этапе е); g) осуществляют ранжирование отфильтрованных стилизованных текстов и выбор лучшего стилизованного текста, причем выбор лучшего текста основан на попарном расстоянии между исходным текстом и каждым из возможных стилизованных текстов; h) отправляют стилизованный текст, полученный на этапе g), в диалоговую систему. [0014] These technical results are achieved by implementing a computer-implemented method for automatically generating text for a digital assistant in conversational systems, performed by at least one computing device, and comprising the steps of: a) receiving input data containing source text in natural language and target style of digital assistant remarks; b) encoding the source text, and during encoding at least tokenization of the text data is performed; c) perform vectorization of the tokens obtained in step b); d) process vector representations of source text tokens obtained at stage c), using a machine learning model based on a neural network trained on stylized text replicas of the digital assistant, in accordance with a given target style, during which an array of vectorized stylized texts; e) decoding each vectorized stylized text from the array obtained in step d), and during decoding, at least converting the vectorized stylized text into tokens and detokenization is performed; f) filter the array of stylized texts obtained at step e); g) ranking the filtered stylized texts and selecting the best stylized text, the selection of the best text being based on the pairwise distance between the original text and each of the possible stylized texts; h) send the stylized text obtained in step g) to the dialogue system.
[0015] В одном из частных вариантов реализации способа фильтрация массива стилизованных текстов выполняется с помощью регулярных выражений и морфологического анализатора. [0015] In one of the particular embodiments of the method, filtering an array of stylized texts is performed using regular expressions and a morphological analyzer.
[0016] В другом частном варианте реализации способа фильтрация массива стилизованных текстов выполняется на основе совпадения имен собственных в исходном тексте и каждом стилизованном тексте из массива. [0016] In another particular embodiment of the method, filtering an array of stylized texts is performed based on the match of proper names in the source text and each stylized text from the array.
[0017] В другом частном варианте реализации способа совпадение имен собственных определяется с помощью количества неизменных именованных сущностей, содержащихся в исходном тексте и стилизованном тексте. [0017] In another particular embodiment of the method, the matching of proper names is determined using the number of immutable named entities contained in the source text and the stylized text.
[0018] В другом частном варианте реализации способа количество неизменных именованных сущностей определяется на основе распознавания именованных сущностей в исходном тексте и каждом стилизованном тексте из массива. [0018] In another particular embodiment of the method, the number of immutable named entities is determined based on the recognition of named entities in the source text and each stylized text from the array.
[0019] В другом частном варианте реализации способ дополнительно содержит этап проверки наличия стилизации текста. [0019] In another particular embodiment, the method further comprises the step of checking for the presence of text stylization.
[0020] В другом частном варианте реализации способа проверка наличия стилизации текста осуществляется на основе определения произошла ли замена целевых индикаторов стиля. [0020] In another particular embodiment of the method, the presence of text stylization is checked based on determining whether the target style indicators have been replaced.
[0021] Кроме того, заявленные технические результаты достигаются за счет системы автоматической генерации текста для цифрового ассистента в диалоговых системах, содержащей: по меньшей мере один процессор; • по меньшей мере одну память, соединенную с процессором, которая содержит машиночитаемые инструкции, которые при их выполнении по меньшей мере одним процессором обеспечивают выполнение способа генерации текста для цифровых ассистентов в диалоговых системах. [0021] In addition, the claimed technical results are achieved through an automatic text generation system for a digital assistant in dialogue systems, comprising: at least one processor; • at least one memory coupled to the processor that contains computer-readable instructions that, when executed by the at least one processor, provide a method for generating text for digital assistants in conversational systems.
КРАТКОЕ ОПИСАНИЕ ЧЕРТЕЖЕЙ BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Признаки и преимущества настоящего изобретения станут очевидными из приводимого ниже подробного описания изобретения и прилагаемых чертежей. [0022] Features and advantages of the present invention will become apparent from the following detailed description of the invention and the accompanying drawings.
[0023] Фиг. 1 иллюстрирует блок-схему общего вида заявленной системы. [0023] FIG. 1 illustrates a general block diagram of the proposed system.
[0024] Фиг. 2 иллюстрирует блок-схему выполнения заявленного способа. [0024] FIG. 2 illustrates a block diagram of the claimed method.
[0025] Фиг. 3 иллюстрирует пример общего вида вычислительного устройства, которое обеспечивает реализацию заявленного решения. [0025] FIG. 3 illustrates an example of a general view of a computing device that provides implementation of the claimed solution.
ОСУЩЕСТВЛЕНИЕ ИЗОБРЕТЕНИЯ IMPLEMENTATION OF THE INVENTION
[0026] Ниже будут описаны понятия и термины, необходимые для понимания данного технического решения. [0026] The concepts and terms necessary to understand this technical solution will be described below.
[0027] Модель в машинном обучении (МО) — совокупность методов искусственного интеллекта, характерной чертой которых является не прямое решение задачи, а обучение в процессе применения решений множества сходных задач. [0027] A model in machine learning (ML) is a set of artificial intelligence methods, the characteristic feature of which is not the direct solution of a problem, but learning in the process of applying solutions to many similar problems.
[0028] Распознавание именованных сущностей (Named-entity recognition, NER) — это подзадача извлечения информации, которая направлена на поиск и классификацию упоминаний именованных сущностей в неструктурированном тексте по заранее определенным категориям, таким как имена собственные, имена персонажей, организации, местоположения, денежные значения, проценты и т. д. [0028] Named-entity recognition (NER) is an information extraction subtask that aims to find and classify mentions of named entities in unstructured text into predefined categories such as proper names, character names, organizations, locations, monetary values, percentages, etc.
[0029] Векторное представление слов (word embeddings, эмбеддинги) — общее название для различных подходов к моделированию языка и обучению представлений в обработке естественного языка, направленных на сопоставление словам (и, возможно, фразам) из некоторого словаря векторов из n-мерного вещественного пространства R_n. [0029] Word embeddings are a general name for various approaches to language modeling and representation learning in natural language processing that aim to map words (and possibly phrases) from some dictionary of vectors from an n-dimensional real space R_n.
[0030] Токенизация — это процесс разбиения текста на текстовые единицы или токены (чаще всего в качестве таких единиц выступают слова, но это могут быть также буквы, части предложения, сочетания слов и т д). [0031 ] Языковая модель - это вероятностное распределение на множестве словарных последовательностей. В данном патенте термин “языковая модель” употребляется для описания нейросетевых языковых моделей, которые выполнены с возможностью моделирования языка посредством оценки вероятности той или иной последовательности символов. [0030] Tokenization is the process of breaking text into text units or tokens (most often these units are words, but they can also be letters, parts of a sentence, combinations of words, etc.). [0031 ] A language model is a probability distribution on a set of vocabulary sequences. In this patent, the term “language model” is used to describe neural network language models that are designed to model a language by estimating the probability of a particular sequence of characters.
[0032] Заявленное техническое решение предлагает новый подход, обеспечивающий повышение семантической точности генерации стилизованного текста, заключающейся в обеспечении сохранности смыслового содержания в стилизованном тексте, а также исключения дополнения стилизованного текста новыми фактами и логическими единицами языка. Одной из особенностей заявленного технического решения является возможность генерации множества стилизованных тексов из единственного исходного текста, что также обеспечивает автоматизацию процесса генерации стилизованных текстов и значительно снижает время стилизации текста по сравнению с ручной генерацией каждого отдельного стилизованного текста. [0032] The claimed technical solution offers a new approach that improves the semantic accuracy of stylized text generation, which consists in ensuring the preservation of semantic content in the stylized text, as well as eliminating the addition of stylized text with new facts and logical units of language. One of the features of the claimed technical solution is the ability to generate multiple stylized texts from a single source text, which also ensures automation of the process of generating stylized texts and significantly reduces the time of text stylization compared to manual generation of each individual stylized text.
[0033] Заявленное техническое решение может быть реализовано на компьютере, в виде автоматизированной информационной системы (АИС) или машиночитаемого носителя, содержащего инструкции для выполнения вышеупомянутого способа. [0033] The claimed technical solution can be implemented on a computer, in the form of an automated information system (AIS) or a machine-readable medium containing instructions for performing the above method.
[0034] Техническое решение также может быть реализовано в виде распределенной компьютерной системы или вычислительного устройства. [0034] The technical solution may also be implemented as a distributed computer system or computing device.
[0035] В данном решении под системой подразумевается компьютерная система, ЭВМ (электронно-вычислительная машина), ЧПУ (числовое программное управление), ПЛК (программируемый логический контроллер), компьютеризированные системы управления и любые другие устройства, способные выполнять заданную, чётко определённую последовательность вычислительных операций (действий, инструкций). [0035] In this solution, a system means a computer system, computer (electronic computer), CNC (computer numerical control), PLC (programmable logic controller), computerized control systems and any other devices capable of performing a given, clearly defined sequence of computing operations (actions, instructions).
[0036] Под устройством обработки команд подразумевается электронный блок либо интегральная схема (микропроцессор), исполняющая машинные инструкции (программы)/ [0036] A command processing device means an electronic unit or an integrated circuit (microprocessor) that executes machine instructions (programs)/
[0037] Устройство обработки команд считывает и выполняет машинные инструкции (программы) с одного или более устройства хранения данных, например, таких устройств, как оперативно запоминающие устройства (ОЗУ) и/или постоянные запоминающие устройства (ПЗУ). В качестве ПЗУ могут выступать, но, не ограничиваясь, жесткие диски (HDD), флэш-память, твердотельные накопители (SSD), оптические носители данных (CD, DVD, BD, MD и т.п.) и др. [0037] An instruction processing device reads and executes machine instructions (programs) from one or more data storage devices, such as devices such as random access memory (RAM) and/or read only memory (ROM). They can act as ROM, but not limited to hard drives (HDD), flash memory, solid state drives (SSD), optical storage media (CD, DVD, BD, MD, etc.), etc.
[0038] Программа — последовательность инструкций, предназначенных для исполнения устройством управления вычислительной машины или устройством обработки команд. [0038] Program - a sequence of instructions intended for execution by a computer control device or command processing device.
[0039] Термин «инструкции», используемый в этой заявке, может относиться, в общем, к программным инструкциям или программным командам, которые написаны на заданном языке программирования для осуществления конкретной функции, такой как, например, кодирование и декодирование текстов, фильтрация, ранжирование, трансляция текстов в диалоговую систему и т. п. Инструкции могут быть осуществлены множеством способов, включающих в себя, например, объектно- ориентированные методы. Например, инструкции могут быть реализованы, посредством языка программирования Python, C++, Java, Python, различных библиотек (например, MFC; Microsoft Foundation Classes) и т. д. Инструкции, осуществляющие процессы, описанные в этом решении, могут передаваться как по проводным, так и по беспроводным каналам передачи данных, например Wi-Fi, Bluetooth, USB, WLAN, LAN и т. п. [0039] The term "instructions" as used in this application may refer generally to software instructions or software commands that are written in a given programming language to perform a specific function, such as, for example, text encoding and decoding, filtering, ranking , translation of texts into a dialogue system, etc. Instructions can be implemented in a variety of ways, including, for example, object-oriented methods. For example, instructions can be implemented using the Python programming language, C++, Java, Python, various libraries (for example, MFC; Microsoft Foundation Classes), etc. Instructions that implement the processes described in this solution can be transmitted either over the wire, and via wireless data transmission channels, such as Wi-Fi, Bluetooth, USB, WLAN, LAN, etc.
[0040] На фиг. 1 приведен общий вид системы 100 генерации текста для цифрового ассистента в диалоговых системах. Система 100 включает в себя основные функциональные элементы, такие как: модуль кодирования/декодирования 101, модуль переноса стиля 102, модуль фильтрации стилизованных текстов 103, модуль ранжирования 104 стилизованных текстов. Более подробно элементы системы 100 раскрыты на фиг. 3. [0040] In FIG. 1 shows a general view of a text generation system 100 for a digital assistant in dialog systems. The system 100 includes basic functional elements, such as: an encoding/decoding module 101, a style transfer module 102, a stylized text filtering module 103, a stylized text ranking module 104. The elements of the system 100 are disclosed in more detail in FIG. 3.
[0041] В качестве диалоговой системы может выступать система 120 и представлять собой различные решения, например, голосовые помощники, чат-боты, роботизированные колл-центры, и иные технологии, воплощающие автоматизированный процесс общения с пользователем, таким как пользователь 110. Стоит отметить, что под диалоговыми системами в данном решении следует понимать любую автоматизированную человеко-машинную систему, работающую в режиме диалога, при котором она отвечает на каждую команду пользователя и по мере надобности обращается к нему за информацией. [0041] The dialogue system can be system 120 and represent various solutions, for example, voice assistants, chat bots, robotic call centers, and other technologies that implement an automated process of communication with a user, such as user 110. It is worth noting that that in this solution, dialogue systems should be understood as any automated human-machine system operating in dialogue mode, in which it responds to every user command and turns to him for information as needed.
[0042] В качестве цифровых ассистентов (виртуальные цифровые помощники) могут выступать системы автоматизации взаимодействия с пользователем, реализованные на основе искусственного интеллекта в диалоговом формате (чат-бот, навыки для голосового помощника и т.д.). Так, в одном частном варианте осуществления цифровой ассистент может представлять собой компьютерную систему, которая имитирует в диалоговом формате разговор с пользователями. [0042] Digital assistants (virtual digital assistants) can be systems for automating user interaction, implemented on the basis of artificial intelligence in a dialog format (chatbot, skills for voice assistant, etc.). Thus, in one particular embodiment, the digital assistant may be a computer system that simulates a conversation with users in a conversational format.
[0043] Под стилизацией текста в данном решении понимается генерирование текста путем преобразования принятого исходного текста в текст, которому присущи стилистические речевые черты. Так, стилистическими чертами могут являться эмоциональный окрас текста (веселый, грустный и т.д.). В другом частном варианте осуществления стилистическими речевыми чертами может являться условие и цели общения в какой-то сфере общественной деятельности, например, официальноделовой деятельности, публицистической деятельности, разговорной, художественной и т.д. Стоит отметить, что стилизацией текста также может являться придание характерных черт тексту, присущих особенностям общения отдельно взятых личностей, персонажей, литературных героев и т.д., не ограничиваясь. Так, в еще одном частном варианте осуществления стилизацией текста может являться преобразование исходного текста в стилизованный, в соответствии с заданным стилем общения конкретного цифрового помощника, которому присущи разговорные черты стиля, например, использование определенных местоимений, подчеркивающих неформальный/формальный стиль общения («Ты» и «Вы), род, число и т.д. [0043] Text stylization in this solution refers to the generation of text by transforming the received source text into text that has stylistic speech features. Thus, stylistic features can be the emotional color of the text (cheerful, sad, etc.). In another particular embodiment, stylistic speech features may be the conditions and goals of communication in some area of public activity, for example, official business activity, journalistic activity, conversational, artistic, etc. It is worth noting that stylization of the text can also be the giving of characteristic features to the text inherent in the characteristics of communication of individual individuals, characters, literary heroes, etc., without limitation. Thus, in another particular embodiment, text stylization may be the transformation of the original text into a stylized one, in accordance with the specified communication style of a particular digital assistant, which has conversational style features, for example, the use of certain pronouns emphasizing the informal/formal style of communication (“You” and “You”), gender, number, etc.
[0044] Модуль кодирования/декодирования 101 может быть реализован на базе по меньшей мере одного вычислительного устройства, оснащенного соответствующим программным обеспечением, и включать набор моделей для токенизации и детокенизации текста, векторизации токенизированного текста и преобразования токенов в текст, например, одну или несколько моделей машинного обучения для преобразования текстовой информации в векторную форму, например, BERT, ELMo, ULMFit, XLNet, RoBerta, RuGPT3 и другие. В одном частном варианте осуществления модуль 101 может быть реализован на базе системы 300, которая более подробно раскрыта на фиг. 3. Стоит отметить, что определенный метод токенизации и векторизации зависит от выбранной языковой модели, на базе которой реализован модуль 102. Например, при использовании модели RuGPT3, токенизация осуществляется методом ВРЕ (Byte Pair Encoding), а последующая векторизация - путем замены каждого токена на его индекс в словаре языковой модели, составленном на этапе изначального обучения модели. Кроме того, в еще одном частном варианте осуществления, в качестве метода токенизации может использоваться токенизация по словам. Пример токенизации по словам и кодирование слов индексами в словаре:
Figure imgf000011_0001
[0044] The encoding/decoding module 101 may be implemented on at least one computing device equipped with appropriate software and include a set of models for tokenizing and detokenizing text, vectorizing tokenized text, and converting tokens to text, such as one or more models machine learning for converting text information into vector form, for example, BERT, ELMo, ULMFit, XLNet, RoBerta, RuGPT3 and others. In one particular embodiment, module 101 may be implemented on system 300, which is described in more detail in FIG. 3. It is worth noting that the specific method of tokenization and vectorization depends on the selected language model on the basis of which module 102 is implemented. For example, when using the RuGPT3 model, tokenization is carried out using the BPE (Byte Pair Encoding) method, and subsequent vectorization is carried out by replacing each token with its index in the language model dictionary compiled at the stage of initial model training. Additionally, in yet another particular embodiment, word tokenization may be used as the tokenization method. Example of tokenization by words and encoding of words by indexes in the dictionary:
Figure imgf000011_0001
[0045] Модуль 102 может быть реализован на базе по меньшей мере одной нейронной сети, заранее обученной на конкретных наборах стилизованных, в соответствии с заданными стилями, текстов. В качестве модели машинного обучения, реализующей функцию генерации стилизованных, в соответствии с заданным стилем, текстов, может быть использована, например, генеративная языковая модель, такая как RuGPT3, XLNet и т.д. В одном частном варианте осуществления, при реализации заявленного решения, МО являлась русскоязычная генеративная языковая модель RuGPT3 -Large. Модель обучена на источниках из разных доменов: Википедия, книги, новости, русский Common Crawl и т. д. Модель обучали 14 дней на 128 GPU с контекстным окном 1024 и дополнительно несколько дней на 16 GPU с контекстом 2048. Финальная модель имеет перплексию 13.8 на тестовом наборе данных. На данном этапе обучения, результатом обучения языковой модели являлась возможность предсказывания вероятности следующего токена на основе предыдущего начального фрагмента текста. Так, если в процессе обучения модель часто встречала в обучающих данных определенное словосочетание, то при предсказании следующего после известного из словосочетания токена, модель с высокой вероятностью будет предсказывать именно токен из словосочетания в обучающем наборе данных. [0045] Module 102 can be implemented on the basis of at least one neural network, pre-trained on specific sets of stylized texts in accordance with specified styles. As a machine learning model that implements the function of generating stylized texts in accordance with a given style, for example, a generative language model such as RuGPT3, XLNet, etc. can be used. In one particular embodiment, when implementing the stated solution, the MO was the Russian-language generative language model RuGPT3 -Large. The model was trained on sources from different domains: Wikipedia, books, news, Russian Common Crawl, etc. The model was trained for 14 days on 128 GPUs with a context window of 1024 and an additional few days on 16 GPUs with a context window of 2048. The final model has a perplexity of 13.8 on test data set. At this stage of training, the result of training the language model was the ability to predict the probability of the next token based on the previous initial text fragment. So, if during the training process the model often encountered a certain phrase in the training data, then when predicting the next token after the known one from the phrase, the model will with a high probability predict exactly the token from the phrase in the training data set.
[0046] Далее, для выполнения непосредственно самого процесса генерации стилизованного текста из исходного текста, выполнялось дообучение обученной модели. Для дообучения модели использовалась процедура fine-tune. На указанном этапе выполнялось настраивание весов обученной модели в соответствии с решаемой задачей. Так, при появлении в модели исходного предложения, за счет измененных весовых коэффициентов, наиболее вероятным предложением для модели будет перефраз данного предложения в определенном стиле, т.е. осуществляется повышение вероятности продолжения текстового фрагмента в том формате, в котором должен быть сгенерирован стилизованный текст. При дообучении модели использовались датасеты с различными стилизованными репликами цифровых ассистентов. Так, в одном частном варианте осуществления решалась задача стилизации исходного текста под три стиля речи цифровых ассистентов. Изначальные данные для дообучения содержали 2174, 2436 и 32242 реплик в стиле каждого ассистента соответственно. При этом исходные данные содержали лишь реплики в стиле конкретных ассистентов, но не содержали исходного текста, из которого осуществляется генерация таких стилизованных реплик. [0046] Next, to directly perform the process of generating stylized text from the source text, additional training of the trained model was performed. To further train the model, the fine-tune procedure was used. At this stage, the weights of the trained model were adjusted in accordance with the problem being solved. Thus, when the original sentence appears in the model, due to the changed weighting coefficients, the most likely sentence for the model will be a paraphrase of this sentence in a certain style, i.e. the probability of continuation of a text fragment in the format in which the stylized text should be generated is increased. When additionally training the model, datasets with various stylized replicas of digital assistants were used. Thus, in one particular embodiment, the problem of stylizing the source text for three speech styles of digital assistants was solved. The initial data for additional training contained 2174, 2436 and 32242 replicas in the style of each assistant, respectively. In this case, the original data contained only replicas in style of specific assistants, but did not contain the source text from which such stylized replicas are generated.
[0047] Для формирования датасета (обучающего набора данных) в формате, подходящем для дообучения модели, состоящего из пар «исходная реплика» - «реплика в стиле ассистента», к стилизованным репликам был применен парафразер, например, парафразер на основе генеративной модели RuT5. Модель парафразера известна из уровня техники и раскрыта, например, в источнике, доступном по ссылке в Интернет: https://huggingface.co/cointegrated/rut5-base-paraphraser. Для каждой стилизованной реплики было сгенерировано 10 исходных вариантов парафразера, из которых затем было выбрано 2 наиболее близких исходных реплики на основе семантической метрики, например, метрики LabSe. Данная метрика оценивает косинусное сходство между векторными представлениями предложений, полученными с помощью модели, которое соответствует семантической близости. Таким образом итоговые датасеты для дообучения RuGPT3 под задачу переноса стиля содержали 4348, 4872, 64484 пар предложений («исходная реплика» - «реплика в стиле ассистента»). Помимо этого, к данным был также добавлен тэг, характеризующий конкретного цифрового ассистента с соответствующим ему стилем речи для обеспечения возможности определения в каком именно стиле сгенерируется стилизованный текст. На полученных данных модель дообучалась 5 эпох. [0047] To generate a dataset (training data set) in a format suitable for additional training of the model, consisting of pairs “original replica” - “assistant-style replica”, a parafraser was applied to the stylized replicas, for example, a parafraser based on the RuT5 generative model. The paraphraser model is known from the prior art and is disclosed, for example, in a source available via the Internet link: https://huggingface.co/cointegrated/rut5-base-paraphraser. For each stylized replica, 10 initial versions of the paraphrase were generated, from which the 2 closest initial replicas were then selected based on a semantic metric, for example, the LabSe metric. This metric evaluates the cosine similarity between the vector representations of sentences obtained using the model, which corresponds to semantic proximity. Thus, the final datasets for additional training of RuGPT3 for the style transfer task contained 4348, 4872, 64484 pairs of sentences (“original replica” - “replica in the assistant’s style”). In addition, a tag was also added to the data that characterizes a specific digital assistant with its corresponding speech style to make it possible to determine in what style the stylized text will be generated. Using the received data, the model was additionally trained for 5 epochs.
[0048] Оценка полученной модели производилась на тестовом сете отдельно по каждому ассистенту. В качестве тестового набора данных использовалось 1097 реплик для каждого ассистента из наборов ассистентов. Для оценки качества были использованы следующие метрики: 1) BLEU (Papineni, К.; Roukos, S.; Ward, T.; Zhu, W. J. (2002). BLEU: a method for automatic evaluation of machine translation (PDF). ACL- 2002: 40th Annual meeting of the Association for Computational Linguistics, pp. 311- 318. CiteSeerX 10.1.1.19.9416.). Алгоритм BLEU сравнивает фразы двойного перевода с фразами, которые он находит в эталонном варианте, и взвешенно подсчитывает количество совпадений. Эти совпадения не зависят от позиции. Высшая степень совпадения указывает на более высокую степень сходства с эталонным переводом и более высокий балл. Внятность и грамматика не учитываются. 2) Число общих N- Gram, где в качестве N-Gram брались последовательности слов длины от 3 до 8. 3) Levenshtein - расстояние Левенштейна (В. И. Левенштейн. Двоичные коды с исправлением выпадений, вставок и замещений символов. Доклады Академий Наук СССР, 1965. 163.4:845-848.) (редакционное расстояние, дистанция редактирования). Указанная метрика, измеряющая по модулю разность между двумя последовательностями символов. Она определяется как минимальное количество односимвольных операций (а именно вставки, удаления, замены), необходимых для превращения одной последовательности символов в другую. 4) Jaccard index - индекс Жаккара (Jaccard Р. Distribution de la flore alpine dans le Bassin des Dranses et dans quelques regions voisines 11 Bull. Soc. Vaudoise sci. Natur. 1901. V. 37. Bd. 140. S. 241 — 272.), который вычислялся как число общих токенов в стилизованной реплике и исходном предложении, деленное на объединение токенов в этих двух фрагментах текста. [0048] The resulting model was evaluated on a test set separately for each assistant. The test data set was 1097 replicas for each assistant from the assistant sets. The following metrics were used to assess quality: 1) BLEU (Papineni, K.; Roukos, S.; Ward, T.; Zhu, WJ (2002). BLEU: a method for automatic evaluation of machine translation (PDF). ACL- 2002: 40th Annual meeting of the Association for Computational Linguistics, pp. 311-318. CiteSeerX 10.1.1.19.9416.). The BLEU algorithm compares the double translation phrases with the phrases it finds in the reference variant and calculates the number of matches in a weighted manner. These matches are independent of position. A higher degree of match indicates a higher degree of similarity to the reference translation and a higher score. Clarity and grammar are not taken into account. 2) The number of common N-Grams, where sequences of words of length from 3 to 8 were taken as N-Grams. 3) Levenshtein - Levenshtein distance (V.I. Levenshtein. Binary codes with correction of deletions, insertions and substitutions of symbols. Reports of the Academies of Sciences USSR, 1965. 163.4:845-848.) (editorial distance, editing distance). A specified metric that measures the absolute value of the difference between two sequences of characters. It is defined as the minimum number of single-character operations (namely insertion, deletion, replacement) required to transform one sequence of characters into another. 4) Jaccard index - Jaccard index (Jaccard R. Distribution de la flore alpine dans le Bassin des Dranses et dans quelques regions voisines 11 Bull. Soc. Vaudoise sci. Natur. 1901. V. 37. Bd. 140. S. 241 - 272.), which was calculated as the number of common tokens in the stylized replica and the original sentence divided by the combination of tokens in these two text fragments.
[0049] Результаты оценки модели для трех цифровых ассистентов, каждому из которых присущ свой стиль общения, приведены в таблице 1. [0049] The model evaluation results for three digital assistants, each with their own communication style, are shown in Table 1.
ТаблицаTable
1
Figure imgf000013_0001
1
Figure imgf000013_0001
[0050] Из таблицы 1 видно, что BLEU score, число общих n-gram и индекс Жаккара имеют уровень более 95%. Расстояние Левенштейна для всех ассистентов также в среднем меньше 2, что указывает на то, что сгенерированные предложения в среднем отличаются от ответов-образцов не более чем на 2 символа. [0050] From Table 1 it can be seen that the BLEU score, the number of common n-grams and the Jaccard index have a level of more than 95%. The Levenshtein distance for all assistants is also on average less than 2, which indicates that the generated sentences, on average, differ from the sample answers by no more than 2 characters.
[0051] Модуль 103 может быть реализован на базе по меньшей мере одного вычислительного устройства и включать морфологический анализатор, например, Unigram анализатор, N-gram анализатор, анализатор на основе регулярных выражений и т.д. Также, модуль 103 может содержать нейронную сеть, обученную на решение задачи NER (распознавание именованных сущностей), например, Slovnet BERT NER, DeepPavlov BERT NER и т.д., не ограничиваясь. В одном частном варианте осуществления модуль 103, может содержать тяжёлую модель с BERT-архитектурой, и быть обучен на небольшом вручную аннотированном датасете. [0051] Module 103 may be implemented on at least one computing device and include a morphological parser, such as a Unigram parser, N-gram parser, regular expression parser, etc. Also, module 103 may contain a neural network trained to solve the NER (named entity recognition) problem, for example, Slovnet BERT NER, DeepPavlov BERT NER, etc., but not limited to. In one particular embodiment, module 103 may contain a heavy model with BERT architecture, and be trained on a small manually annotated dataset.
[0052] Модуль ранжирования 104 стилизованных текстов может быть реализован на базе по меньшей мере одного вычислительного устройства, оснащенного соответствующим программным обеспечением для вычисления расстояния Левенштейна. Так, указанный модуль 104 выполнен с возможностью осуществления алгоритма вычисления попарных расстояний между исходным текстом и стилизованными текстами. [0052] The stylized text ranking module 104 may be implemented on at least one computing device equipped with appropriate distance calculation software Levenshtein. Thus, the specified module 104 is configured to implement an algorithm for calculating pairwise distances between the source text and stylized texts.
[0053] Для специалиста в данной области техники очевидно, что, хотя и описанные выше модули представлены как отдельные устройства, указанные модули также могут быть объединены в составе одного устройства, например, системы 300. [0053] It will be apparent to one skilled in the art that, although the modules described above are presented as separate devices, these modules can also be combined within a single device, such as system 300.
[0054] На фиг. 2 представлена блок схема способа 200 автоматической генерации текста для цифрового ассистента в диалоговых системах, который раскрыт поэтапно более подробно ниже. Указанный способ 200 заключается в выполнении этапов, направленных на обработку различных цифровых данных. Обработка, как правило, выполняется с помощью системы, например, системы 100, которая также может представлять, например, сервер, компьютер, мобильное устройство, вычислительное устройство и т. д. [0054] In FIG. 2 is a block diagram of a method 200 for automatically generating text for a digital assistant in conversational systems, which is described step by step in more detail below. Said method 200 consists of performing steps to process various digital data. Processing is typically performed by a system, such as system 100, which may also represent, for example, a server, computer, mobile device, computing device, etc.
[0055] На этапе 210 система 100 получает входные данные, содержащие исходный текст на естественном языке и целевой стиль реплик цифрового ассистента. Так, входные данные могут быть получены от диалоговой системы 120 по каналам передачи данных, таких как Интернет. Исходный текст, полученный от диалоговой системы 120, может представлять, например, диалоговую реплику, такую как ответ на вопрос пользователя, вопрос пользователю и т.д. Целевой стиль реплик цифрового ассистента может представлять определенные характерные черты речевого стиля, например, разговорный стиль общения, которому присущи, например, наличие неформальных обращений к пользователю, деловой стиль общения, которому присущи официальные обращения и т.д. Также, в одном частном варианте осуществления целевой стиль реплик может указывать на эмоциональный окрас текста, например, грустный, веселый, нейтральный и т.д. Целевой стиль реплик цифрового ассистента может быть определен настройками диалоговой системы 120. Так, диалоговая система, такая как система 120, может содержать набор цифровых ассистентов каждому из которых присущ свой стиль общения. При начале диалога пользователь в настройках системы может выбрать определенного ассистента. Указанные данные о выбранном ассистенте также передаются в систему 100. [0055] At step 210, the system 100 receives input data containing the natural language source text and the target speech style of the digital assistant. Thus, input data may be received from the dialog system 120 over data links such as the Internet. The source text received from the dialog system 120 may represent, for example, a dialog response such as an answer to a user question, a question to the user, etc. The target style of the digital assistant's remarks may represent certain characteristic features of the speech style, for example, a conversational style of communication, which is characterized, for example, by the presence of informal addresses to the user, a business style of communication, which is characterized by formal addresses, etc. Also, in one particular embodiment, the target style of remarks may indicate the emotional color of the text, for example, sad, happy, neutral, etc. The target style of the digital assistant's remarks may be determined by the settings of the conversational system 120. Thus, a conversational system, such as system 120, may contain a set of digital assistants, each of which has a different communication style. When starting a dialogue, the user can select a specific assistant in the system settings. The specified data about the selected assistant is also transmitted to the system 100.
[0056] На этапе 220 осуществляют кодирование исходного текста, причем в ходе кодирования выполняют по меньшей мере токенизацию текстовых данных. Указанный этап 220 может выполняться модулем 101. Входной текст может быть разделен на токены. Под токеном в данном решении следует понимать последовательность символов в тексте, которая имеет значение для анализа. В еще одном частном варианте осуществления токенизация текста может быть выполнена с помощью алгоритма ВРЕ (Byte Pair encoding). В еще одном частном варианте осуществления токенизация может представлять собой разбиение текста на слова по пробелу между словами. Далее составляется словарь токенов фиксированного размера (например, 30000 токенов), где каждому токену сопоставляется его индекс в словаре. [0056] At step 220, the source text is encoded, and during encoding, at least tokenization of the text data is performed. This step 220 may be performed by module 101. The input text may be divided into tokens. In this solution, a token should be understood as a sequence of characters in a text that is meaningful for analysis. In yet another particular embodiment, text tokenization can be performed using the BPE (Byte Pair encoding) algorithm. In yet another particular embodiment, tokenization may involve breaking text into words based on the space between words. Next, a dictionary of tokens of a fixed size (for example, 30,000 tokens) is compiled, where each token is associated with its index in the dictionary.
Пример токенизации на слова:
Figure imgf000015_0001
<заявке> ‘]
Example of tokenization for words:
Figure imgf000015_0001
<application>']
[0057] На указанном этапе 230 выполняется векторизация токенизированных текстов. Как упоминалось выше, метод токенизации зависит от языковой модели, которая используется в модуле 102 на этапе 240. Так, например, при использовании языковой модели RuGPT3, каждому токену сопоставляется его индекс в словаре. Таким образом, токенизированный фрагмент текста (список токенов) после векторизации отображается в вектор индексов данных токенов в словаре. [0057] At this step 230, vectorization of the tokenized texts is performed. As mentioned above, the tokenization method depends on the language model that is used in module 102 at step 240. Thus, for example, when using the RuGPT3 language model, each token is associated with its index in the dictionary. Thus, a tokenized text fragment (list of tokens) after vectorization is mapped into a vector of token data indices in the dictionary.
Приме векторизации при токенизации по словам:
Figure imgf000015_0002
An example of vectorization when tokenizing by words:
Figure imgf000015_0002
[0058] Далее способ 100 переходит к этапу 240. [0058] Method 100 then proceeds to step 240.
[0059] На этапе 240 осуществляют обработку векторных представлений токенов исходного текста, с помощью модуля 103, в ходе которой осуществляется формирование массива векторизированных стилизованных текстов. Как упоминалось выше, модель машинного обучения на базе нейронной сети была дообучена на стилизованных, в соответствии с заданным целевым стилем, текстовых репликах цифровых ассистентов. На этапе 240 на вход модели поступает векторное представление исходного текста. На выходе модель генерирует несколько вариантов стилизованных текстов (кандидатов) в форме векторных представлений. Указанные векторные представления сохраняются в массив стилизованных текстов. Количество кандидатов, генерируемых моделью зависит от применяемых методов выборки. В одном частном варианте осуществления для модели использовались следующие критерии выборок: выборка top Р (top_p=0.92), выборка top К (top_k=50), температурная выборка (temperature=0.85). Более подробно указанные методы выборок раскрыты в источнике, найдено в Интернет по ссылке: https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277 Общий принцип работы модели заключается в возможности предсказывать вероятность следующего токенав определенном контексте. Так, на первом этапе обучения осуществляется возможность языковой модели предсказывать вероятность следующего токена на основе предыдущего начального фрагмента текста. Для реализации возможности генерирования указанной моделью стилизованных текстов, далее выполняется изменение ее весов таким образом, чтобы те вероятности для следующего токена, которые предсказывает модель, отвечали текущей задачи стилизации текста. Указанная изменение весов осуществляется на основе обучающего набора данных. Дообученная модель далее способна генерировать из исходного текста множество стилизованных текстов с разной степенью вероятности токенов в этом тексте. Поскольку сгенерированное множество стилизованных текстов может быть очень велико, а распределение вероятности в части из них будет слишком малым, то такие кандидаты (сгенерированные стилизованные тексты) могут быть отсечены на основе критериев выборок, указанных выше. В результате, на выходе модели формируется массив стилизованных текстов. [0059] At step 240, vector representations of source text tokens are processed using module 103, during which an array of vectorized stylized texts is generated. As mentioned above, a machine learning model based on a neural network was additionally trained on text replicas of digital assistants stylized in accordance with the specified target style. At step 240, the model input is a vector representation of the source text. At the output, the model generates several variants of stylized texts (candidates) in the form of vector representations. The specified vector representations are saved into an array of stylized texts. The number of candidates generated by the model depends on the sampling methods used. In one particular embodiment, the following sampling criteria were used for the model: top P sample (top_p=0.92), top K sample (top_k=50), temperature sample (temperature=0.85). The specified sampling methods are disclosed in more detail in the source, found on the Internet at the link: https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277 The general principle of the model is the ability to predict the probability of the next token in a certain context. Thus, at the first stage of training, the language model is able to predict the probability of the next token based on the previous initial text fragment. To realize the possibility of generating stylized texts by the specified model, its weights are then changed so that the probabilities for the next token that the model predicts correspond to the current task of text stylization. The specified change in weights is carried out on the basis of the training data set. The additionally trained model is then able to generate from the source text a set of stylized texts with different degrees of probability of tokens in this text. Since the generated set of stylized texts can be very large, and the probability distribution in some of them will be too small, such candidates (generated stylized texts) can be cut off based on the sampling criteria specified above. As a result, an array of stylized texts is formed at the output of the model.
[0060] Стоит отметить, что обеспечение возможности генерации масссива стилизованных текстов, а не одного стилизованного текста, повышает точность стилизации текста, т.к. обеспечивается возможность дальнейшей проверки и обработки всех вариантов стилизованного текста для выбора наиболее семантически близкого к исходному текста из массива. Кроме того, генерация именно массива стилизованных текстов позволяет в дальнейшем исключить добавление новых фактов и/или некорректное изменение определённых слов на основе дальнейшей обработки таких текстов. [0060] It is worth noting that providing the ability to generate an array of stylized texts, rather than just one stylized text, increases the accuracy of text stylization, because provides the ability to further check and process all variants of stylized text to select the most semantically close to the original text from the array. In addition, the generation of an array of stylized texts allows us to further eliminate the addition of new facts and/or incorrect changes to certain words based on further processing of such texts.
[0061] На этапе 250 сформированный массив векторизированных стилизованных текстов поступает в модуль 101. На указанном этапе 250 осуществляют декодирование каждого векторизированного стилизованного текста из массива, причем в ходе декодирования выполняют по меньшей мере преобразование векторизированного стилизованного текста в токены и детокенизацию. Так, например, в ходе указанного процесса каждый вектор фиксированной длины на основе его размерности сопоставляется токен по индексу словаря, что позволяет представить каждый вектор в виде токена. Процесс детокенизации является обратным процессом к токенизации и заключается в объединении токенов в текст. В результате выполнения данного этапа 250, массив векторизированных стилизованных текстов преобразуется в массив стилизованных текстов на естественном языке. Пример: [0061] At step 250, the generated array of vectorized stylized texts is supplied to module 101. At said step 250, each vectorized stylized text from the array is decoded, and during decoding, at least the vectorized stylized text is converted into tokens and detokenized. Thus, for example, during this process, each vector of a fixed length, based on its dimension, is mapped to a token by a dictionary index, which allows each vector to be represented as a token. The process of detokenization is the reverse process of tokenization and consists of combining tokens into text. As a result of this step 250, the array of vectorized stylized texts is converted into an array of stylized natural language texts. Example:
Исходный текст ['Вот что я нашел по вашей заявке] Original text ['Here's what I found based on your request]
Массив стилизованных текстов: ['8ош что я нашла по заявке', 'Вот что я нашел по твоей заявке', 'Вот что я нашла по вашей заявке', 'Что я нашла по твоей заявке'...] An array of stylized texts: ['This is what I found from your application', 'This is what I found from your application', 'This is what I found from your application', 'What I found from your application'...]
[0062] На этапе 260 выполняют фильтрацию массива стилизованных текстов. На указанном этапе 260 с помощью модуля 103 осуществляется фильтрация указанного массива. Так, на данном этапе исключаются те кандидаты, которые не удовлетворяют заданным характерным стилевым чертам. Так, например, при генерации стилизованной реплики для цифрового ассистента, имитирующего разговорное неформальное общение в качестве женского пола, будут по меньшей мере следующие критерии: по роду (женский род) и обращению (на Ты). Так, в результате генерации стилизованного текста для женского персонажа, который придерживается делового стиля общения (присущи характерные стилистические черты делового стиля общения), исключается кандидат ‘Вот что я нашел по твоей заявке’. Указанная фильтрация также повышает точность стилизации текста. Для проверки корректности используются регулярные выражения, написанные на основе библиотеки ге и морфологический анализатор MorphAnalyzer из библиотеки pymorphy2. На выходе данного модуля имеем отфильтрованный список возможных кандидатов, которые прошли проверку корректности. Пример: [‘Вот что я нашла по заявке ‘Что я нашла по твоей заявке ’...]. [0062] At step 260, the array of stylized texts is filtered. At said step 260, module 103 filters said array. Thus, at this stage, those candidates who do not satisfy the specified characteristic style features are excluded. So, for example, when generating a stylized replica for a digital assistant simulating conversational informal communication as a female, there will be at least the following criteria: by gender (feminine) and address (Tu). Thus, as a result of generating a stylized text for a female character who adheres to a business style of communication (characteristic stylistic features of a business style of communication are inherent), the candidate “This is what I found based on your application” is excluded. This filtering also improves the accuracy of text styling. To check the correctness, regular expressions written on the basis of the ge library and the MorphAnalyzer morphological analyzer from the pymorphy2 library are used. The output of this module is a filtered list of possible candidates that have passed the correctness check. Example: [‘This is what I found from the application ‘What I found from your application’...].
[0063 ] Кроме того, в одном частном варианте осуществления фильтрация массива стилизованных текстов выполняется на основе совпадения именованных сущностей (например, имен собственных) в исходном тексте и каждом стилизованном тексте из массива. Для этого в исходном и каждом из стилизованных текстов выполняется алгоритм распознавания именованных сущностей, например, с помощью модуля 103, и происходит сравнение количества неизменных именованных сущностей, содержащихся в исходном тексте и стилизованном тексте. Как указывалось выше, на этапе 240, генерируется массив стилизованных текстов. Для повышения семантической точности между стилизованным и исходным текстом, стилизованный текст не должен искажать факты и не быть дополнен новыми логическими связями. В свою очередь, указанный массив стилизованных текстов может содержать релевантные стилизованные текста, которые удовлетворяют характерным стилистическим чертам, однако такие тексты будут некорректными, например, ввиду изменения фактов такого текста. Пример: [0063 ] Additionally, in one particular embodiment, filtering of an array of stylized text is performed based on matches of named entities (eg, proper names) in the source text and each stylized text in the array. To do this, in the source and each of the stylized texts, a named entity recognition algorithm is executed, for example, using module 103, and the number of unchanged named entities contained in the source text and the stylized text is compared. As discussed above, at step 240, an array of stylized texts is generated. To increase semantic accuracy between the stylized and source text, the stylized text should not distort facts and should not be supplemented with new logical connections. In turn, the specified array of stylized texts may contain relevant stylized texts that satisfy the characteristic stylistic features, however, such texts will be incorrect, for example, due to changes in the facts of such text. Example:
Исходный текст: Думаю тебе стоит прочитать произведение Александра Сергеевича Пушкина «Евгений Онегин» Source text: I think you should read the work of Alexander Sergeevich Pushkin “Eugene Onegin”
Некорректный стилизованный текст: Думаю Вам стоит прочитать произведение Александра Васильевича Пушкина «Евгений Онегин» Incorrect stylized text: I think you should read the work of Alexander Vasilyevich Pushkin “Eugene Onegin”
[0064] Как видно из примера, сгенерированный текст удовлетворяет стилистическим чертам официального стиля (обращение на «Вы»), т.е. является релевантным, однако, изменяет факты текста (имя автора произведения). [0064] As can be seen from the example, the generated text satisfies the stylistic features of the official style (appeal to “You”), i.e. is relevant, however, it changes the facts of the text (the name of the author of the work).
[0065] Для решения данной проблемы был предложен подход, заключающийся в сравнении именованных сущностей в исходном тексте и каждом стилизованном тексте из набора. Для этого, на первом шаге в исходном тексте выполняют распознавание именованных сущностей (например, имена, названия топонимов и организаций) и сохраняют их в памяти, например, в памяти системы 100, в виде файла данных. На следующем шаге выполняют распознавание именованных сущностей в каждом стилизованном тексте из массива. После этого выполняют сравнение неизменных сущностей между исходными и стилизованными текстами. Соответственно, кандидаты, отличающиеся от исходного текста по именованным сущностям, отбрасываются, что дополнительно повышает семантическую точность стилизации текста за счет исключения изменений/ дополнений фактами стилизованного текста. [0065] To solve this problem, an approach has been proposed that consists of comparing named entities in the source text and each stylized text from the set. To do this, in the first step, recognition of named entities (for example, names, names of toponyms and organizations) is performed in the source text and stored in memory, for example, in the memory of the system 100, in the form of a data file. The next step is to recognize named entities in each stylized text from the array. After this, a comparison of immutable entities between the original and stylized texts is performed. Accordingly, candidates that differ from the source text in named entities are discarded, which further increases the semantic accuracy of text stylization by excluding changes/additions of facts to the stylized text.
[0066] Таким образом, на этапе 260 осуществляется фильтрация массива стилизованных текстов. [0066] Thus, at step 260, the array of stylized texts is filtered.
[0067] На этапе 270 осуществляют ранжирование отфильтрованных стилизованных текстов и выбор лучшего стилизованного текста, причем выбор лучшего текста основан на попарном расстоянии между исходным текстом и каждым из возможных стилизованных текстов. На этапе 270 набор отфильтрованных стилизованных текстов ранжируется по посимвольной близости с исходным текстом. Указанное ранжирование осуществляется на основе расстояния Левенштейна. Для этого вычисляются попарные расстояние между исходной нейтральной фразой и каждым из возможных кандидатов. В качестве лучшего выбирается кандидат, расстояние Левенштейна для которого минимально. Расстояние Левенштейна вычисляется с помощью функции distance из библиотеки Levenshtein. В результате получаем стилизованную реплику цифрового ассистента, с наименьшим изменением исходного текстового фрагмента, что соответственно повышает точность всего алгоритма стилизации и уменьшает вероятность добавления новых фактов. [0067] At step 270, the filtered stylized texts are ranked and the best stylized text is selected, the selection of the best text being based on the pairwise distance between the original text and each of the possible stylized texts. At step 270, the set of filtered stylized texts is ranked by character-by-character proximity to the original text. This ranking is done based on the Levenshtein distance. To do this, pairwise distances between the original neutral phrase and each of the possible candidates are calculated. The candidate whose Levenshtein distance is minimal is selected as the best one. Levenshtein distance is calculated using the distance function from the Levenshtein library. As a result, we get a stylized replica of the digital assistant, with the least change source text fragment, which accordingly increases the accuracy of the entire stylization algorithm and reduces the likelihood of adding new facts.
[0068] Кроме того, в одном частном варианте осуществления заявленного решения полученный в результате ранжирования текст может быть дополнительно проверен на наличие стилизации. Проверка наличия стилизации текста осуществляется на основе определения произошла ли замена целевых индикаторов стиля. Так, например, система 100 может дополнительно содержать модуль проверки стилизации, реализованный на базе вычислительного устройства. Указанный модуль выполнен с возможностью проверки для пары (исходная реплика, стилизованная реплика,) происходит ли при стилизации замена целевых индикаторов стиля, например, рода/числа или числа в обращении Ты/Вы по сравнению с оригинальной фразой (есть много нейтральных фраз, для которых замена не требуется). Данный модуль выполнен с возможностью замены только в том случае, если происходит хотя бы одно изменение. Таким образом, в случае если происходит замена, то на выходе мы получаем стилизованную реплику, а если замены не произошло - то исходную, которая является нейтральной и подходит для любого стиля. [0068] In addition, in one particular embodiment of the claimed solution, the text obtained as a result of ranking can be additionally checked for stylization. Checking for text stylization is carried out by determining whether the target style indicators have been replaced. For example, system 100 may further include a styling checker implemented on the computing device. The specified module is made with the ability to check for a pair (original replica, stylized replica) whether during stylization the replacement of target style indicators occurs, for example, gender/number or number in circulation You/You compared to the original phrase (there are many neutral phrases for which no replacement required). This module is designed to be replaced only if at least one change occurs. Thus, if a replacement occurs, then at the output we get a stylized replica, and if there is no replacement, then the original one, which is neutral and suitable for any style.
[0069] На этапе 280 выполняют передачу стилизованного текста в диалоговую систему. На указанном этапе 280 стилизованная реплика цифрового ассистента может быть сохранена в памяти системы в виде файла и отправлена в диалоговую систему посредством, например, канала передачи данных для последующего отображения пользователю, например, с помощью интерфейса ввода-вывода диалоговой системы 120. [0069] At step 280, the stylized text is transmitted to the dialog system. At this step 280, the stylized replica of the digital assistant may be stored in system memory as a file and sent to the dialog system via, for example, a data link for subsequent display to the user, for example, using the I/O interface of the dialog system 120.
[0070] Таким образом, в вышеприведенных материалах были описаны система и способ генерации текста для цифровых ассистентов в диалоговых системах, обеспечивающий высокую семантическую точность генерации стилизованного текста. [0070] Thus, the above materials described a system and method for generating text for digital assistants in dialog systems, ensuring high semantic accuracy in generating stylized text.
[0071] Кроме того, стоит отметить, что благодаря реализации заявленного решения также обеспечивается универсальность стилизации текста, позволяющая генерировать текст не только в одном стиле, но и обеспечивать возможность стилизации исходного текста в нескольких стилях, в зависимости от сферы применения. Указанная особенность исключает необходимость в отдельном формировании для каждого стиля уникальной стилизованной реплики. Благодаря применению заявленного решения выполняется возможность подачи одного исходного текста и генерирование на его основе разных стилизованных текстов. [0072] Теперь рассмотрим один из примеров реализации заявленного технического решения. [0071] In addition, it is worth noting that thanks to the implementation of the claimed solution, the universality of text stylization is also ensured, allowing you to generate text not only in one style, but also to provide the ability to stylize the source text in several styles, depending on the scope of application. This feature eliminates the need to separately create a unique stylized replica for each style. Thanks to the application of the claimed solution, it is possible to submit one source text and generate different stylized texts based on it. [0072] Now let's look at one example of the implementation of the claimed technical solution.
[0073] Одно из возможных применений системы заключается в стилизации изначально нейтрального ответа под стиль заданного ассистента. Так, как упоминалось выше, диалоговые системы могут содержать набор цифровых ассистентов, каждому из которых присущ свой стиль общения. При запросе пользователя, диалоговая система генерирует изначально нейтральную реплику (исходный текст). Указанный способ 200 обеспечивает возможность генерации из указанной нейтральной реплики, например, ответа цифрового ассистента, стилизованную реплику (стилизованный текст) в соответствии с заданным стилем цифрового ассистента. Это исключает необходимость в генерации множества стилизованных реплик под каждого цифрового ассистента. Также, еще одним преимуществом такого подхода является гибкость в выборе стиля, генерация текстового ответа - вычислительно сложная операция, под нее необходимо обучать большую модель. Заявленное решение в свою очередь позволяет стилизовать сгенерированный исходный ответ с помощью системы 100 под разные стили. [0073] One possible use of the system is to style an initially neutral response to match the style of a given assistant. So, as mentioned above, conversational systems can contain a set of digital assistants, each of which has its own communication style. When a user requests, the dialogue system generates an initially neutral response (source text). The specified method 200 provides the ability to generate from a specified neutral response, for example, a response from a digital assistant, a stylized response (stylized text) in accordance with a specified style of the digital assistant. This eliminates the need to generate multiple stylized replicas for each digital assistant. Also, another advantage of this approach is flexibility in choosing a style; generating a text response is a computationally complex operation, and it is necessary to train a large model for it. The stated solution, in turn, allows you to stylize the generated initial response using the 100 system for different styles.
[0074] На Фиг. 3 представлен пример общего вида вычислительной системы (300), которая обеспечивает реализацию заявленного способа или является частью компьютерной системы, например, модулями 101-103, сервером, персональным компьютером, частью вычислительного кластера, обрабатывающим необходимые данные для осуществления заявленного технического решения. [0074] In FIG. 3 shows an example of a general view of a computer system (300), which provides the implementation of the claimed method or is part of a computer system, for example, modules 101-103, a server, a personal computer, part of a computing cluster that processes the necessary data to implement the claimed technical solution.
[0075] В общем случае система (300) содержит такие компоненты, как: один или более процессоров (301), по меньшей мере одну память (302), средство хранения данных (303), интерфейсы ввода/вывода (304), средство В/В (305), средство сетевого взаимодействия (306), которые объединяются посредством универсальной шины. [0075] In general, the system (300) includes components such as: one or more processors (301), at least one memory (302), data storage means (303), input/output interfaces (304), means B /B (305), a means of network interaction (306), which are combined via a universal bus.
[0076] Процессор (301) выполняет основные вычислительные операции, необходимые для обработки данных при выполнении способа (200). Процессор (301) исполняет необходимые машиночитаемые команды, содержащиеся в оперативной памяти (302). [0076] The processor (301) performs the basic computational operations necessary to process data when executing the method (200). The processor (301) executes the necessary machine-readable instructions contained in the RAM (302).
[0077] Память (302), как правило, выполнена в виде ОЗУ и содержит необходимую программную логику, обеспечивающую требуемый функционал. [0077] The memory (302) is typically in the form of RAM and contains the necessary software logic to provide the required functionality.
[0078] Средство хранения данных (303) может выполняться в виде HDD, SSD дисков, рейд массива, флэш-памяти, оптических накопителей информации (CD, DVD, MD, Blue-Ray дисков) и т. п. Средства (303) позволяют выполнять долгосрочное хранение различного вида информации, например сгенерированных стилизованных реплик, идентификаторов пользователей, идентификаторов цифровых ассистентов и т. п. [0078] The data storage medium (303) can be in the form of HDD, SSD drives, raid array, flash memory, optical storage devices (CD, DVD, MD, Blue-Ray disks), etc. The means (303) allow carry out long-term storing various types of information, such as generated stylized replicas, user IDs, digital assistant IDs, etc.
[0079] Для организации работы компонентов системы (300) и организации работы внешних подключаемых устройств применяются различные виды интерфейсов В/В (304). Выбор соответствующих интерфейсов зависит от конкретного исполнения вычислительного устройства, которые могут представлять собой, не ограничиваясь: PCI, AGP, PS/2, IrDa, FireWire, LPT, COM, SATA, IDE, Lightning, USB (2.0, 3.0, 3.1, micro, mini, type C), TRS/Audio jack (2.5, 3.5, 6.35), HDMI, DVI, VGA, Display Port, RJ45, RS232 и т. п. [0079] To organize the operation of system components (300) and organize the operation of external connected devices, various types of I/O interfaces (304) are used. The choice of appropriate interfaces depends on the specific design of the computing device, which can be, but is not limited to: PCI, AGP, PS/2, IrDa, FireWire, LPT, COM, SATA, IDE, Lightning, USB (2.0, 3.0, 3.1, micro, mini, type C), TRS/Audio jack (2.5, 3.5, 6.35), HDMI, DVI, VGA, Display Port, RJ45, RS232, etc.
[0080] Выбор интерфейсов (304) зависит от конкретного исполнения системы (300), которая может быть реализована на базе широко класса устройств, например, персональный компьютер, мейнфрейм, ноутбук, серверный кластер, тонкий клиент, смартфон, сервер и т. п. [0080] The choice of interfaces (304) depends on the specific design of the system (300), which can be implemented on the basis of a wide class of devices, for example, a personal computer, mainframe, laptop, server cluster, thin client, smartphone, server, etc.
[0081] В качестве средств В/В данных (305) может использоваться: клавиатура, джойстик, дисплей (сенсорный дисплей), монитор, сенсорный дисплей, тачпад, манипулятор мышь, световое перо, стилус, сенсорная панель, трекбол, динамики, микрофон, средства дополненной реальности, оптические сенсоры, планшет, световые индикаторы, проектор, камера, средства биометрической идентификации (сканер сетчатки глаза, сканер отпечатков пальцев, модуль распознавания голоса) и т. п. [0081] The following can be used as I/O data (305): keyboard, joystick, display (touch display), monitor, touch display, touchpad, mouse, light pen, stylus, touchpad, trackball, speakers, microphone, augmented reality tools, optical sensors, tablet, light indicators, projector, camera, biometric identification tools (retina scanner, fingerprint scanner, voice recognition module), etc.
[0082] Средства сетевого взаимодействия (306) выбираются из устройств, обеспечивающий сетевой прием и передачу данных, например, Ethernet карту, WLAN/Wi-Fi модуль, Bluetooth модуль, BLE модуль, NFC модуль, IrDa, RFID модуль, GSM модем и т. п. С помощью средств (305) обеспечивается организация обмена данными между, например, системой (300), представленной в виде сервера и вычислительным устройством пользователя, на котором могут отображаться полученные данные (сгенерированная стилизованная реплика цифрового ассистента) по проводному или беспроводному каналу передачи данных, например, WAN, PAN, ЛВС (LAN), Интранет, Интернет, WLAN, WMAN или GSM. [0082] Network interaction means (306) are selected from devices that provide network reception and transmission of data, for example, an Ethernet card, WLAN/Wi-Fi module, Bluetooth module, BLE module, NFC module, IrDa, RFID module, GSM modem, etc. etc. Using the means (305), the organization of data exchange is ensured between, for example, the system (300), presented in the form of a server, and the user’s computing device, on which the received data (generated stylized replica of the digital assistant) can be displayed via a wired or wireless transmission channel data, for example WAN, PAN, LAN, Intranet, Internet, WLAN, WMAN or GSM.
[0083] Конкретный выбор элементов системы (300) для реализации различных программно-аппаратных архитектурных решений может варьироваться с сохранением обеспечиваемого требуемого функционала. [0084] Представленные материалы заявки раскрывают предпочтительные примеры реализации технического решения и не должны трактоваться как ограничивающие иные, частные примеры его воплощения, не выходящие за пределы испрашиваемой правовой охраны, которые являются очевидными для специалистов соответствующей области техники. Таким образом, объем настоящего технического решения ограничен только объемом прилагаемой формулы. [0083] The specific selection of system elements (300) for implementing various software and hardware architectural solutions may vary while maintaining the required functionality provided. [0084] The submitted application materials disclose preferred examples of implementation of a technical solution and should not be interpreted as limiting other, particular examples of its implementation that do not go beyond the scope of the requested legal protection, which are obvious to specialists in the relevant field of technology. Thus, the scope of the present technical solution is limited only by the scope of the attached formula.
ИСТОЧНИКИ ИНФОРМАЦИИ INFORMATION SOURCES
1. Ап Empirical Study on Multi-Task Learning for Text Style Transfer and Paraphrase Generation, Pawel Bujnowskia, Kseniia Ryzhovac, Hyungtak Choib, Katarzyna Witkowskad, Jarostaw Piersaa, Tymoteusz Krumholca and Katarzyna Beksa. Найдено в Интернет по ссылке: https://aclanthology.Org/2020.coling-industry.6.pdf . 20.04.2022. 1. Empirical Study on Multi-Task Learning for Text Style Transfer and Paraphrase Generation, Pawel Bujnowskia, Kseniia Ryzhovac, Hyungtak Choib, Katarzyna Witkowskad, Jarostaw Piersaa, Tymoteusz Krumholca and Katarzyna Beksa. Found on the Internet at: https://aclanthology.Org/2020.coling-industry.6.pdf. 04/20/2022.

Claims

ФОРМУЛА Способ автоматической генерации текста для цифрового ассистента в диалоговых системах, выполняемый по меньшей мере одним вычислительным устройством, и содержащий этапы, на которых: a) получают входные данные, содержащие исходный текст на естественном языке и целевой стиль реплик цифрового ассистента; b) осуществляют кодирование исходного текста, причем в ходе кодирования выполняют по меньшей мере токенизацию текстовых данных; c) выполняют векторизацию токенов, полученных на этапе Ь); d) осуществляют обработку векторных представлений токенов исходного текста, полученных на этапе с), с помощью модели машинного обучения на базе нейронной сети, обученной на стилизованных, в соответствии с заданным целевым стилем, текстовых репликах цифрового ассистента, в ходе которой осуществляется формирование массива векторизированных стилизованных текстов; e) осуществляют декодирование каждого векторизированного стилизованного текста из массива, полученного на этапе d), причем в ходе декодирования выполняют по меньшей мере преобразование векторизированного стилизованного текста в токены и детокенизацию; f) выполняют фильтрацию массива стилизованных текстов, полученных на этапе е); g) осуществляют ранжирование отфильтрованных стилизованных текстов и выбор лучшего стилизованного текста, причем выбор лучшего текста основан на попарном расстоянии между исходным текстом и каждым из возможных стилизованных текстов; h) отправляют стилизованный текст, полученный на этапе g), в диалоговую систему. Способ по п. 1, характеризующийся тем, что фильтрация массива стилизованных текстов выполняется с помощью регулярных выражений и морфологического анализатора. Способ по п. 1, характеризующийся тем, что фильтрация массива стилизованных текстов выполняется на основе совпадения имен собственных в исходном тексте и каждом стилизованном тексте из массива. Способ по п. 3, характеризующийся тем, что совпадение имен собственных определяется с помощью количества неизменных именованных сущностей, содержащихся в исходном тексте и стилизованном тексте. Способ по п. 4, характеризующийся тем, что количество неизменных именованных сущностей определяется на основе распознавания именованных сущностей в исходном тексте и каждом стилизованном тексте из массива. Способ по п. 1, характеризующийся тем, дополнительно содержит этап проверки наличия стилизации текста. Способ по п. 7, характеризующийся тем, что проверка наличия стилизации текста осуществляется на основе определения произошла ли замена целевых индикаторов стиля. Система автоматической генерации текста для цифрового ассистента в диалоговых системах, содержащая: FORMULA A method for automatically generating text for a digital assistant in conversational systems, performed by at least one computing device, and comprising the steps of: a) obtaining input data containing natural language source text and the target style of the digital assistant's remarks; b) encoding the source text, and during encoding at least tokenization of the text data is performed; c) perform vectorization of the tokens obtained in step b); d) process vector representations of source text tokens obtained at stage c), using a machine learning model based on a neural network trained on stylized text replicas of the digital assistant, in accordance with a given target style, during which an array of vectorized stylized texts; e) decoding each vectorized stylized text from the array obtained in step d), and during decoding, at least converting the vectorized stylized text into tokens and detokenization is performed; f) filter the array of stylized texts obtained at step e); g) ranking the filtered stylized texts and selecting the best stylized text, the selection of the best text being based on the pairwise distance between the original text and each of the possible stylized texts; h) send the stylized text obtained in step g) to the dialogue system. The method according to claim 1, characterized in that filtering an array of stylized texts is performed using regular expressions and a morphological analyzer. The method according to claim 1, characterized in that the filtering of an array of stylized texts is performed based on the coincidence of proper names in the source text and each stylized text from the array. The method according to claim 3, characterized in that the coincidence of proper names is determined using the number of unchanged named entities contained in the source text and the stylized text. The method according to claim 4, characterized in that the number of immutable named entities is determined based on the recognition of named entities in the source text and each stylized text from the array. The method according to claim 1, characterized in that it further comprises the step of checking for the presence of text stylization. The method according to claim 7, characterized in that the presence of text stylization is checked based on determining whether the target style indicators have been replaced. A system for automatically generating text for a digital assistant in dialogue systems, containing:
• по меньшей мере один процессор; • at least one processor;
• по меньшей мере одну память, соединенную с процессором, которая содержит машиночитаемые инструкции, которые при их выполнении по меньшей мере одним процессором обеспечивают выполнение способа по любому из пп. 1-7. • at least one memory coupled to the processor, which contains machine-readable instructions that, when executed by at least one processor, enable execution of the method according to any one of claims. 1-7.
PCT/RU2022/000147 2022-04-29 2022-04-29 Method and system for generating text for a digital assistant WO2023211305A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
RU2022111787 2022-04-29
RU2022111787A RU2796208C1 (en) 2022-04-29 Method and system for digital assistant text generation

Publications (1)

Publication Number Publication Date
WO2023211305A1 true WO2023211305A1 (en) 2023-11-02

Family

ID=88519361

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/RU2022/000147 WO2023211305A1 (en) 2022-04-29 2022-04-29 Method and system for generating text for a digital assistant

Country Status (1)

Country Link
WO (1) WO2023211305A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130173258A1 (en) * 2011-05-27 2013-07-04 Robert Bosch Gmbh Broad-Coverage Normalization System For Social Media Language
US20150186355A1 (en) * 2013-12-26 2015-07-02 International Business Machines Corporation Adaptive parser-centric text normalization
US20150364128A1 (en) * 2014-06-13 2015-12-17 Microsoft Corporation Hyper-structure recurrent neural networks for text-to-speech
US20160350655A1 (en) * 2015-05-26 2016-12-01 Evature Technologies (2009) Ltd. Systems Methods Circuits and Associated Computer Executable Code for Deep Learning Based Natural Language Understanding

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130173258A1 (en) * 2011-05-27 2013-07-04 Robert Bosch Gmbh Broad-Coverage Normalization System For Social Media Language
US20150186355A1 (en) * 2013-12-26 2015-07-02 International Business Machines Corporation Adaptive parser-centric text normalization
US20150364128A1 (en) * 2014-06-13 2015-12-17 Microsoft Corporation Hyper-structure recurrent neural networks for text-to-speech
US20160350655A1 (en) * 2015-05-26 2016-12-01 Evature Technologies (2009) Ltd. Systems Methods Circuits and Associated Computer Executable Code for Deep Learning Based Natural Language Understanding

Similar Documents

Publication Publication Date Title
CN112712804B (en) Speech recognition method, system, medium, computer device, terminal and application
US9805718B2 (en) Clarifying natural language input using targeted questions
KR102577584B1 (en) Method and apparatus for performing machine translation
Baayen et al. Modeling morphological priming in German with naive discriminative learning
KR20180048624A (en) A training device of the Q &amp; A system and a computer program for it
US20120262461A1 (en) System and Method for the Normalization of Text
WO2012039686A1 (en) Methods and systems for automated text correction
CN114580382A (en) Text error correction method and device
US11170169B2 (en) System and method for language-independent contextual embedding
Bingel et al. Text simplification as tree labeling
KR20230061001A (en) Apparatus and method for correcting text
JP2020135456A (en) Generation device, learning device, generation method and program
Singh et al. Systematic review of spell-checkers for highly inflectional languages
JP7103264B2 (en) Generation device, learning device, generation method and program
JP7279099B2 (en) Dialogue management
RU2817524C1 (en) Method and system for generating text
RU2796208C1 (en) Method and system for digital assistant text generation
WO2023229483A1 (en) Method and system for classifying text
WO2023211305A1 (en) Method and system for generating text for a digital assistant
EA044634B1 (en) METHOD AND SYSTEM OF TEXT GENERATION FOR DIGITAL ASSISTANT
Lee Natural Language Processing: A Textbook with Python Implementation
Lv et al. StyleBERT: Chinese pretraining by font style information
RU2814808C1 (en) Method and system for paraphrasing text
Lengkong et al. The Implementation of Yandex Engine on Live Translator Application for Bahasa and English Using Block Programming MIT App Inventor Mobile Based
RU2818693C2 (en) Text classification method and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22940414

Country of ref document: EP

Kind code of ref document: A1