Conversion device, conversion method, and conversion program

The serial conversion model with switching tokens addresses the inefficiencies of cascading neural sequence conversion by independently controlling multiple tasks, enhancing the conversion of word sequences with reduced errors and resource use.

JP7716629B2Active Publication Date: 2025-08-01NIPPON TELEGRAPH & TELEPHONE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023556002
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-10-28
Publication Date
2025-08-01
Estimated Expiration
2041-10-28

AI Technical Summary

Technical Problem

Existing neural sequence conversion models face challenges in simultaneously converting multiple elements of a word sequence due to the need for cascading models, which leads to conversion errors, increased time, and resource consumption.

Method used

A serial conversion model that uses switching tokens to control the execution of multiple conversion tasks independently, allowing for the simultaneous conversion of elements without requiring dedicated learning data for each task.

Benefits of technology

The model effectively converts multiple elements in a word sequence without the need for cascading, reducing errors and resource requirements while maintaining efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007716629000006
    Figure 0007716629000006
  • Figure 0007716629000007
    Figure 0007716629000007
  • Figure 0007716629000008
    Figure 0007716629000008
Patent Text Reader

Abstract

This conversion device receives the input of a dataset in which, for each conversion task to be executed on a word string of input text, correct data obtained by executing the conversion task on the word string is associated with text information regarding a switching token for turning the conversion task on and other conversion tasks off. The conversion device subsequently uses the dataset to train the parameters of a sequence conversion model that executes a plurality of conversion tasks on an inputted word sequence while switching the plurality of conversion tasks using the switching token. The conversion device then inputs a word sequence to be converted and a switching token indicating a plurality of conversion tasks to be executed on the word sequence into the sequence conversion model for which the trained parameters have been set, thereby executing the plurality of conversion tasks on the word sequence to be converted while switching the plurality of conversion tasks. The conversion device then outputs the result of executing the plurality of conversion tasks on the word sequence subject to conversion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a conversion device, a conversion method, and a conversion program for converting a word sequence.

Background Art

[0002] Conventionally, in order to convert the word sequence of input text into a word sequence in another language, a neural sequence conversion model such as an encoder-decoder model has been used.

[0003] Here, among the tasks using the neural sequence conversion model, consider the spoken / written language conversion task. In this task, the text of the spoken language output from speech recognition is converted into the text of the written language. Specifically, since the text of the spoken language includes fillers and hesitations, a conversion for deleting them is performed. Also, since the text of the spoken language is not punctuated, a conversion for adding them is performed.

[0004] In addition to this, there are many elements to be converted in the spoken / written language conversion, such as correcting Chinese numerals to Arabic numerals and aligning the styles. In the above conversion task, the more these elements in the text of the spoken language can be converted, the more it can be converted into a highly readable written language text.

[0005] Thus, conversion problems that require considering multiple elements exist not only in the spoken / written language conversion but also in many cases such as grammar error correction and dialect conversion.

[0006] In order to simultaneously convert multiple elements using a neural sequence conversion model, a dataset that can handle them simultaneously is required. However, a dataset that can handle multiple elements simultaneously usually does not exist, and in most cases, there are datasets that handle their sub-problems.

[0007] Here, in order to convert a plurality of elements of a word sequence simultaneously, it is conceivable to cascade datasets that handle subproblems. This cascading is, for example, a method in which a model for deleting fillers and hesitations and a model for adding punctuation marks are created independently, and after converting the text of spoken language with one of the models, the conversion is performed with the other model. Thereby, for example, it is possible to delete fillers and hesitations and add punctuation marks.

Prior Art Documents

Non-Patent Documents

[0008]

Non-Patent Document 1

Non-Patent Document 2

Summary of the Invention

Problems to be Solved by the Invention

[0009] However, in the above cascading, since neural sequence conversion has to be performed continuously, a chain of conversion errors may occur. Also, cascading takes time for conversion because a plurality of conversions are required. Furthermore, cascading requires creating a plurality of models. Therefore, cascading requires a lot of time and resources to obtain the final result.

[0010] In addition, as a method for converting a plurality of elements by a method other than cascading, it is conceivable to use learning data for simultaneously converting a plurality of elements. However, as described above, learning data for simultaneously converting a plurality of elements usually does not exist.

[0011] Therefore, an object of the present invention is to convert a plurality of elements in serial conversion without using learning data for simultaneously converting a plurality of elements.

