WO2020022328A1 - 文生成装置、モデル学習装置、文生成方法、モデル学習方法、及びプログラム - Google Patents

文生成装置、モデル学習装置、文生成方法、モデル学習方法、及びプログラム Download PDF

Info

Publication number
WO2020022328A1
WO2020022328A1 PCT/JP2019/028837 JP2019028837W WO2020022328A1 WO 2020022328 A1 WO2020022328 A1 WO 2020022328A1 JP 2019028837 W JP2019028837 W JP 2019028837W WO 2020022328 A1 WO2020022328 A1 WO 2020022328A1
Authority
WO
WIPO (PCT)
Prior art keywords
sentence
word
paraphrase
model
input
Prior art date
Application number
PCT/JP2019/028837
Other languages
English (en)
French (fr)
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 to US17/262,512 priority Critical patent/US11403469B2/en
Publication of WO2020022328A1 publication Critical patent/WO2020022328A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/42Data-driven translation
    • G06F40/44Statistical methods, e.g. probability models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/55Rule-based translation
    • G06F40/56Natural language generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • the present invention relates to a sentence generation device, a model learning device, a sentence generation method, a model learning method, and a program, in particular, a sentence generation device for generating a paraphrase sentence or a non-paraphrase sentence, a model learning device, a sentence generation method, It relates to a model learning method and a program.
  • Non-Patent Document 1 a machine learning model in which three sentences of two sentences and a label indicating whether or not the sentence pair has a paraphrase relationship as learning data is used as a learning data to determine whether a sentence to be determined is a paraphrase sentence of another sentence.
  • a technique for determining whether or not it is For example, there is a technique for determining whether question sentences 1 and 2 are paraphrase sentences using a model using a neural network (Non-Patent Document 1).
  • the present invention has been made in view of the above points, and is a paraphrase sentence in which local words and phrases are different but have similar meanings, or a non-paraphrase sentence in which the whole sentence is similar but not paraphrase. It is an object of the present invention to provide a sentence generation device, a sentence generation method, and a program that can generate a sentence.
  • the present invention is a model learning device, a model learning method, which can learn a model for generating a paraphrase sentence having a similar meaning, or a non-paraphrase sentence having a similar meaning but not a paraphrase in the entire sentence. And to provide programs.
  • the sentence generation apparatus is a positive example model for generating a paraphrase sentence by deleting a word, which is learned based on a positive example consisting of a sentence and a paraphrase sentence of the sentence, or Using a negative example model for generating a non-paraphrase sentence by deleting words, learned based on a negative example consisting of a non-paraphrase sentence of the sentence, for each of the words constituting the input sentence, And an estimator for estimating the word deletion probability of.
  • the sentence generation method wherein the estimating unit learns based on a positive example composed of a sentence and a paraphrase sentence of the sentence, and a positive example model for generating a paraphrase sentence by deleting a word. Or a word constituting an input sentence, using a negative example model for generating a non-paraphrase sentence by deleting a word, learned based on a negative example consisting of the sentence and a non-paraphrase sentence of the sentence , The word deletion probability of the word is estimated.
  • the estimating unit generates a paraphrase sentence by deleting a word learned based on a positive example including a sentence and a paraphrase sentence of the sentence.
  • a positive example model for generating a paraphrase sentence by deleting a word which is learned based on a positive example including a sentence and a paraphrase sentence of the sentence, or a non-paraphrase sentence of the sentence and the paraphrase sentence of the sentence
  • a negative example model for generating a non-paraphrase sentence by deleting a word which is learned based on the negative example consisting of By estimation, it is possible to generate a paraphrase sentence having a difference in the local word / phrase but similar in meaning, or a non-paraphrase sentence in which the meaning in the entire sentence is similar but not paraphrase.
  • the estimating unit of the sentence generation device for each of the words constituting the input sentence, giving the word deletion probability of the word using the positive example model, and the negative example model
  • the word deletion probability of the word is given by using the word deletion probability given using the positive example model of the word for each of the words constituting the input sentence at a predetermined first threshold or more. And if the word deletion probability given using the negative example model of the word is equal to or less than a predetermined second threshold, the word is deleted from the input sentence and the paraphrase sentence of the input sentence is deleted.
  • the word deletion probability given using the positive example model of the word is equal to or less than a predetermined first threshold
  • the word of the word Negative example a deletion unit that deletes the word from the input sentence and sets the word as a non-paraphrase sentence of the input sentence when the word deletion probability assigned using the input sentence is equal to or greater than a predetermined second threshold. it can.
  • the model learning apparatus includes a sentence pair and a paraphrase label indicating that one sentence is a positive example indicating that it is a paraphrase sentence of the other sentence or a negative example indicating that it is a non-paraphrase sentence.
  • an input unit that accepts input of learning data consisting of a set of and by calculating word alignment between the sentence pairs, thereby deleting each word of the sentence pair when there is no word alignment destination.
  • the output matches the deleted label and the non-deleted label given to the sentence by the alignment unit when the input is
  • a positive example model for generating a paraphrase sentence by deleting a word is learned, or is paired with a paraphrase label indicating that the sentence processed by the alignment unit is the negative example.
  • Negative example for generating a non-paraphrase sentence by deleting a word so that the output matches the deleted label and the non-deleted label given to the sentence by the alignment unit
  • a learning unit for learning the model.
  • the model learning method according to the present invention is a negative example that indicates that the input unit is a pair of sentences and a positive example indicating that one sentence is a paraphrase sentence of the other sentence or a non-paraphrase sentence.
  • Input of learning data consisting of a pair with a paraphrase label indicating that the alignment unit calculates the alignment of the word between the sentence pair, so that, for each of the words of the sentence pair, A deletion label is assigned when there is no alignment destination, and a non-deletion label is assigned when there is an alignment destination of the word, and the learning unit is the correct example among the sentences processed by the alignment unit.
  • an input is made with a paraphrase label that indicates the delete label and the non-delete label assigned to the sentence by the alignment unit.
  • a positive example model for generating a paraphrase sentence by deleting a word so as to match the word, or a paraphrase label indicating that the sentence processed by the alignment unit is the negative example.
  • a non-paraphrase sentence is generated by deleting a word so that when the input that has been paired with is input, the output matches the deleted label and the non-deleted label given to the sentence by the alignment unit.
  • the input unit indicates that the sentence pair is a positive example or a non-paraphrase sentence indicating that one sentence is a paraphrase sentence of the other sentence.
  • the alignment unit calculates the alignment of the word between the sentence pair, for each of the words of the sentence pair, When there is no alignment destination of the word, a deletion label is given, and when there is an alignment destination of the word, a non-deletion label is given.
  • the learning unit receives a sentence processed by the alignment unit that is paired with a paraphrase label indicating a positive example
  • the output is deleted by the alignment unit.
  • a non-paraphrase sentence is generated by deleting a word so that the output matches the deleted label and the non-deleted label given to the sentence by the alignment unit. Learn the negative example model.
  • a deletion label is assigned to each sentence word when there is no alignment destination for the word, and when there is an alignment destination for the word,
  • the output is the deleted label and the non-delete assigned to the sentence by the alignment unit.
  • a negative example model for generating a sentence it is possible to learn a model for generating a paraphrase sentence having a similar meaning or a non-paraphrase sentence having a similar meaning but not a paraphrase in the entire sentence. it can.
  • the positive example model or the negative example model of the sentence generation device according to the present invention can be learned in advance by the model learning device.
  • a program according to the present invention is a program for functioning as each unit of the above sentence generation device or model learning device.
  • a paraphrase sentence having a difference in local words and phrases but similar in meaning, or a non-paraphrase in which the meaning in the entire sentence is similar but not in other words Paraphrase sentences can be generated.
  • a model for generating a paraphrase sentence having a similar meaning or a non-paraphrase sentence having a similar meaning but not a paraphrase in the entire sentence is created. You can learn.
  • FIG. 1 is a block diagram illustrating a configuration of a sentence generation system according to an embodiment of the present invention. It is a figure showing an example of learning data in a model learning device concerning an embodiment of the invention. It is an image figure showing an example of the alignment result in the model learning device concerning an embodiment of the invention.
  • FIG. 7 is an image diagram showing an example of data to which a deletion label and a non-deletion label are added in the model learning device according to the embodiment of the present invention. It is an image figure showing an example of input and output of a positive example model and a negative example model in a model learning device concerning an embodiment of the invention. It is an image figure showing an example of composition of a positive example model and a negative example model in a model learning device concerning an embodiment of the invention.
  • 5 is a flowchart illustrating a model learning processing routine of the model learning device according to the embodiment of the present invention.
  • 5 is a flowchart illustrating a sentence generation processing routine of the sentence generation device according to the embodiment of the present invention.
  • FIG. 1 is a block diagram showing a configuration of a sentence generation system 1 according to the embodiment of the present invention.
  • the sentence generation system 1 includes a model learning device 10 and a sentence generation device 20.
  • the model learning device 10 is configured by a computer including a CPU, a RAM, and a ROM storing a program for executing a model learning processing routine described later, and is functionally configured as follows. .
  • the model learning device 10 includes an input unit 11, an alignment unit 12, and a learning unit 13.
  • the input unit 11 includes a pair of a sentence pair and a paraphrase label indicating a positive example indicating that one sentence is a paraphrase sentence of the other sentence or a negative example indicating that it is a non-paraphrase sentence. Accept input of learning data.
  • a paraphrase sentence of a certain sentence is a sentence whose meaning is similar to the sentence
  • a non-paraphrase sentence of a certain sentence is a sentence whose meaning in the whole sentence is similar to the sentence but is not a paraphrase. That is.
  • the sentence pair included in the learning data is a sentence pair having a relationship of being a paraphrase sentence or a non-paraphrase sentence. For example, a sentence pair in which the ratio of the corresponding word between the sentence pair is equal to or more than a predetermined ratio Is a pair.
  • the paraphrase label is 1 when one sentence is a paraphrase of the other sentence, and is 0 when one sentence is a non-paraphrase of the other sentence (that is, when it is not a paraphrase). (Fig. 2).
  • the first sentence of the received learning data is "what @ are @ natural @ numbers ??”
  • the second sentence is "what @ is @ a @ last @ natural @ number @?”
  • the paraphrase label is "0"
  • one sentence is the other. This means that the sentence is not paraphrased.
  • the input unit 11 passes the received learning data to the alignment unit 12 and the learning unit 13.
  • the alignment unit 12 calculates word alignment between the first sentence and the second sentence, assigns a deletion label to each word of the second sentence when there is no alignment destination of the word, and Add a non-deletion label when there is an alignment destination.
  • the alignment unit 12 first obtains alignment between words in the first sentence and the second sentence using an arbitrary alignment method (for example, word2vec in Reference 1) (FIG. 3).
  • an arbitrary alignment method for example, word2vec in Reference 1
  • FIG. 3 [Reference 1] Yangqiu Song and Dan Roth, "Unsupervised Sparse Vector Densification for Short Text Similarity".
  • the alignment unit 12 specifies the word as a deleted word for each word of the second sentence from the alignment between the words of the first sentence and the second sentence when there is no alignment destination of the word. If there is an alignment destination for the word, the word is specified as a non-deleted word.
  • the alignment unit 12 since there is no alignment destination for “a” and “least” in the second sentence, the alignment unit 12 specifies “a” and “least” as deletion words. On the other hand, since there is an alignment destination for other words, the alignment unit 12 specifies the other words as non-deleted words.
  • the alignment unit 12 generates data (FIG. 4) in which a deleted word corresponding to the first sentence has a deletion label (1) and a non-deletion word has a non-deletion label (0).
  • the alignment unit 12 assigns a deletion label to each word of the first sentence when there is no alignment destination of the word based on the calculation result of the alignment of the word between the first sentence and the second sentence.
  • a non-deleted label is added (FIG. 4).
  • the two data, the data generated for the first sentence and the data generated for the second sentence are subject to the following processing as irrelevant data.
  • the alignment unit 12 passes the generated data to the learning unit 13.
  • the input is a negative example model for generating a non-paraphrase sentence by deleting a word
  • the output matches the deleted label and the non-deleted label given to the sentence by the alignment unit 12.
  • a negative example model is learned.
  • the parameters of the positive example model are learned so that “0” matches the deleted label and the non-deleted label “0 0 1 1 0 0 0” assigned to the sentence by the alignment unit 12.
  • the positive example model is for generating a paraphrase sentence by deleting a word, and is learned using data for learning the positive example model (learning data with a paraphrase label of 1).
  • the positive example model is not particularly limited as long as it calculates a word deletion probability for each word included in the sentence as an input and estimates a deletion label of the word for each word included in the sentence. Can be adopted.
  • a recurrent neural network such as Bidirectional @ LSTM as shown in FIG. 6 can be used.
  • the learned positive example model outputs a list of deletion scores for each word of the sentence.
  • the negative example model is learned from data for learning the negative example model (training data with a paraphrase of 0).
  • the learning unit 13 stores the learned positive example model and negative example model in the storage unit 23.
  • the learning unit 13 may be configured to learn only the positive example model or may be configured to learn only the negative example model.
  • the sentence generation device 20 is a sentence generation device that generates a non-paraphrase sentence for an input sentence, and includes a CPU, a RAM, and a ROM that stores a program for executing a sentence generation processing routine described later.
  • the computer is configured as follows.
  • the sentence generation device 20 includes an input unit 21, an estimation unit 22, a storage unit 23, a deletion unit 24, and an output unit 25.
  • the input unit 21 receives an input sentence and passes the received input sentence to the estimating unit 22.
  • the estimation unit 22 gives a word deletion probability of the word using a positive example model and a word deletion probability of the word using a negative example model for each of the words constituting the input sentence.
  • the estimating unit 22 first obtains the positive example model and the negative example model stored in the storage unit 23. Next, the estimating unit 22 calculates the word deletion probability of a word included in the input sentence using the input sentence as an input using a positive example model, and inputs the input sentence as an input using a negative example model. Calculate the word deletion probability of the words included in the sentence.
  • the word deletion probability output from the positive example model is “0.1 0.3 0.4 0”. 0.2 0.1 0.3 0.25 ”, and the word deletion probability output from the negative example model is“ 0.2 0.5 0.4 0.4 0.1 0.7 0.65 ”. Is calculated.
  • the estimating unit 22 gives the input sentence the estimated word deletion probability of the positive example model and the estimated word deletion probability of the negative example model, and passes them to the deletion unit 24.
  • the storage unit 23 stores the positive example model and the negative example model learned by the model learning device 10.
  • the deletion unit 24 determines that the word deletion probability given using the positive example model of the word is equal to or less than a predetermined first threshold value, and that the negative example model of the word is When the word deletion probability given by using is equal to or more than a predetermined second threshold value, the word is deleted from the input sentence to be a non-paraphrase sentence of the input sentence.
  • the deletion unit 24 determines that the word deletion probability of the positive example model is 0.3 or less and the negative example model "For" and "psorisis” are deleted from the input sentence, and "who @ is @ the @ best @ treatment @?" Is a non-paraphrase sentence.
  • a non-paraphrase sentence can be generated.
  • the deletion unit 24 passes the generated non-paraphrase sentence to the output unit 25.
  • the output unit 25 outputs the generated non-paraphrase sentence.
  • the output unit 25 outputs a non-paraphrase sentence together with an input sentence to a learning device that learns a determination model for determining whether two sentences are paraphrased.
  • the learning device learns the judgment model by using the non-paraphrase sentence automatically generated by the sentence generation device 20, the non-paraphrase sentence having the similar meaning in the entire sentence can be used as the learning data. Therefore, a judgment model with high judgment accuracy can be learned.
  • FIG. 8 is a flowchart showing a model learning processing routine according to the embodiment of the present invention.
  • model learning apparatus 10 executes a model learning processing routine shown in FIG.
  • step S100 the input unit 11 generates a sentence pair and a paraphrase indicating that one sentence is a positive example indicating that it is a paraphrase sentence of the other sentence or a negative example indicating that it is a non-paraphrase sentence. Accepts input of learning data consisting of pairs with labels.
  • step S110 the alignment unit 12 calculates word alignment between the sentence pairs, assigns a deletion label to each word of each sentence when there is no alignment destination of the word, and assigns a deletion label to the alignment destination of the word. When there is, a non-deletion label is assigned.
  • the output is the deletion label and the non-deletion label assigned to the sentence in step S110. Train the negative example model to match.
  • step S130 the learning unit 13 determines whether the learning has converged.
  • step S130 If it is determined that the learning has not converged (YES in step S130), the process returns to step S100, and the processes in steps S100 to S120 are performed.
  • step S140 the learning unit 13 stores the learned negative example model in the storage unit 23.
  • the pair is used as an input of a positive example model for generating a paraphrase sentence by deleting a word, the output matches the deleted label and the non-deleted label given to the sentence in step S110. To learn the positive example model.
  • step S140 the learning unit 13 stores the learned positive example model in the storage unit 23.
  • FIG. 9 is a flowchart showing a sentence generation processing routine according to the embodiment of the present invention.
  • the sentence generation device 20 executes a sentence generation processing routine shown in FIG.
  • step S200 the estimation unit 22 acquires the positive example model and the negative example model stored in the storage unit 23.
  • step S210 the input unit 21 receives an input of an input sentence.
  • step S220 the estimating unit 22 assigns a word deletion probability to each of the words constituting the input sentence using a positive example model.
  • step S230 the estimating unit 22 assigns, for each of the words constituting the input sentence, the word deletion probability of the word using a negative example model.
  • Step S220 and step S230 are not in any particular order, and the process of step S220 may be performed after step S230.
  • step S240 for each of the words constituting the input sentence, the deletion unit 24 determines that the word deletion probability given using the positive example model of the word is equal to or less than a predetermined first threshold value, and When the word deletion probability given by using the negative example model is equal to or greater than a predetermined second threshold value, the word is deleted from the input sentence to be a non-paraphrase sentence of the input sentence.
  • step S250 the output unit 25 outputs the non-paraphrase sentence generated in step S240.
  • a paraphrase sentence is generated by deleting a word learned based on a positive example including a sentence and a paraphrase sentence of the sentence.
  • a positive example model for learning or a negative example model for generating a non-paraphrase sentence by deleting a word which is learned based on a negative example composed of the sentence and a non-paraphrase sentence of the sentence.
  • By estimating the word deletion probability of each word constituting the sentence it is possible to generate a paraphrase sentence having a similar meaning or a non-paraphrase sentence having a similar meaning but not a paraphrase in the entire sentence. it can.
  • the model learning apparatus by calculating word alignment between a pair of sentences, for each of the words of the sentence, when there is no alignment destination of the word, the deletion label is deleted. If the word has an alignment destination, a non-deletion label is added, and when a sentence paired with a paraphrase label indicating a positive example is input, the output is an alignment unit.
  • a positive example model for generating a paraphrase sentence by deleting a word so as to match the deleted label and the non-deleted label given to the sentence, or a paraphrase indicating that the sentence is a negative example When the input that was paired with the label is input, the output matches the deleted label and the non-deleted label given to the sentence by the alignment unit.
  • Model for learning By learning a negative example model for generating a non-paraphrase sentence by deleting words, a non-paraphrase sentence having a similar meaning, or a non-paraphrase sentence having a similar meaning but not a paraphrase in the entire sentence is generated. Model for learning.
  • the meaning of the entire sentence generated by the sentence generation device 20 according to the present embodiment is similar. Can use a non-paraphrase sentence to learn a judgment model with high judgment accuracy. When judging whether two sentences are paraphrased using the judgment model learned in this way, it is possible to make an accurate judgment.
  • the sentence generation device 20 is configured to generate a non-paraphrase sentence for an input sentence, but is not limited thereto. It can be configured to generate a paraphrase sentence.
  • the deletion unit 24 determines that the word deletion probability given using the positive example model of the word is equal to or greater than a predetermined first threshold value, and the negative value of the word is negative.
  • the word deletion probability given by using the example model is equal to or less than a predetermined second threshold value, the word is deleted from the input sentence and used as a paraphrase sentence of the input sentence.
  • the deletion unit 24 can be configured to use only the word deletion probability of the negative example model.
  • the estimation unit 22 assigns the word deletion probability of the negative example model to each word using only the negative example model, and the deletion unit 24 determines that the word deletion probability of the negative example model is greater than or equal to the second threshold. If there is, delete the word.
  • the model learning device only the negative example model needs to be learned.
  • the deletion unit 24 can be configured to use only the word deletion probability of the positive example model.
  • the estimation unit 22 assigns the word deletion probability of the positive example model to each word using only the positive example model, and the deletion unit 24 determines that the word deletion probability of the positive example model is equal to or greater than the first threshold. If there is, delete the word.
  • the model learning device only the positive example model needs to be learned.
  • the sentence generation device 20 is a device that omits the deletion unit 24 and generates a sentence to which the word deletion probability of the word is assigned by using the positive example model for each of the words constituting the input sentence by the estimation unit 22. You may comprise. Similarly, the sentence generation device 20 omits the deletion unit 24 and, for each of the words forming the input sentence, uses the negative example model to generate a sentence to which the word deletion probability of the word is assigned by the estimation unit 22. It may be constituted as.
  • the sentence generation device 20 omits the deletion unit 24, generates a sentence to which the word deletion probability of the word is given by using the positive example model for each of the words constituting the input sentence by the estimation unit 22, It may be configured as a device that generates a sentence to which the word deletion probability of the word is assigned using the negative example model.
  • the embodiment has been described in which the program is installed in advance.
  • the program may be stored in a computer-readable recording medium and provided.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Machine Translation (AREA)