Means for Solving the Problems

[0012] In order to solve the above-described problems, for each conversion task of a word sequence, an input unit that receives an input of a data set in which correct answer data when the conversion task is executed on the word sequence is associated with text information of a switching token for turning on the conversion task and turning off other conversion tasks, a learning unit that learns parameters of a serial conversion model that executes a plurality of conversion tasks while switching by the switching token for an input word sequence using the data set, and a serial conversion unit that executes a plurality of conversion tasks while switching for the word sequence to be converted by inputting the word sequence to be converted and a switching token indicating a plurality of conversion tasks to be executed on the word sequence to the serial conversion model in which the parameters are learned, and an output unit that outputs execution results of the plurality of conversion tasks for the word sequence to be converted.

Effects of the Invention

[0013] According to the present invention, in serial conversion, a plurality of elements can be converted without using learning data for simultaneously converting a plurality of elements.

Brief Description of the Drawings

[0014]

Fig. 1A

Fig. 1B

Fig. 2

Fig. 3

Fig. 4

Fig. 5

Fig. 6

[0015] Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings. The present invention is not limited to these embodiments.

[0016] [Overview of the Conversion Device] First, the overview of the conversion device (sequence conversion device) of the present embodiment will be described. The conversion device uses a sequence conversion model to execute a plurality of conversion tasks (for example, deletion of fillers and hesitations and punctuation addition) while switching for a word sequence of an input text. Here, the conversion device introduces a switching token to perform the switching of the above conversion tasks. This switching token is a special token composed of information representing a conversion task and information representing whether the conversion task is being handled (on / off).

[0017] As shown in FIG. 1A, for example, in the learning of the sequence conversion model, the conversion device learns the following processes (1) to (3) using a dataset and a switching token representing the conversion task handled by the dataset.

[0018] (1) Processing to delete fillers and hesitations = on, punctuation addition = off using a switching token to delete fillers and hesitations. For example, when "えーこんにちは" (e.g., "um, hello") is input, it outputs "こんにちは" (hello). (2) Processing to add punctuation = on, delete fillers and hesitations = off using a switching token to add punctuation. For example, when "えーこんにちは" (e.g., "um, hello") is input, it outputs "えー、こんにちは。" (um, hello.) (3) Processing that does not delete fillers and hesitations and does not add punctuation = off, using a switching token to neither delete fillers and hesitations nor add punctuation. For example, when "えーこんにちは" (e.g., "um, hello") is input, it outputs "えーこんにちは".

[0019] By learning the above (1) - (3) processes in the learning of the sequence conversion model, for example, when "えーこんにちは" (e.g., "um, hello") is input, it deletes fillers and hesitations and adds punctuation = on, using a switching token, and obtains an output result of "こんにちは。" (hello.)

[0020] As shown in Figure 1A, for example, when dealing with a dataset related to the task of deleting fillers (filler) and hesitations, two types of switching tokens such as [filler_on] and [filler_off] are prepared.

[0021] For example, in the above [filler_on] and [filler_off], "filler" represents the task handled by the dataset, and "on / off" represents whether the task is being handled in the dataset. The information representing the task handled by the dataset in the above switching token can be set to any string as long as it can be distinguished from other tasks.

[0022] When the conversion device performs deletion of fillers and hesitation pauses and addition of punctuation marks in speech-to-written language conversion, the overall problem is to perform deletion of fillers and hesitation pauses and addition of punctuation marks, and the sub-problems are to delete fillers and hesitation pauses and to add punctuation marks.

[0023] Here, when there already exist a dataset for the sub-problem of deleting fillers and hesitation pauses and a dataset for the sub-problem of adding punctuation marks, when the conversion device learns the dataset for deleting fillers and hesitation pauses, it gives the switching tokens [filler_on] and [punc_off] to the input of the sequence conversion model. Also, when the conversion device learns the dataset for adding punctuation marks, it gives the switching tokens [filler_off] and [punc_on] to the input of the sequence conversion model.

[0024] Thereby, since the conversion device can associate the state (on / off) of the task of the switching token with the conversion tasks in each dataset to learn the sequence conversion model, it can create a sequence conversion model that can control the execution of a plurality of conversion tasks (for example, deletion of the above-mentioned fillers and hesitation pauses and addition of punctuation marks) by the switching token.

[0025] Thereby, the conversion device can create a sequence conversion model that can convert a plurality of elements without using learning data for simultaneously converting a plurality of elements in sequence conversion.

[0026] [Details of the conversion device] Next, the conversion device will be described in detail. Here, as an example, the overall process will be described using the case where, in sequence conversion, a task that simultaneously handles task A and task B as the overall problem and separately handles task A and task B as sub-problems. For the sake of explanation, the number of tasks is set to 2, but there is no limit to the number of tasks. According to the conversion device of the present embodiment, the switching tokens S A , S BWith the following combination, the output is changed as follows. Note that the parameter θ shown below is the parameter used by the sequence conversion model.

[0027] Input 1: · Switching token S that controls task A A =[A_on] · Switching token S that controls task B B =[B_off] · Word sequence X of the input text · Parameter θ Output 1: · Word sequence Y in which only task A is performed A

[0028] Input 2: · Switching token S that controls task A A =[A_off] · Switching token S that controls task B B =[B_on] · Word sequence X of the input text · Parameter θ Output 2: · Word sequence Y in which only task B is performed B

[0029] Input 3: · Switching token S that controls task A A =[A_off] · Switching token S that controls task B B =[B_off] · Word sequence X of the input text · Parameter θ Output 3: · Word sequence Y identical to the input text / AB

[0030] Input 4: · Switching token S that controls task A A =[A_on] · Switching token S that controls task B B=[B_on] · The word sequence X of the input text · The parameter θ Output 4: · The word sequence Y on which Task A and Task B are performed AB

[0031] The conversion device uses the word sequence X of the input text and the switching token S A、 S B as inputs, and through probability calculation according to the parameter θ of the sequence conversion model, the word sequence Y which is the execution result of the task t controlled by the switching token S A、 S B is output. t

[0032] Here, X which is the input of the sequence conversion is represented as X = (x1, …, x m ). Also, Y which is the output t is represented as Y t = (y1 t , …, y n t ). Also, the switching token is added accordingly when a task used for learning is added. Since two tasks A and B are targeted here, two types of switching tokens S A、 S B are used as inputs.

[0033] Here, when the word sequence to be processed is in English, for example, a space-separated expression may be used as the word sequence. Also, when the word sequence to be processed is in Japanese, for example, an expression automatically segmented by morphological analysis or an expression separated by characters may be used as the word sequence.

[0034] Note that the sequence conversion model can be any neural sequence conversion model, for example, it may be an attention-based encoder-decoder model or a Transformer (see Non-Patent Documents 1 and 2).

[0035] [Configuration Example] ​Next, a configuration example of the conversion device 10 will be described with reference to FIG. 1B. The conversion device 10 includes, for example, an input / output unit 11, a storage unit 12, and a control unit 13.

[0036] The input / output unit 11 is an interface for inputting and outputting various data. For example, the input / output unit 11 receives an input text to be converted by the control unit 13 or receives an input of learning data (data set) of the sequence conversion model. Further, the input / output unit 11 outputs a processing result (conversion result of the word sequence of the input text) by the control unit 13.

[0037] The storage unit 12 is realized by a semiconductor memory element such as a RAM (Random Access Memory) or a flash memory, or a storage device such as a hard disk or an optical disk. For example, a learning data set of the sequence conversion model (e.g., D A 、D B 、D / AB Details will be described later), parameters θ of the sequence conversion model learned by the control unit 13, etc. are stored.

[0038] The control unit 13 is realized by using, for example, a CPU (Central Processing Unit) or the like, and executes a sequence conversion program stored in the storage unit 12. Thereby, the control unit 13 realizes the functions of an input unit 131, a sequence conversion unit 132, a parameter learning unit 133, and an output unit 134.

[0039] The input unit 131 receives an input of a word sequence of an input text. Further, the input unit 131 receives an input of learning data (data set) of the sequence conversion model. The data set is data in which, for each word sequence conversion task (task), correct data obtained by executing the task on the word sequence and text information of a switching token (e.g., [A_on], [B_off], etc.) for turning on the task and turning off other tasks are associated.

[0040] Consider a case where the tasks handled by the sequence conversion model are, for example, a task of removing fillers and hesitations (task A) and a task of adding punctuation marks (task B).