Abstract

局所的な単語・フレーズに差があるが意味は似ている言い換え文、又は文全体での意味が似ているが言い換えでない非言い換え文を生成することができるようにする。 推定部22が、文と当該文の言い換え文とからなる正例に基づいて学習された、単語を削除することにより言い換え文を生成するための正例モデル、又は当該文と当該文の非言い換え文とからなる負例に基づいて学習された、単語を削除することにより非言い換え文を生成するための負例モデルを用いて、入力文を構成する単語の各々について、当該単語の単語削除確率を推定する。

Description

文生成装置、モデル学習装置、文生成方法、モデル学習方法、及びプログラム
 本発明は、文生成装置、モデル学習装置、文生成方法、モデル学習方法、及びプログラムに係り、特に、言い換え文又は非言い換え文を生成するための文生成装置、モデル学習装置、文生成方法、モデル学習方法、及びプログラムに関する。
 従来より、2つの文と、その文ペアが言い換え関係にあるか否かを表すラベルの3つ組を学習データとして予め学習された機械学習モデルにより、判定対象文が他の文の言い換え文か否かを判定する技術がある。例えば、ニューラルネットワークを用いたモデルを用いて、質問文1と質問文2が言い換え文か否かを判定する技術がある(非特許文献1)。
 しかし、従来の手法では、言い換え文判定を行うために、言い換え文か否かを示す言い換えラベルがアノテーションされたデータ(例えば、図2のis_dupulicateのような0又は1の情報)を大量に用意する必要がある。このため、すべての言い換え表現を人手アノテーションするためには膨大なコストがかかる、という問題があった。
 特に、単語や文全体での意味が似ているが局所的な単語・フレーズの差のみで異なる意味になってしまうような場合、それらを網羅するアノテーション済みデータを人手で用意することができない、という問題があった。
 本発明は上記の点に鑑みてなされたものであり、局所的な単語・フレーズに差があるが意味は似ている言い換え文、又は文全体での意味が似ているが言い換えでない非言い換え文を生成することができる文生成装置、文生成方法、及びプログラムを提供することを目的とする。
 また、本発明は、意味が似ている言い換え文、又は文全体での意味が似ているが言い換えでない非言い換え文を生成するためのモデルを学習することができるモデル学習装置、モデル学習方法、及びプログラムを提供することを目的とする。
 本発明に係る文生成装置は、文と前記文の言い換え文とからなる正例に基づいて学習された、単語を削除することにより言い換え文を生成するための正例モデル、又は前記文と前記文の非言い換え文とからなる負例に基づいて学習された、単語を削除することにより非言い換え文を生成するための負例モデルを用いて、入力文を構成する単語の各々について、前記単語の単語削除確率を推定する推定部を備えて構成される。
 また、本発明に係る文生成方法は、推定部が、文と前記文の言い換え文とからなる正例に基づいて学習された、単語を削除することにより言い換え文を生成するための正例モデル、又は前記文と前記文の非言い換え文とからなる負例に基づいて学習された、単語を削除することにより非言い換え文を生成するための負例モデルを用いて、入力文を構成する単語の各々について、前記単語の単語削除確率を推定する。
 本発明に係る文生成装置及び文生成方法によれば、推定部が、文と当該文の言い換え文とからなる正例に基づいて学習された、単語を削除することにより言い換え文を生成するための正例モデル、又は当該文と当該文の非言い換え文とからなる負例に基づいて学習された、単語を削除することにより非言い換え文を生成するための負例モデルを用いて、入力文を構成する単語の各々について、当該単語の単語削除確率を推定する。
 このように、文と当該文の言い換え文とからなる正例に基づいて学習された、単語を削除することにより言い換え文を生成するための正例モデル、又は当該文と当該文の非言い換え文とからなる負例に基づいて学習された、単語を削除することにより非言い換え文を生成するための負例モデルを用いて、入力文を構成する単語の各々について、当該単語の単語削除確率を推定することにより、局所的な単語・フレーズに差があるが意味は似ている言い換え文、又は文全体での意味が似ているが言い換えでない非言い換え文を生成することができる。
 また、本発明に係る文生成装置の前記推定部は、前記入力文を構成する単語の各々について、前記正例モデルを用いて前記単語の前記単語削除確率を付与すると共に、前記負例モデルを用いて前記単語の前記単語削除確率を付与し、前記入力文を構成する単語の各々について、前記単語の前記正例モデルを用いて付与された前記単語削除確率が予め定めた第1閾値以上であり、かつ、前記単語の前記負例モデルを用いて付与された前記単語削除確率が予め定めた第2閾値以下である場合に、前記単語を前記入力文から削除して前記入力文の言い換え文とする、又は、前記入力文を構成する単語の各々について、前記単語の前記正例モデルを用いて付与された前記単語削除確率が予め定めた第1閾値以下であり、かつ、前記単語の前記負例モデルを用いて付与された前記単語削除確率が予め定めた第2閾値以上である場合に、前記単語を前記入力文から削除して前記入力文の非言い換え文とする削除部を更に備えることができる。
 本発明に係るモデル学習装置は、文のペアと、一方の文が他方の文の言い換え文となることを示す正例又は非言い換え文となることを示す負例であることを示す言い換えラベルとの組からなる学習データの入力を受け付ける入力部と、 前記文のペアの間で単語のアラインメントを計算することにより、前記文のペアの単語の各々について、前記単語のアラインメント先が無い場合に削除ラベルを付与し、前記単語のアラインメント先がある場合に非削除ラベルを付与するアラインメント部と、前記アラインメント部により処理された前記文のうち、前記正例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力が前記アラインメント部により前記文に付与された前記削除ラベル及び前記非削除ラベルと一致するように、単語を削除することにより言い換え文を生成するための正例モデルを学習し、又は前記アラインメント部により処理された前記文のうち、前記負例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力が前記アラインメント部により前記文に付与された前記削除ラベル及び前記非削除ラベルと一致するように、単語を削除することにより非言い換え文を生成するための負例モデルを学習する学習部と、を備えて構成される。
 また、本発明に係るモデル学習方法は、入力部が、文のペアと、一方の文が他方の文の言い換え文となることを示す正例又は非言い換え文となることを示す負例であることを示す言い換えラベルとの組からなる学習データの入力を受け付け、アラインメント部が、前記文のペアの間で単語のアラインメントを計算することにより、前記文のペアの単語の各々について、前記単語のアラインメント先が無い場合に削除ラベルを付与し、前記単語のアラインメント先がある場合に非削除ラベルを付与し、学習部が、前記アラインメント部により処理された前記文のうち、前記正例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力が前記アラインメント部により前記文に付与された前記削除ラベル及び前記非削除ラベルと一致するように、単語を削除することにより言い換え文を生成するための正例モデルを学習し、又は前記アラインメント部により処理された前記文のうち、前記負例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力が前記アラインメント部により前記文に付与された前記削除ラベル及び前記非削除ラベルと一致するように、単語を削除することにより非言い換え文を生成するための負例モデルを学習する。
 本発明に係るモデル学習装置及びモデル学習方法によれば、入力部が、文のペアと、一方の文が他方の文の言い換え文となることを示す正例又は非言い換え文となることを示す負例であることを示す言い換えラベルとの組からなる学習データの入力を受け付け、アラインメント部が、文のペアの間で単語のアラインメントを計算することにより、当該文のペアの単語の各々について、当該単語のアラインメント先が無い場合に削除ラベルを付与し、当該単語のアラインメント先がある場合に非削除ラベルを付与する。
 そして、学習部が、アラインメント部により処理された文のうち、正例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力がアラインメント部により当該文に付与された削除ラベル及び非削除ラベルと一致するように、単語を削除することにより言い換え文を生成するための正例モデルを学習し、又はアラインメント部により処理された文のうち、負例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力がアラインメント部により文に付与された削除ラベル及び非削除ラベルと一致するように、単語を削除することにより非言い換え文を生成するための負例モデルを学習する。
 このように、文のペアの間で単語のアラインメントを計算することにより、文の単語の各々について、当該単語のアラインメント先が無い場合に削除ラベルを付与し、当該単語のアラインメント先がある場合に非削除ラベルを付与し、当該文のうち、正例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力がアラインメント部により当該文に付与された削除ラベル及び非削除ラベルと一致するように、単語を削除することにより言い換え文を生成するための正例モデルを学習し、又は当該文のうち、負例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力がアラインメント部により文に付与された削除ラベル及び非削除ラベルと一致するように、単語を削除することにより非言い換え文を生成するための負例モデルを学習することにより、意味が似ている言い換え文、又は文全体での意味が似ているが言い換えでない非言い換え文を生成するためのモデルを学習することができる。
 また、本発明に係る文生成装置の前記正例モデル又は前記負例モデルは、上記のモデル学習装置によって予め学習されることができる。
 本発明に係るプログラムは、上記の文生成装置又はモデル学習装置の各部として機能させるためのプログラムである。
 本発明の文生成装置、文生成方法、及びプログラムによれば、局所的な単語・フレーズに差があるが意味は似ている言い換え文、又は文全体での意味が似ているが言い換えでない非言い換え文を生成することができる。
 また、本発明のモデル学習装置、モデル学習方法、及びプログラムによれば、意味が似ている言い換え文、又は文全体での意味が似ているが言い換えでない非言い換え文を生成するためのモデルを学習することができる。