[0041] In this case, the dataset includes the following data (1) to (3). (1) Data (D A ) that associates the word sequence of the input text with the execution result (correct answer data) of task A for the word sequence and a switching token for turning on task A and turning off task B. (2) Data (D B ) that associates the word sequence of the input text with the execution result (correct answer data) of task B for the word sequence and a switching token for turning on task B and turning off task A. (3) Data (D / AB ) that associates the word sequence of the input text with the result when neither task A nor task B is executed for the word sequence (= the word sequence of the input text) and a switching token for turning off tasks A and B.

[0042] The sequence conversion unit 132 obtains the conversion result of the word sequence of the input text using the sequence conversion model. For example, the sequence conversion unit 132 inputs a switching token indicating a plurality of tasks to be executed for the word sequence of the input text to the sequence conversion model, and according to the switching token, executes while switching a plurality of tasks for the word sequence and obtains the execution result of the task.

[0043] The sequence conversion model used by the sequence conversion unit 132 is, for example, a neural sequence conversion model that performs conversion of a word sequence using an encoder and a decoder. When the sequence conversion model is the above neural sequence conversion model, by giving the above switching token as context to the input of the encoder or decoder of the sequence conversion model, the sequence conversion unit 132 can switch tasks. Details of this sequence conversion unit 132 will be described later.

[0044] The parameter learning unit 133 learns the parameters θ of the sequence conversion model using a dataset (e.g., D A , D B , D / AB ). Details of this parameter learning unit 133 will be described later.

[0045] The output unit 134 outputs the execution result (conversion result) of the task for the word sequence to be converted by the sequence conversion unit 132.

[0046] [Example of processing procedure] Next, an example of the processing procedure of the conversion device 10 will be described with reference to FIG. 2. For example, the parameter learning unit 133 of the conversion device 10 learns the parameters θ of the sequence conversion model using a dataset including a switching token (e.g., D A , D B , D / AB ) (S1). Thereafter, the sequence conversion unit 132 performs conversion of the word sequence of the input text using the sequence conversion model set with the parameters θ learned in S1 (S2). For example, the sequence conversion unit 132 executes while switching a plurality of tasks for the word sequence of the input text using the input text and a switching token that sets a plurality of tasks to be executed for the input text based on the sequence conversion model, and obtains a conversion result of the word sequence. Then, the output unit 134 outputs the conversion result of the word sequence obtained in S2 (S3).

[0047] [Sequence conversion unit] Next, the sequence conversion unit 132 will be described in detail. Here, a case where the input to the sequence conversion unit 132 and the output from the sequence conversion unit 132 are as follows will be described as an example.

[0048] Input: · Switching token S for controlling task A A ∈{[A_on],[A_off]} · Switching token S for controlling task B B ∈{[B_on],[B_off]} · Word sequence X of the input text · The word sequence y^1 from the 1st to the (n - 1)th of the output text of task t already controlled by the switching token t ,…,y^ n-1 t · Parameter θ Output: · The nth word y^ of the output text of task t controlled by the switching token n-1 t

[0049] When the sequence conversion unit 132 receives the switching tokens S A , S B , the word sequence X of the input text, and the word sequences y^1 t ,…,y^ n-1 t , it obtains the posterior probability distribution P(y A B n |y^1 t t …,y^ n-1 t ,X,S A ,S B ,θ) of the nth word of the output text of task t controlled by the switching tokens S n . Then, the sequence conversion unit 132 determines the nth word y^ t n of the output text of task t according to the maximum likelihood criterion of the posterior probability distribution P. For example, the sequence conversion unit 132 determines the nth word y^ t t of the output text of task t according to the maximum likelihood criterion based on Equation (1).

[0050]

Equation

[0051] By recursively performing the above processing, the sequence conversion unit 132 obtains the word sequence y^1 n ,…,y^ t of the output text of task t controlled by the switching tokenTo obtain

[0052] [Parameter Learning Unit] Next, the parameter learning unit 133 will be described in detail. Here, a case where the input to the parameter learning unit 133 and the output from the parameter learning unit 133 are as follows will be used as an example for explanation.

[0053] Input: · Switching token S for controlling task A A ∈{[A_on], [A_off]} · Switching token S for controlling task B B ∈{[B_on], [B_off]} · Set of pairs of the word sequence of the input text and the word sequence in which only task A is performed on the word sequence (dataset): Equation (2)

Number

Number

Number

[0054] The parameter learning unit 133 learns the parameter θ of the sequence conversion model using the switching tokens S A , S B , the word sequence X, D of the input text A , D B , D / AB .

[0055] Note that the reason for preparing D for learning the parameter θ of the sequence conversion model is, for example, that the parameter learning unit 133 uses D / AB and D A and DB When only [A_on] is used as the training data for the sequence conversion model, only the pairs that will always be [B_off] if [A_on], and the pairs that will always be [B_on] if [A_off] can be learned. As a result, when tasks A and B are executed using the sequence conversion model, it becomes difficult to control tasks A and B using the switching token.

[0056] Here, if there is a dataset that handles the entire problem and this dataset is included in the training data, the parameter learning unit 133 can learn pairs other than the [A_on][B_off] pair and the [A_off][B_on] pair. Therefore, D / AB does not have to be included as training data.

[0057] The above D A 、D B 、D / AB The parameters θ^ of the sequence conversion model optimized by D are calculated by the following equation (5). For optimization, a general optimization method in neural network training may be used.

[0058]

Equation

[0059] When the parameter learning unit 133 calculates the parameter θ^ as described above, the sequence conversion unit 132 sets the parameter θ^ in the sequence conversion model and executes the conversion process of the word sequence of the input text.

[0060] Next, the processing flow of the parameter learning unit 133 will be described with reference to FIG. 3. For example, the parameter learning unit 133 obtains the word sequence (correct data) of the output text of task t from the dataset D t (=D A +D B +D / AB ).

[0061] Next, the parameter learning unit 133 inputs the word sequence of the input text obtained from the switching token that controls task A, the switching token that controls task B, D t and the word sequence of the output text that has been generated by the sequence conversion unit 132 for the word sequence of the input text into the sequence conversion unit 132, and obtains the word sequence of the output text generated by the sequence conversion unit 132.

[0062] Then, the parameter learning unit 133 compares the word sequence of the output text generated by the sequence conversion unit 132 with the word sequence (correct data) of the output text of task t obtained from D t to perform learning of the parameters θ of the sequence conversion model.

[0063] [Details of the sequence conversion unit] Next, the sequence conversion unit 132 will be described in detail with reference to FIGS. 4 and 5. First, with reference to FIG. 4, the outline of the processing procedure of the sequence conversion unit 132 will be described.

[0064] The sequence conversion unit 132 receives the input of X (input text), S A , S B (switching token) (S11). When n is greater than 1 (Yes in S12), using the sequence conversion model, X, S A , S B and y t 1;n-1 to generate y t n (S13). That is, based on the sequence conversion model, the sequence conversion unit 132 generates y A , S B from X, S t n and the 1st to (n - 1)th word sequences of the output text.

[0065] After that, the sequence conversion unit 132 increments n (S15: n = n + 1). If n = N (Yes in S16), the process ends, and the word sequence Y^ tOutput it. On the other hand, increment n (S15: n = n + 1), and if n ≠ N (No in S16), return to S12. Also, if n = 1 in S12 (No in S12), the sequence conversion unit 132 is X, S A , S B from y t n to generate (S14). Then, proceed to S15.

[0066] In this way, the sequence conversion unit 132, based on the sequence conversion model, is X, S A , S B and the word sequence from the 1st to (n - 1)th of the output text to generate the word sequence Y^ t from the 1st to nth of the output text.

[0067] Next, a configuration example of the sequence conversion unit 132 will be described with reference to FIG. 5. The sequence conversion unit 132 includes, for example, a first embedding vector calculation unit (input word sequence embedding vector calculation unit) 1321, a second embedding vector calculation unit (output word sequence embedding vector calculation unit) 1322, a context vector calculation unit 1323, a posterior probability calculation unit 1324, and a text generation unit 1325.

[0068] Note that the switching tokens (S A , S B ) can be input to either the first embedding vector calculation unit 1321 or the second embedding vector calculation unit 1322, but it is necessary to input them consistently to the same calculation unit. Therefore, in this case, the sequence conversion unit 132 will be described by taking the case where the switching token is input to the second embedding vector calculation unit 1322 as an example.

[0069] Hereinafter, a case will be described as an example where the sequence conversion unit 132 calculates the posterior probability of the nth word of the output text of the task t controlled by the switching token based on the sequence conversion model, and uses the calculated posterior probability to generate the output text of the task t.