本発明の実施の形態に係る文生成システムの構成を示すブロック図である。 本発明の実施の形態に係るモデル学習装置における学習データの一例を示す図である。 本発明の実施の形態に係るモデル学習装置におけるアライメント結果の一例を示すイメージ図である。 本発明の実施の形態に係るモデル学習装置における削除ラベル・非削除ラベルを付与したデータの一例を示すイメージ図である。 本発明の実施の形態に係るモデル学習装置における正例モデル・負例モデルの入出力の一例を示すイメージ図である。 本発明の実施の形態に係るモデル学習装置における正例モデル・負例モデルの構成の一例を示すイメージ図である。 本発明の実施の形態に係る文生成装置における入力文に単語削除確率を付した一例を示すイメージ図である。 本発明の実施の形態に係るモデル学習装置のモデル学習処理ルーチンを示すフローチャートである。 本発明の実施の形態に係る文生成装置の文生成処理ルーチンを示すフローチャートである。
 以下、本発明の実施の形態について図面を用いて説明する。
<本発明の実施の形態に係る文生成システムの構成>
 図1を参照して、本発明の実施の形態に係る文生成システム1の構成について説明する。図1は、本発明の実施の形態に係る文生成システム1の構成を示すブロック図である。
 文生成システム1は、モデル学習装置10と、文生成装置20とを備えて構成される。
 モデル学習装置10は、CPUと、RAMと、後述するモデル学習処理ルーチンを実行するためのプログラムを記憶したROMとを備えたコンピュータで構成され、機能的には次に示すように構成されている。
 図1に示すように、本実施形態に係るモデル学習装置10は、入力部11と、アラインメント部12と、学習部13とを備えて構成される。
 入力部11は、文のペアと、一方の文が他方の文の言い換え文となることを示す正例又は非言い換え文となることを示す負例であることを示す言い換えラベルとの組からなる学習データの入力を受け付ける。
 ここで、ある文の言い換え文とは、当該文と意味が似ている文のことであり、ある文の非言い換え文とは、文全体での意味が当該文と似ているが言い換えでない文のことである。
 また、学習データに含まれる文のペアは、言い換え文又は非言い換え文となる関係を有する文のペアであり、例えば、文のペアの間で対応する単語の割合が、所定割合以上となる文のペアである。
 言い換えラベルは、一方の文が他方の文の言い換え文となる場合には1、一方の文が他方の文の非言い換えとなる場合(すなわち、言い換えでない場合)には0となるものである(図2)。
 例えば、受け付けた学習データの第1文が「what are natural numbers ?」、第2文が「what is a least natural number ?」、言い換えラベルが「0」であるとすると、一方の文が他方の文の非言い換えであることを意味する。
 そして、入力部11は、受け付けた学習データを、アラインメント部12及び学習部13に渡す。
 アラインメント部12は、第1文と第2文との間で単語のアラインメントを計算し、第2文の単語の各々について、当該単語のアラインメント先が無い場合に削除ラベルを付与し、当該単語のアラインメント先がある場合に非削除ラベルを付与する。
 具体的には、アラインメント部12は、まず、任意のアラインメント手法(例えば、参考文献1のword2vec)を用いて、第1文及び第2文における単語間のアラインメントを求める(図3)。