[0070] Note that the parameters θ = {θ h , θu ,θ s ,θ P}. θ h is a parameter used by the first embedding vector calculation unit 1321. u is a parameter used by the second embedding vector calculation unit 1322. s is a parameter used by the context vector calculation unit 1323. p is a parameter used by the posterior probability calculation unit 1324.

[0071] [First embedding vector calculation part] The first embedding vector calculation unit 1321 calculates an embedding vector of a word sequence of the input text.

[0072] For example, the input to the first embedding vector calculation unit 1321 is A sequence of words x1,…,x in the input text m Parameter θ h and the output from the first embedding vector calculation unit 1321 is A word embedding vector sequence h of the input text m The following description will be given taking the case where:

[0073] In this case, the first embedding vector calculation unit 1321 calculates the parameter θ n The transformation function based on m The word embedding vector sequence of the input text h m Convert to.

[0074] An embedding vector is a vector that embeds the information of each word and contains the semantic information of that word in the text. This embedding vector is necessary to convert input text to output text.

[0075] The greater the dimensionality of the embedding vector, the more information can be embedded. For example, the dimensionality of the embedding vector is manually determined as a 512-dimensional vector. In this case, any conversion function can be used as long as it converts a variable-length symbol string into a variable-length vector. For example, the conversion function can be a function that constructs a frequency vector of words in the text, a recurrent neural network, a bidirectional recurrent neural network, or a self-attention mechanism.

[0076] [Second embedding vector calculation part] The second embedding vector calculation unit 1322 calculates embedding vectors of the first (n-1) word sequences of the output text of task t by the sequence conversion unit 132.

[0077] For example, the input to the second embedding vector calculation unit 1322 is Switching token S that controls task A A ∈{[A_on],[A_off]} Switching token S that controls task B B ∈{[B_on],[B_off]} The n-1th word sequence y1 in the output text of task t controlled by switching tokens t ,…,y n-1 t Parameter θ u and the output from the second embedding vector calculation unit 1322 is The word embedding vectors u of the switching tokens and the output text n Consider the case where:

[0078] In this case, the second embedding vector calculation unit 1322 calculates the switching token S A , S B and the n-1th word sequence y1 of the output text of task t t ,…,y n-1 tand the word embedding vector u of the output text is converted by a conversion function based on the parameter θ of the sequence conversion model u The method of converting the embedding vector is the same as the method described in the first embedding vector calculation unit 1321, so a detailed description is omitted. n

[0079] [Context vector calculation unit] The context vector calculation unit 1323 calculates a context vector for converting the n-th word of the output text in consideration of the input text.

[0080] For example, the input to the context vector calculation unit 1323 is · The switching token and the word embedding vector u of the output text output from the second embedding vector calculation unit 1322 n · The series of word embedding vectors h of the input text output from the first embedding vector calculation unit 1321 m · The parameter θ s and the output from the context vector calculation unit 1323 is · The context vector s n Consider the case where it is.

[0081] In this case, the context vector calculation unit 1323 uses the switching tokens S A 、S B and the word embedding vector u of the output text up to the n-th word n and the series of word embedding vectors h of the input text m and converts them into the context vector s s by a conversion function based on the parameter θ. This context vector s n embeds the semantic information necessary for converting the n-th word of the output text in consideration of the input text. n

[0082] ​​Any function may be used as long as this conversion function can convert two types of variable-length vectors into a single vector. For example, a function may be used that provides a recurrent neural network for each of the word sequences of the input text and the output text, respectively, and expresses them as a single context vector by adding an attention mechanism.

[0083] Alternatively, if the conversion function is the simplest, a function may be used that constructs a vector obtained by averaging the frequency vector of the word sequence up to the n-th word of the switching token and the output text, and the frequency vector of the word sequence of the input text. Further, a function may be used that introduces a self-attention mechanism for each of the word sequence of the input text, the switching token, and the word sequence of the output text, and expresses them as a single context vector by adding an attention mechanism.

[0084] [Posterior probability calculation unit] Based on the context vector output from the context vector calculation unit 1323, the posterior probability calculation unit 1324 calculates the posterior probability of the n-th word of the output text.

[0085] For example, the input to the posterior probability calculation unit 1324 is · Context vector s n · Parameter θ p and the output from the posterior probability calculation unit 1324 is · Posterior probability P(y n t |y^1 t ,…,y^ n-1 t ,X,S A ,S B ,θ) for the n-th word of the output text of task t controlled by the switching token. Consider the case where it is

[0086] In this case, for example, the posterior probability calculation unit 1324 n uses the context vector s pThe transformation function based on n t |y^1 t ,…,y^ n-1 t ,X,S A ,S B ,θ).

[0087] The above posterior probabilities can be expressed as vectors with each word as an element, and the posterior probability distribution can be expressed by vector transformation. Any function that converts a vector into a posterior probability distribution can be used as this transformation function, and for example, it can be realized by a function that performs transformation using a softmax function. In addition, any function that can convert the sum of the elements of the output vector corresponding to the posterior probability distribution to 1.0 can be applied.

[0088] [Text generation section] The text generation unit 1325 selects word strings that constitute the output text based on the posterior probabilities of the word strings of the output text output by the posterior probability calculation unit 1324, and generates the output text.

[0089] For example, the input to the text generator 1325 is The posterior probability P(y n t |y^1 t ,…,y^ n-1 t ,X,S A ,S B ,θ) and the output from the text generator 1325 is Output text word sequence Y^ t Consider the case where:

[0090] In this case, for example, the text generator 1325 calculates the posterior probability P(y1 t |X,S A ,SB , θ), …, P(y n t | ŷ1 t …, ŷ n-1 t , X, S A , S B , θ) such that the product of P(y n t | ŷ1 t , …, ŷ n-1 t , X, S A , S B , θ) selects one element (word). As a result, the text generation unit 1325 can generate the word sequence Ŷ of the output text of the task t controlled by the switching token. t can be generated.

[0091] Note that P(y n t | ŷ1 t , …, ŷ n-1 t , X, S A , S B , θ) can use any method as long as it is a method that maximizes P(y n t | ŷ1 t , …, ŷ n-1 t , X, S A , S B , θ). For example, as a method for selecting the above elements, an approximation algorithm such as a greedy method can be considered.

[0092] The sequence conversion unit 132 executes the processing by each of the above units until all the words of the output text are generated.

[0093] According to the conversion device 10 described above, in sequence conversion, even if there is no dataset that simultaneously executes a plurality of conversion tasks, if there are datasets for each conversion task, the sequence conversion model can be learned using those datasets.

[0094] In addition, by the user of the conversion device 10 changing the switching token, the conversion device 10 can output the execution result of the conversion task desired by the user by means of a single sequence conversion model.

[0095] Furthermore, even when there is a small amount of dataset for handling the overall problem, if there is a dataset for handling partial problems, the conversion device 10 can use the switching token to learn the sequence conversion model using those datasets. Thereby, performance improvement of the sequence conversion model can also be expected in the case of learning the sequence conversion model using the overall problem of the conversion device 10.

[0096] [System configuration, etc.] Moreover, each component of each part shown in the figure is a functional concept, and it is not necessarily physically configured as shown in the figure. That is, the specific form of the distribution and integration of each device is not limited to that shown in the figure, and all or part of it can be functionally or physically distributed and integrated in any unit according to various loads, usage situations, etc. Furthermore, each processing function performed by each device can be realized in whole or in any part by a CPU and a program executed by the CPU, or can be realized as hardware by wired logic.

[0097] In addition, among the processes described in the above-described embodiments, all or part of the processes described as being automatically performed can be manually performed, or all or part of the processes described as being manually performed can be automatically performed by a known method. In addition, regarding the processing procedures, control procedures, specific names, information including various data and parameters shown in the above documents and drawings, they can be arbitrarily changed unless otherwise specified.

[0098] [Program] The above-described conversion device 10 can be implemented by installing a program (conversion program) as package software or online software on a desired computer. For example, by causing the information processing device to execute the above program, the information processing device can function as the conversion device 10. The information processing devices mentioned here include mobile communication terminals such as smartphones, mobile phones, and PHS (Personal Handyphone System), and further include terminals such as PDAs (Personal Digital Assistants).

[0099] FIG. 6 is a diagram showing an example of a computer that executes a conversion program. The computer 1000 has, for example, a memory 1010 and a CPU 1020. The computer 1000 also has a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These components are connected by a bus 1080.

[0100] The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM (Random Access Memory) 1012. The ROM 1011 stores a boot program such as a BIOS (Basic Input Output System), for example. The hard disk drive interface 1030 is connected to the hard disk drive 1090. The disk drive interface 1040 is connected to the disk drive 1100. A removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100, for example. The serial port interface 1050 is connected to, for example, a mouse 1110 and a keyboard 1120. The video adapter 1060 is connected to, for example, a display 1130.