[参考文献1]Yangqiu Song and Dan Roth, "Unsupervised Sparse Vector Densification for Short Text Similarity".
 アラインメント部12は、第1文及び第2文の単語間のアラインメントから、第2文の単語の各々について、当該単語のアラインメント先が無い場合に、当該単語を削除単語として特定する。また、当該単語のアラインメント先がある場合には、当該単語を非削除単語として特定する。
 例えば、図3において、第2文中「a」及び「least」については、アラインメント先が無いため、アラインメント部12は、「a」及び「least」を削除単語として特定する。一方、他の単語についてはアラインメント先があるため、アラインメント部12は、他の単語を非削除単語として特定する。
 アラインメント部12は、第1文に対応した削除単語に削除ラベル(1)を、非削除単語に非削除ラベル(0)を付したデータ(図4)を生成する。
 このデータは、学習データの言い換えラベル=1(言い換え文)であれば、後述する正例モデルを学習するためのデータとなり、学習データの言い換えラベル=0(非言い換え文)であれば、後述する負例モデルを学習するためのデータとなる。
 同様に、アラインメント部12は、第1文と第2文との間の単語のアラインメントの計算結果に基づいて、第1文の単語の各々について、当該単語のアラインメント先が無い場合に削除ラベルを付与し、当該単語のアラインメント先がある場合に非削除ラベルを付与する(図4)。
 ここで、第1文について生成されたデータと、第2文について生成されたデータとの2つのデータは、無関係なデータとしてそれぞれ以下の処理の対象となる。
 そして、アラインメント部12は、生成したデータを、学習部13に渡す。
 学習部13は、言い換えラベル=1(言い換え文)の学習データに含まれる各文を用いて、アラインメント部12により処理された文のうち、正例であることを示す言い換えラベルと組になっていたものを、単語を削除することにより言い換え文を生成するための正例モデルの入力とした時に、出力がアラインメント部12により当該文に付与された削除ラベル及び非削除ラベルと一致するように、正例モデルを学習する。
 また、学習部13は、言い換えラベル=0(非言い換え文)の学習データに含まれる文を用いて、アラインメント部12により処理された文のうち、負例であることを示す言い換えラベルと組になっていたものを、単語を削除することにより非言い換え文を生成するための負例モデルの入力とした時に、出力がアラインメント部12により当該文に付与された削除ラベル及び非削除ラベルと一致するように、負例モデルを学習する。
 具体的には、学習部13は、図5に示すように、言い換えラベル=1(言い換え文)の学習データの文「what is a least natural number ?」を正例モデルの入力とした時に、出力がアラインメント部12により当該文に付与された削除ラベル及び非削除ラベル「0 0 1 1 0 0 0」と一致するように、正例モデルのパラメータを学習する。
 正例モデルは、単語を削除することにより言い換え文を生成するためのものであり、正例モデルを学習するためのデータ(言い換えラベルが1の学習データ)により学習される。
 また、正例モデルは、文を入力として、当該文に含まれる単語の各々について、当該単語の削除ラベルを推定した単語削除確率を算出するものであれば、何でもよく、任意のニューラルネットワークのモデルを採用することができる。例えば、図6に示すような、Bidirectional LSTM等の再帰型ニューラルネットワークを用いることができる。
 また、学習方法は、任意の方法を採用することができる(例えば、参考文献2)。