[0101] The hard disk drive 1090 stores, for example, the OS 1091, application programs 1092, program modules 1093, and program data 1094. That is, the programs that define each process executed by the above-described conversion device 10 are implemented as program modules 1093 in which computer-executable code is described. The program modules 1093 are stored, for example, in the hard disk drive 1090. For example, program modules 1093 for executing processes similar to the functional configuration in the conversion device 10 are stored in the hard disk drive 1090. Note that the hard disk drive 1090 may be replaced by an SSD (Solid State Drive).

[0102] Also, the data used in the processes of the above-described embodiments is stored as program data 1094, for example, in the memory 1010 or the hard disk drive 1090. Then, the CPU 1020 reads out the program modules 1093 and program data 1094 stored in the memory 1010 or the hard disk drive 1090 to the RAM 1012 and executes them as necessary.

[0103] Note that the program modules 1093 and program data 1094 are not limited to being stored in the hard disk drive 1090, and may be stored, for example, in a removable storage medium and read by the CPU 1020 via a disk drive 1100 or the like. Alternatively, the program modules 1093 and program data 1094 may be stored in another computer connected via a network (such as a LAN (Local Area Network) or a WAN (Wide Area Network)). Then, the program modules 1093 and program data 1094 may be read by the CPU 1020 from another computer via the network interface 1070.

Explanation of Reference Numerals

[0104] 10 Conversion device 11 Input / output unit 12 Memory unit 13 Control unit 131 Input unit 132 Series conversion unit 133 Parameter learning unit 134 Output unit 1321 First embedding vector calculation unit 1322 Second embedding vector calculation unit 1323 Context vector calculation unit 1324 Posterior probability calculation unit 1325 Text generation unit

Claims

1. An input unit that receives an input of a dataset in which, for each conversion task of a word sequence, correct data when the conversion task is executed on the word sequence is associated with text information of a switching token for turning on the conversion task and turning off other conversion tasks; A learning unit that uses the dataset to learn parameters of a sequence conversion model that executes a plurality of conversion tasks while switching using the switching token for an input word sequence; A sequence conversion unit that inputs a word sequence to be converted and a switching token indicating a plurality of conversion tasks to be executed on the word sequence into the sequence conversion model in which the parameters are learned, and executes the plurality of conversion tasks while switching for the word sequence to be converted; An output unit that outputs execution results of the plurality of conversion tasks for the word sequence to be converted A conversion device characterized by comprising the above.

2. The dataset Further includes information in which correct data when no conversion task is executed on the word sequence is associated with text information of a switching token for turning off all conversion tasks The conversion device according to claim 1, characterized by the above.

3. A conversion method executed by a conversion device, comprising: A step of receiving an input of a dataset in which, for each conversion task of a word sequence, correct data when the conversion task is executed on the word sequence is associated with text information of a switching token for turning on the conversion task and turning off other conversion tasks; A step of using the dataset to learn parameters of a sequence conversion model that executes a plurality of conversion tasks while switching using the switching token for an input word sequence; A step of inputting a word sequence to be converted and a switching token indicating a plurality of conversion tasks to be executed on the word sequence into the sequence conversion model in which the parameters are learned, and executing the plurality of conversion tasks while switching for the word sequence to be converted; A step of outputting execution results of the plurality of conversion tasks for the word sequence to be converted A conversion method characterized by including the above.

4. For each word sequence conversion task, a step of receiving an input of a dataset in which correct data when the conversion task is executed on the word sequence is associated with text information of a switching token for turning on the conversion task and turning off other conversion tasks; A step of learning parameters of a sequence conversion model that executes a plurality of conversion tasks while switching using the switching token on an input word sequence using the dataset; A step of executing, for the word sequence to be converted, a plurality of conversion tasks while switching, by inputting the word sequence to be converted and a switching token indicating a plurality of conversion tasks to be executed on the word sequence into the sequence conversion model in which the parameters have been learned; A step of outputting execution results of the plurality of conversion tasks for the word sequence to be converted; A conversion program for causing a computer to execute the above.

Citation Information

Patent Citations

  • Document analysis device, learning device, document analysis method, and learning method

    JP2020184157A

  • Learning method, learning program, and learning device

    WO2021038886A1