[参考文献2]Jason P.C. Chiu, Eric Nichols, "Named Entity Recognition with Bidirectional LSTM-CNNs"
 学習された正例モデルは、文が入力されると、文の単語毎の削除スコアのリストを出力する。
 同様に、単語を削除することにより非言い換え文を生成するための負例モデルを学習する。負例モデルは、負例モデルを学習するためのデータ(言い換えラベルが0の学習データ)により学習される。
 そして、学習部13は、学習した正例モデル及び負例モデルを、記憶部23に格納する。
 なお、学習部13は、正例モデルのみを学習する構成としても、負例モデルのみを学習する構成としてもよい。
 文生成装置20は、入力文に対して、非言い換え文を生成する文生成装置であって、CPUと、RAMと、後述する文生成処理ルーチンを実行するためのプログラムを記憶したROMとを備えたコンピュータで構成され、機能的には次に示すように構成されている。
 図1に示すように、本実施形態に係る文生成装置20は、入力部21と、推定部22と、記憶部23と、削除部24と、出力部25とを備えて構成される。
 入力部21は、入力文の入力を受け付け、受け付けた入力文を、推定部22に渡す。
 推定部22は、入力文を構成する単語の各々について、正例モデルを用いて当該単語の単語削除確率を付与すると共に、負例モデルを用いて当該単語の単語削除確率を付与する。
 具体的には、推定部22は、まず、記憶部23に格納された正例モデル及び負例モデルを取得する。次に、推定部22は、入力文を入力として、正例モデルを用いて、入力文に含まれる単語の単語削除確率を算出すると共に、入力文を入力として、負例モデルを用いて、入力文に含まれる単語の単語削除確率を算出する。
 例えば、図7に示すように、入力文が「which is the best treatment for psorisis ?」であった場合に、正例モデルの出力である単語削除確率は「0.1 0.3 0.4 0.2 0.1 0.3 0.25」、負例モデルの出力である単語削除確率は「0.2 0.5 0.4 0.4 0.1 0.7 0.65」のように算出される。
 そして、推定部22は、推定した正例モデルの単語削除確率及び負例モデルの単語削除確率を入力文に付与し、削除部24に渡す。
 記憶部23は、モデル学習装置10により学習された正例モデル及び負例モデルを格納する。
 削除部24は、入力文を構成する単語の各々について、当該単語の正例モデルを用いて付与された単語削除確率が予め定めた第1閾値以下であり、かつ、当該単語の負例モデルを用いて付与された単語削除確率が予め定めた第2閾値以上である場合に、当該単語を入力文から削除して入力文の非言い換え文とする。
 具体的には、削除部24は、例えば、第1閾値が0.3、第2閾値が0.5とすると、正例モデルの単語削除確率が0.3以下であり、かつ、負例モデルの単語削除確率が0.5以上の単語削除確率である「for」及び「psorisis」を入力文から削除した、「which is the best treatment ?」を非言い換え文とする。
 正例モデルに対して単語削除確率が低い単語、かつ、負例モデルに対して単語削除確率が高い単語を削除すれば、入力文に対して、文として単語・意味的な類似度が高いが、非言い換え文となる文を生成することができる。
 そして、削除部24は、生成した非言い換え文を、出力部25に渡す。
 出力部25は、生成した非言い換え文を出力する。
 具体的には、出力部25は、2つの文が言い換えとなっているか否かを判定するための判定モデルを学習する学習装置に、入力文と共に非言い換え文を出力する。
 当該学習装置が、文生成装置20により自動的に生成された非言い換え文を用いて判定モデルを学習すれば、文全体での意味が似ているが非言い換え文を学習データとすることができるため、判定精度の高い判定モデルを学習することができる。
 そのように学習された判定モデルを用いて2つの文が言い換えとなっているか否かを判定する際に、精度の高い判定を行うことができる。
<本発明の実施の形態に係るモデル学習装置の作用>
 図8は、本発明の実施の形態に係るモデル学習処理ルーチンを示すフローチャートである。
 入力部11に学習データが入力されると、モデル学習装置10において、図8に示すモデル学習処理ルーチンが実行される。
 まず、ステップS100において、入力部11は、文のペアと、一方の文が他方の文の言い換え文となることを示す正例又は非言い換え文となることを示す負例であることを示す言い換えラベルとの組からなる学習データの入力を受け付ける。
 ステップS110において、アラインメント部12は、文のペアの間で単語のアラインメントを計算し、各文の単語の各々について、当該単語のアラインメント先が無い場合に削除ラベルを付与し、当該単語のアラインメント先がある場合に非削除ラベルを付与する。
 ステップS120において、学習部13は、言い換えラベル=0(非言い換え文)の学習データに含まれる各文を用いて、上記ステップS110により処理された文のうち、正例であることを示す言い換えラベルと組になっていたものを、単語を削除することにより非言い換え文を生成するための負例モデルの入力とした時に、出力が上記ステップS110により当該文に付与された削除ラベル及び非削除ラベルと一致するように、負例モデルを学習する。
 ステップS130において、学習部13は、学習が収束したか否かを判定する。
 学習が収束していないと判定した場合(ステップS130のYES)、ステップS100に戻り、ステップS100~ステップS120の処理を行う。
 一方、学習が収束したと判定した場合(ステップS130のYES)、ステップS140において、学習部13は、学習した負例モデルを、記憶部23に格納する。
 上記モデル学習処理ルーチンでは、負例モデルを学習する場合について説明したが、正例モデルを学習する場合には、以下のように一部処理を変更して行う。
 ステップS120において、学習部13は、言い換えラベル=1(言い換え文)の学習データに含まれる各文を用いて、上記ステップS110により処理された文のうち、負例であることを示す言い換えラベルと組になっていたものを、単語を削除することにより言い換え文を生成するための正例モデルの入力とした時に、出力が上記ステップS110により当該文に付与された削除ラベル及び非削除ラベルと一致するように、正例モデルを学習する。
 ステップS140において、学習部13は、学習した正例モデルを、記憶部23に格納する。
<本発明の実施の形態に係る文生成装置の作用>
 図9は、本発明の実施の形態に係る文生成処理ルーチンを示すフローチャートである。
 入力部21に入力文が入力されると、文生成装置20において、図9に示す文生成処理ルーチンが実行される。
 まず、ステップS200において、推定部22は、記憶部23に格納された正例モデル及び負例モデルを取得する。
 ステップS210において、入力部21は、入力文の入力を受け付ける。
 ステップS220において、推定部22は、入力文を構成する単語の各々について、正例モデルを用いて当該単語の単語削除確率を付与する。
 ステップS230において、推定部22は、入力文を構成する単語の各々について、負例モデルを用いて当該単語の単語削除確率を付与する。なお、ステップS220とステップS230とは、順不同であり、ステップS230の後にステップS220の処理を行ってもよい。
 ステップS240において、削除部24は、入力文を構成する単語の各々について、当該単語の正例モデルを用いて付与された単語削除確率が予め定めた第1閾値以下であり、かつ、当該単語の負例モデルを用いて付与された単語削除確率が予め定めた第2閾値以上である場合に、当該単語を入力文から削除して入力文の非言い換え文とする。
 ステップS250において、出力部25は、上記ステップS240により生成した非言い換え文を出力する。
 以上説明したように、本発明の実施形態に係る文生成装置によれば、文と当該文の言い換え文とからなる正例に基づいて学習された、単語を削除することにより言い換え文を生成するための正例モデル、又は当該文と当該文の非言い換え文とからなる負例に基づいて学習された、単語を削除することにより非言い換え文を生成するための負例モデルを用いて、入力文を構成する単語の各々について、当該単語の単語削除確率を推定することにより、意味が似ている言い換え文、又は文全体での意味が似ているが言い換えでない非言い換え文を生成することができる。
 また、本発明の実施形態に係るモデル学習装置によれば、文のペアの間で単語のアラインメントを計算することにより、文の単語の各々について、当該単語のアラインメント先が無い場合に削除ラベルを付与し、当該単語のアラインメント先がある場合に非削除ラベルを付与し、当該文のうち、正例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力がアラインメント部により当該文に付与された削除ラベル及び非削除ラベルと一致するように、単語を削除することにより言い換え文を生成するための正例モデル、又は当該文のうち、負例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力がアラインメント部により文に付与された削除ラベル及び非削除ラベルと一致するように、単語を削除することにより非言い換え文を生成するための負例モデルを学習することにより、意味が似ている言い換え文、又は文全体での意味が似ているが言い換えでない非言い換え文を生成するためのモデルを学習することができる。
 また、2つの文のペアが言い換え関係にあるか否かを判定するための判定モデルを学習する際に、本実施形態に係る文生成装置20により生成された文全体での意味が似ているが非言い換え文を用いることにより、判定精度の高い判定モデルを学習することができる。このように学習された判定モデルを用いて2つの文が言い換えとなっているか否かを判定する際に、精度の高い判定を行うことができる。
 なお、本発明は、上述した実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲内で様々な変形や応用が可能である。
 上述の実施形態では、文生成装置20は、入力文に対して、非言い換え文を生成するように構成したが、これに限定されるものではなく、文生成装置20は、入力文に対して、言い換え文を生成するように構成することができる。
 この場合、削除部24は、入力文を構成する単語の各々について、当該単語の正例モデルを用いて付与された単語削除確率が予め定めた第1閾値以上であり、かつ、当該単語の負例モデルを用いて付与された単語削除確率が予め定めた第2閾値以下である場合に、当該単語を入力文から削除して入力文の言い換え文とする。
 また、削除部24は、文生成装置20が非言い換え文を生成する場合には、負例モデルの単語削除確率のみを用いる構成とすることができる。この場合、推定部22は、負例モデルのみを用いて、各単語に、負例モデルの単語削除確率を付与し、削除部24は、負例モデルの単語削除確率が、第2閾値以上である場合に、単語を削除する。また、モデル学習装置においては、負例モデルのみを学習すればよい。
 また、削除部24は、文生成装置20が言い換え文を生成する場合には、正例モデルの単語削除確率のみを用いる構成とすることができる。この場合、推定部22は、正例モデルのみを用いて、各単語に、正例モデルの単語削除確率を付与し、削除部24は、正例モデルの単語削除確率が、第1閾値以上である場合に、単語を削除する。また、モデル学習装置においては、正例モデルのみを学習すればよい。
 なお、正例モデル又は負例モデルのいずれか一方のみを用いるよりも、正例モデル及び負例モデルのいずれも用いる場合の方が、より精度の高い言い換え文又は非言い換え文を生成することができる。
 また、文生成装置20は、削除部24を省略し、推定部22により入力文を構成する単語の各々について、正例モデルを用いて当該単語の単語削除確率を付与した文を生成する装置として構成してもよい。同様に、文生成装置20は、削除部24を省略し、推定部22により入力文を構成する単語の各々について、負例モデルを用いて当該単語の単語削除確率を付与した文を生成する装置として構成してもよい。
 また、文生成装置20は、削除部24を省略し、推定部22により入力文を構成する単語の各々について、正例モデルを用いて当該単語の単語削除確率を付与した文を生成すると共に、負例モデルを用いて当該単語の単語削除確率を付与した文を生成する装置として構成してもよい。
 また、本願明細書中において、プログラムが予めインストールされている実施形態として説明したが、当該プログラムを、コンピュータ読み取り可能な記録媒体に格納して提供することも可能である。
1 文生成システム
10 モデル学習装置
11 入力部
12 アラインメント部
13 学習部
20 文生成装置
21 入力部
22 推定部
23 記憶部
24 削除部
25 出力部

Claims (7)

  1.  文と前記文の言い換え文とからなる正例に基づいて学習された、単語を削除することにより言い換え文を生成するための正例モデル、又は前記文と前記文の非言い換え文とからなる負例に基づいて学習された、単語を削除することにより非言い換え文を生成するための負例モデルを用いて、入力文を構成する単語の各々について、前記単語の単語削除確率を推定する推定部
     を備えることを特徴とする文生成装置。
  2.  前記推定部は、前記入力文を構成する単語の各々について、前記正例モデルを用いて前記単語の前記単語削除確率を付与すると共に、前記負例モデルを用いて前記単語の前記単語削除確率を付与し、
     前記入力文を構成する単語の各々について、前記単語の前記正例モデルを用いて付与された前記単語削除確率が予め定めた第1閾値以上であり、かつ、前記単語の前記負例モデルを用いて付与された前記単語削除確率が予め定めた第2閾値以下である場合に、前記単語を前記入力文から削除して前記入力文の言い換え文とする、又は、前記入力文を構成する単語の各々について、前記単語の前記正例モデルを用いて付与された前記単語削除確率が予め定めた第1閾値以下であり、かつ、前記単語の前記負例モデルを用いて付与された前記単語削除確率が予め定めた第2閾値以上である場合に、前記単語を前記入力文から削除して前記入力文の非言い換え文とする削除部
     を更に備えることを特徴とする請求項1記載の文生成装置。
  3.  文のペアと、一方の文が他方の文の言い換え文となることを示す正例又は非言い換え文となることを示す負例であることを示す言い換えラベルとの組からなる学習データの入力を受け付ける入力部と、
     前記文のペアの間で単語のアラインメントを計算することにより、前記文のペアの単語の各々について、前記単語のアラインメント先が無い場合に削除ラベルを付与し、前記単語のアラインメント先がある場合に非削除ラベルを付与するアラインメント部と、
     前記アラインメント部により処理された前記文のうち、前記正例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力が前記アラインメント部により前記文に付与された前記削除ラベル及び前記非削除ラベルと一致するように、単語を削除することにより言い換え文を生成するための正例モデルを学習し、又は前記アラインメント部により処理された前記文のうち、前記負例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力が前記アラインメント部により前記文に付与された前記削除ラベル及び前記非削除ラベルと一致するように、単語を削除することにより非言い換え文を生成するための負例モデルを学習する学習部と、
     を備えることを特徴とするモデル学習装置。
  4.  前記正例モデル又は前記負例モデルは、請求項3記載のモデル学習装置によって予め学習されることを特徴とする請求項1又は2記載の文生成装置。
  5.  推定部が、文と前記文の言い換え文とからなる正例に基づいて学習された、単語を削除することにより言い換え文を生成するための正例モデル、又は前記文と前記文の非言い換え文とからなる負例に基づいて学習された、単語を削除することにより非言い換え文を生成するための負例モデルを用いて、入力文を構成する単語の各々について、前記単語の単語削除確率を推定する
     ことを特徴とする文生成方法。
  6.  入力部が、文のペアと、一方の文が他方の文の言い換え文となることを示す正例又は非言い換え文となることを示す負例であることを示す言い換えラベルとの組からなる学習データの入力を受け付け、
     アラインメント部が、前記文のペアの間で単語のアラインメントを計算することにより、前記文のペアの単語の各々について、前記単語のアラインメント先が無い場合に削除ラベルを付与し、前記単語のアラインメント先がある場合に非削除ラベルを付与し、
     学習部が、前記アラインメント部により処理された前記文のうち、前記正例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力が前記アラインメント部により前記文に付与された前記削除ラベル及び前記非削除ラベルと一致するように、単語を削除することにより言い換え文を生成するための正例モデルを学習し、又は前記アラインメント部により処理された前記文のうち、前記負例であることを示す言い換えラベルと組になっていたものを入力とした時に、出力が前記アラインメント部により前記文に付与された前記削除ラベル及び前記非削除ラベルと一致するように、単語を削除することにより非言い換え文を生成するための負例モデルを学習する
     ことを特徴とするモデル学習方法。
  7.  コンピュータを、請求項1、2若しくは4の何れか1項記載の文生成装置、又は請求項3記載のモデル学習装置の各部として機能させるためのプログラム。
PCT/JP2019/028837 2018-07-24 2019-07-23 文生成装置、モデル学習装置、文生成方法、モデル学習方法、及びプログラム WO2020022328A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/262,512 US11403469B2 (en) 2018-07-24 2019-07-23 Sentence generation device, model learning device, sentence generation method, model learning method, and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018138763A JP7107059B2 (ja) 2018-07-24 2018-07-24 文生成装置、モデル学習装置、文生成方法、モデル学習方法、及びプログラム
JP2018-138763 2018-07-24

Publications (1)

Publication Number Publication Date
WO2020022328A1 true WO2020022328A1 (ja) 2020-01-30

Family

ID=69182079

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/028837 WO2020022328A1 (ja) 2018-07-24 2019-07-23 文生成装置、モデル学習装置、文生成方法、モデル学習方法、及びプログラム

Country Status (3)

Country Link
US (1) US11403469B2 (ja)
JP (1) JP7107059B2 (ja)
WO (1) WO2020022328A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210043894A (ko) * 2019-10-14 2021-04-22 삼성전자주식회사 전자 장치 및 이의 문장 제공 방법

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004242495A (ja) * 2003-01-16 2004-08-26 Nippon Steel Corp 励磁機、界磁機およびそれを用いた同期機
JP2012212329A (ja) * 2011-03-31 2012-11-01 Tottori Univ テキストデータの冗長性を解析する情報解析装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005100335A (ja) 2003-09-01 2005-04-14 Advanced Telecommunication Research Institute International 機械翻訳装置、機械翻訳コンピュータプログラム及びコンピュータ
JP4604178B2 (ja) * 2004-11-22 2010-12-22 独立行政法人産業技術総合研究所 音声認識装置及び方法ならびにプログラム
JP2007094626A (ja) 2005-09-28 2007-04-12 Advanced Telecommunication Research Institute International 機械翻訳装置、およびプログラム

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004242495A (ja) * 2003-01-16 2004-08-26 Nippon Steel Corp 励磁機、界磁機およびそれを用いた同期機
JP2012212329A (ja) * 2011-03-31 2012-11-01 Tottori Univ テキストデータの冗長性を解析する情報解析装置

Also Published As

Publication number Publication date
JP2020017017A (ja) 2020-01-30
US20210294985A1 (en) 2021-09-23
US11403469B2 (en) 2022-08-02
JP7107059B2 (ja) 2022-07-27

Similar Documents

Publication Publication Date Title
CN106503231B (zh) 基于人工智能的搜索方法和装置
WO2018024243A1 (zh) 字符识别中识别结果的校验方法和装置
CN111832312B (zh) 文本处理方法、装置、设备和存储介质
WO2018086519A1 (zh) 一种特定文本信息的识别方法及装置
WO2020113918A1 (zh) 基于语义解析的语句合理性判断方法、装置、计算机设备
US11669740B2 (en) Graph-based labeling rule augmentation for weakly supervised training of machine-learning-based named entity recognition
US11669687B1 (en) Systems and methods for natural language processing (NLP) model robustness determination
CN112765994A (zh) 一种基于深度学习的信息要素联合抽取方法及系统
WO2023045184A1 (zh) 一种文本类别识别方法、装置、计算机设备及介质
CN110874536A (zh) 语料质量评估模型生成方法和双语句对互译质量评估方法
WO2020022328A1 (ja) 文生成装置、モデル学習装置、文生成方法、モデル学習方法、及びプログラム
CN113705207A (zh) 语法错误识别方法及装置
CN112084776A (zh) 相似文章的检测方法、装置、服务器和计算机存储介质
WO2020199590A1 (zh) 情绪检测分析方法及相关装置
JP5911931B2 (ja) 述語項構造抽出装置、方法、プログラム、及びコンピュータ読取り可能な記録媒体
CN110377753A (zh) 基于关系触发词与gru模型的关系抽取方法及装置
WO2022014386A1 (ja) 情報処理装置及び情報処理方法
JP6839001B2 (ja) モデル学習装置、情報判定装置およびそれらのプログラム
CN115147849A (zh) 字符编码模型的训练方法、字符匹配方法和装置
CN111061851B (zh) 基于给定事实的问句生成方法及系统
JP2015102914A (ja) 不理解文判定モデル学習方法、不理解文判定方法、装置、及びプログラム
JP2018077677A (ja) 文字列変換装置、モデル学習装置、方法、及びプログラム
CN114580391A (zh) 中文错误检测模型训练方法、装置、设备及存储介质
CN115906838A (zh) 文本抽取方法、装置、电子设备以及存储介质
CN112101019A (zh) 一种基于词性标注和组块分析的需求模板符合性检查优化方法

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19839932

Country of ref document: EP

Kind code of ref document: A1