Analysis device, analysis method, and analysis program
The analysis device and method enhance dialogue document analysis by using machine learning to infer sentence types and contextual relationships, addressing the challenge of accurate text segmentation in dialogue documents.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- NIPPON TELEGRAPH & TELEPHONE CORP
- Filing Date
- 2023-03-29
- Publication Date
- 2026-07-30
AI Technical Summary
Existing discourse structure analysis technologies struggle to accurately perform text segmentation in dialogue documents using computer processing, particularly in recognizing discourse boundaries between utterances in dialogue documents.
An analysis device and method that utilizes machine learning to infer sentence types and relationships between utterances in dialogue documents by analyzing the context of preceding and subsequent groups of utterances, employing a first processing unit for sentence type inference, a second processing unit for inferring relationships with preceding context, and a third processing unit for inferring relationships with subsequent context.
Improves the accuracy of text segmentation and analysis of dialogue documents by effectively identifying discourse boundaries and relationships between utterances, enhancing the overall analysis of dialogue documents.
Smart Images

Figure 0007897534000001 
Figure 0007897534000002 
Figure 0007897534000003
Abstract
Description
Technical Field
[0001] The present disclosure relates to an analysis apparatus, an analysis method, and an analysis program.
Background Art
[0002] In order to perform processing related to the content of a document by a computer, it is important not only to sequentially follow the direct meaning represented by the literal characters of each sentence, but also to recognize parts with coherent meaning and analyze and understand the relationships (relationships not directly appearing in the literal characters) between those parts.
[0003] As an example of such a technique, there is discourse structure analysis. Discourse structure analysis is a technique that defines a part representing a specific coherent meaning in a document as a "discourse" and performs document analysis based on the discourse (Non-Patent Document 1, pages 95 to 105 of Non-Patent Document 2).
Prior Art Documents
Non-Patent Documents
[0004]
Non-Patent Document 1
Non-Patent Document 2
Summary of the Invention
Problems to be Solved by the Invention
[0005] Discourse structure analysis is applicable not only to the analysis of dialogue sentences but also to general document analysis, and is also used when analyzing a dialogue document containing dialogue sentences.
[0006] In discourse structure analysis, the technique of using computer processing to recognize discourse boundaries is called text segmentation (Non-Patent Literature 2, pp. 102-104). One specific method of performing text segmentation is to use indicators (connection words) that superficially represent the connections between sentences.
[0007] However, the technology for using connecting words to enable computer processing to recognize discourse boundaries is still in the research stage. Therefore, it is difficult to perform perfectly accurate text segmentation in dialogue documents using computer processing.
[0008] This disclosure is made in view of the above circumstances, and the purpose of this disclosure is to provide technology useful for analyzing dialogue documents. [Means for solving the problem]
[0009] An analysis device according to one aspect of the present disclosure is an analysis device for analyzing a dialogue document including a dialogue between two parties, comprising: a first processing unit that performs machine learning on a plurality of training data combining utterances and the sentence types of the utterances, and uses the machine learning model to infer the sentence types of utterances included in the dialogue document; a second processing unit that performs machine learning on a plurality of training data combining utterances to which information indicating the relationship with the utterance context of a preceding group of utterances is attached, and the utterance context of the preceding group of utterances, and uses the machine learning model to infer the relationship between a predetermined speaker's utterance included in the dialogue document and the utterance context of the preceding group of utterances; and a third processing unit that performs machine learning on a plurality of training data combining utterances to which information indicating the relationship with the utterance context of a subsequent group of utterances is attached, and the utterance context of the subsequent group of utterances, and uses the machine learning model to infer the relationship between a predetermined speaker's utterance included in the dialogue document and the utterance context of the subsequent group of utterances.
[0010] An analysis method according to one aspect of the present disclosure is an analysis method for analyzing a dialogue document including a dialogue between two parties, wherein the analysis device performs a first machine learning process by machine learning a plurality of training data combining utterances and the sentence types of the utterances; performs a second machine learning process by machine learning a plurality of training data combining utterances to which information indicating the relationship with the speech context of a preceding group of utterances is attached and the speech context of the preceding group of utterances; performs a third machine learning process by machine learning a plurality of training data combining utterances to which information indicating the relationship with the speech context of a subsequent group of utterances is attached and the speech context of the subsequent group of utterances; uses the learning model obtained by the first machine learning process to infer the sentence types of the utterances included in the dialogue document; uses the learning model obtained by the second machine learning process to infer the relationship between a predetermined speaker's utterance included in the dialogue document and the speech context of the preceding group of utterances; and uses the learning model obtained by the third machine learning process to infer the relationship between a predetermined speaker's utterance included in the dialogue document and the speech context of the subsequent group of utterances.
[0011] An analysis program according to one aspect of this disclosure causes a computer to function as the analysis device. [Effects of the Invention]
[0012] This disclosure provides a technology useful for analyzing dialogue documents. [Brief explanation of the drawing]
[0013] [Figure 1] Figure 1 is a diagram showing the functional block configuration of the analysis device according to this embodiment. [Figure 2] Figure 2 shows an overview of the proposed processing model. [Figure 3] Figure 3 shows the definition of the relationship between an utterance and the preceding or following context. [Figure 4] Figure 4 shows the structure of the text data used for learning text-type tags. [Figure 5] Figure 5 shows the structure of the text data used for learning relationships with the preceding context. [Figure 6]Figure 6 is a diagram showing the structure of text data for learning the relationship with the subsequent context. [Figure 7] Figure 7 is a flowchart showing the flow of the learning phase. [Figure 8] Figure 8 is a flowchart showing the flow of the vectorization process of text data for learning document type tags. [Figure 9] Figure 9 is a diagram showing the structure of vector data for learning document type tags. [Figure 10] Figure 10 is a flowchart showing the flow of the vectorization process of text data for learning the relationship with the preceding context. [Figure 11] Figure 11 is a diagram showing the structure of vector data for learning the relationship with the preceding context. [Figure 12] Figure 12 is a flowchart showing the flow of the vectorization process of text data for learning the relationship with the subsequent context. [Figure 13] Figure 21 is a diagram showing the structure of vector data for learning the relationship with the subsequent context. [Figure 14] Figure 14 is a flowchart showing the flow of learning document type tags. [Figure 15] Figure 15 is a flowchart showing the flow of learning the relationship with the preceding context. [[ID=<<28>>]] [[ID=<<29>>]] [Figure 16] [[ID=<<30>>]]Figure 16 is a flowchart showing the flow of learning the relationship with the subsequent context. [[ID=<<31>>]] [[ID=<<32>>]] [Figure 17] [[ID=<<33>>]]Figure 17 is a flowchart showing the flow of the inference phase. [[ID=<<34>>]] [[ID=<<35>>]] [Figure 18] [[ID=<<36>>]]Figure 18 is a diagram showing the structure of dialogue document text data. [[ID=<<37>>]] [[ID=<<38>>]] [Figure 19] [[ID=<<39>>]]Figure 19 is a flowchart showing the flow of the vectorization process of dialogue document text data. [[ID=<<40>>]] [[ID=<<41>>]] [Figure 20] [[ID=<<42>>]]Figure 20 is a diagram showing the structure of sentence vector data. [[ID=<<43>>]] [[ID=<<44>>]] [Figure 21] b[[ID=<<45>>]]Figure 21 is a diagram showing the structure of paragraph vector data. [[ID=<<46>>]] [[ID=<<47>>]] [Figure 22] [[ID=<<48>>]]Figure 22 is a flowchart showing the flow of the inference process of document type tags. [Figure 23] Figure 23 shows the structure of sentence vector data after sentence type tag inference. [Figure 24] Figure 24 is a flowchart showing the flow of the inference process regarding the relationship with the preceding context. [Figure 25] Figure 25 is a flowchart showing the flow of the inference process regarding the relationship with the subsequent context. [Figure 26] Figure 26 shows the structure of the sentence vector data after inferring the relationships between the preceding and succeeding contexts. [Figure 27] Figure 27 shows the hardware configuration of the analysis device. [Modes for carrying out the invention]
[0014] Embodiments of this disclosure will be described below with reference to the drawings. In the drawings, the same parts are denoted by the same reference numerals and their descriptions are omitted.
[0015] [Summary of this disclosure] This disclosure concerns a computer-based natural language analysis technology. Specifically, this disclosure is a technology that automatically identifies various attributes of dialogue text recorded in dialogue documents and classifies the relationships between dialogues.
[0016] As mentioned above, it is difficult to perform perfectly accurate text segmentation in dialogue documents using computer processing. In other words, it is difficult to correctly recognize discourse boundaries using connecting words.
[0017] Therefore, this disclosure does not recognize discourse boundaries using connecting words, but rather analyzes the relationship between a single utterance from one speaker and the surrounding utterance context of the other speaker. The information obtained from this analysis, which shows the relationship between each utterance and the surrounding utterance context, is useful for analyzing the entire dialogue and can contribute to improving the technology for analyzing dialogue documents.
[0018] [Configuration of the analysis device] Figure 1 is a diagram showing the functional block configuration of the analysis device 1 according to this embodiment. The analysis device 1 is an analysis device that analyzes a dialogue document in which a dialogue has been recorded. The analysis device 1 comprises a first processing unit 11 that learns and infers the sentence type of the dialogue sentences recorded in the dialogue document, a second processing unit 12 that learns and infers the relationship between the dialogue sentences and the preceding context, a third processing unit 13 that learns and infers the relationship between the dialogue sentences and the subsequent context, a fourth processing unit 14 that executes arbitrary processing, and a storage unit 15 that stores various data.
[0019] Figure 2 shows an image of a dialogue document containing a recorded conversation, and an overview of the proposed processing model based on that dialogue. This disclosure is limited to a two-person dialogue and assumes that each speaker alternately makes a series of utterances consisting of multiple sentences. The series of utterances is recorded in a single paragraph.
[0020] A single utterance from a speaker (speaker B) has, in addition to its literal meaning, attributes determined by its relationship to the context of the preceding paragraph by the other speaker (speaker A), and attributes determined by its relationship to the context of the following paragraph by the same other speaker (speaker A). This disclosure analyzes these attributes.
[0021] Figure 3 shows an example of such attributes. Figure 3 is a diagram that shows the definitions of the relationship between an utterance and the preceding context, and the relationship between an utterance and the following context.
[0022] In the diagram, "Tag 1" is a tag that represents the type of each individual utterance. For example, it could be a question, a request, or an assertion, and it is a tag that determines the type of sentence based on that utterance alone.
[0023] In the diagram, "Tag 2" represents an attribute of the speaker's (speaker B) utterance, determined by the context of the entire utterance in the previous paragraph by the other speaker (speaker A). For example, if the value of Tag 1 is "Question," it represents an attribute indicating the speaker's intentions behind the question in relation to the context of the other speaker's previous paragraph. For instance, Tag 2 may include attributes such as "Dissatisfaction / Hesitation / Plea for Exemption," which expresses dissatisfaction, or "Counter-Question," which is a question asked with the intention of contradicting the other person's assertion.
[0024] In the diagram, "Tag 3" represents an attribute of the speaker's (speaker B) utterance, determined by the context of the entire utterance in the following paragraph by the other speaker (speaker A). For example, if the value of Tag 1 is "Question," Tag 3 represents an attribute such as how the other speaker responded to a question asked by a particular speaker. For example, Tag 3 may have attributes such as "Question with an affirmative response" (where the response was positive) or "Question with a negative response" (where the response was positive).
[0025] The analysis device 1 analyzes each of the values of tags 1 to 3 using machine learning (deep learning) techniques. However, the machine learning method is arbitrary. Furthermore, this disclosure does not specify a particular machine learning method.
[0026] The first processing unit 11 learns multiple training data sets, each consisting of an individual utterance and a sentence type tag (tag 1) for each utterance, using a predetermined machine learning method, and has the function of inferring the sentence type tag (tag 1) for each utterance contained in the dialogue document using the learning model acquired as a result.
[0027] The second processing unit 12 learns multiple training data by combining a single utterance from a certain speaker (an utterance to which a tag 1 indicating the sentence type of the utterance and a tag 2 indicating the relationship with the utterance context of the preceding group of utterances) and the utterance context of the preceding group of utterances of the other speaker, using a predetermined machine learning method. The learning model acquired as a result has the function of inferring attribute tags (tag 2) that indicate the relationship between a given speaker's utterance included in a dialogue document and the preceding group of utterances of that utterance.
[0028] The third processing unit 13 learns multiple training data by combining a single utterance from a certain speaker (an utterance to which a tag 1 indicating the sentence type of the utterance and a tag 3 indicating the relationship with the utterance context of the subsequent group of utterances) and the utterance context of the subsequent group of utterances of the other speaker, using a predetermined machine learning method. The learning model acquired as a result has the function of inferring attribute tags (tag 3) that indicate the relationship between a given speaker's utterance included in a dialogue document and the subsequent group of utterances of that utterance and the utterance context of the other speaker.
[0029] Figure 4 shows the structure of the text data (text data for learning sentence type tags) used by the first processing unit 11 to learn sentence type tags. Examples of pairs of individual utterances (sentences) and the sentence type (value of tag 1) of that sentence are listed.
[0030] Figure 5 shows the structure of the text data (text data for learning the relationship with the preceding context) used by the second processing unit 12 to learn the relationship (value of tag 2) between a single sentence and the group of utterances in the previous paragraph of the other speaker. The pairs of a single sentence, each assigned a value for tag 1 and tag 2, and the group of utterances in the previous paragraph of the other speaker are listed as learning pairs.
[0031] Figure 6 shows the structure of the text data (text data for learning the relationship with the subsequent context) used by the third processing unit 13 to learn the relationship (value of tag 3) between a single sentence and the group of utterances in the next paragraph from the other speaker. The pairs of a single sentence with the values of tag 1 and tag 3 and the group of utterances in the next paragraph from the other speaker are listed as learning pairs.
[0032] [Operation of the analysis device] Figure 7 is a flowchart showing the process of converting each training data from Figures 4 to 6 into numerical data (vectors) for machine learning, and the flow of each training process. It consists of the vectorization process of each training text data (steps S1 to S3) and each training process (steps S4 to S6).
[0033] The fourth processing unit 14 vectorizes the text data for learning text-type tags shown in Figure 4 (step S1).
[0034] The fourth processing unit 14 vectorizes the text data for learning relationships with the preceding context, as shown in Figure 5 (step S2).
[0035] The fourth processing unit 14 vectorizes the text data for learning relationships with the subsequent context, as shown in Figure 6 (step S3).
[0036] The first processing unit 11 learns combinations of sentences and the values of tag 1 for those sentences using sentence-type tag learning vector data (step S4).
[0037] The second processing unit 12 uses vector data for learning relationships with the preceding context to learn combinations of a given sentence and its preceding context (values of tag 2) (step S5).
[0038] The third processing unit 13 learns the relationship between a given sentence and the subsequent context (the value of tag 3) using vector data for learning the relationship with the subsequent context (step S6).
[0039] Figure 8 is a flowchart detailing step S1 in Figure 7, i.e., the flow of the vectorization process for text data used for learning sentence-specific tags. As long as sentence data exists, the sentence data is vectorized and the tags are digitized, and these are stored in the vector data for learning sentence-specific tags. However, this disclosure does not specify the specific method for vectorizing text data or the specific method for digitizing sentence-specific tags.
[0040] The fourth processing unit 14 reads the text data for learning text type tags shown in Figure 4 from the storage unit 15 (step S1-1).
[0041] The fourth processing unit 14 sets n to 1 (step S1-2). n represents the nth sentence data and is denoted as sentence n.
[0042] The fourth processing unit 14 determines whether sentence n exists in the text data for learning sentence type tags (step S1-3). If sentence n exists in the text data for learning sentence type tags, steps S1-4 to S1-7 are executed. If sentence n does not exist in the text data for learning sentence type tags, the process is terminated.
[0043] The fourth processing unit 14 vectorizes sentence n (step S1-4).
[0044] The fourth processing unit 14 quantifies the sentence type tag (tag 1) of the sentence n (step S1-5).
[0045] The fourth processing unit 14 stores the sentence vector of sentence n and the numerical sentence type tag (tag 1) of sentence n into the sentence type tag learning vector data (step S1-6).
[0046] The fourth processing unit 14 sets n to n+1 and returns to step S1-3 (step S1-7).
[0047] Figure 9 shows the structure of the text-type tag training vector data generated by the processing results in Figure 8.
[0048] Figure 10 is a flowchart showing the details of step S2 in Figure 7, i.e., the flow of the vectorization process for text data used for learning relationships with the preceding context. As long as there are learning pairs of preceding context and sentences, the sentence data is vectorized and the tags are digitized, and these are stored in the vector data used for learning relationships with the preceding context.
[0049] This embodiment shows an example of combining sentences in the preceding context into a single vector for vectorization, but this is not limited to methods applicable in implementing the disclosure. Furthermore, the method of vectorization is not specified in this disclosure.
[0050] The fourth processing unit 14 reads the text data for learning the relationship with the preceding context shown in Figure 5 from the memory unit 15 (step S2-1).
[0051] The fourth processing unit 14 sets n to 1 (step S2-2). n represents the nth learning pair and is denoted as learning pair n.
[0052] The fourth processing unit 14 determines whether or not a training pair n exists in the text data for learning relationships with the preceding context (step S2-3). If a training pair n exists in the text data for learning relationships with the preceding context, steps S2-4 to S2-8 are executed. If a training pair n does not exist in the text data for learning relationships with the preceding context, the process is terminated.
[0053] The fourth processing unit 14 converts all sentences of the preceding context n into a single vector (step S2-4).
[0054] The fourth processing unit 14 vectorizes sentence n (step S2-5).
[0055] The fourth processing unit 14 quantifies tags 1 and 2 of sentence n (step S2-6).
[0056] The fourth processing unit 14 stores the vectorized preceding context vector, the sentence vector of sentence n, and the numerically represented tags 1 and 2 of sentence n as a learning pair n in vector data for learning the relationship with the preceding context (step S2-7).
[0057] The fourth processing unit 14 sets n to n+1 and returns to step S2-3 (step S2-8).
[0058] Figure 11 shows the structure of the vector data used for learning relationships with the preceding context, which is generated as a result of the processing shown in Figure 10.
[0059] Figure 12 is a flowchart showing the details of step S3 in Figure 7, i.e., the flow of the vectorization process for text data used for learning relationships with the subsequent context. As long as there are learning pairs of sentences and subsequent contexts, the sentence data is vectorized and the tags are digitized, and these are stored in the vector data used for learning relationships with the subsequent context.
[0060] This embodiment shows an example of combining sentences in the subsequent context into a single vector for vectorization, but this is not limited to methods applicable in the implementation of this disclosure. Furthermore, this disclosure does not specify a method for performing vectorization.
[0061] The fourth processing unit 14 reads the text data for learning the relationship with the subsequent context shown in Figure 6 from the memory unit 15 (step S3-1).
[0062] The fourth processing unit 14 sets n to 1 (step S3-2). n represents the nth learning pair and is denoted as learning pair n.
[0063] The fourth processing unit 14 determines whether or not a training pair n exists in the text data for learning relationships with the subsequent context (step S3-3). If a training pair n exists in the text data for learning relationships with the subsequent context, steps S3-3 to S3-8 are executed. If a training pair n does not exist in the text data for learning relationships with the subsequent context, the process is terminated.
[0064] The fourth processing unit 14 vectorizes sentence n (steps S3-4).
[0065] The fourth processing unit 14 quantifies tags 1 and 3 of sentence n (step S3-5).
[0066] The fourth processing unit 14 converts all sentences of the subsequent context n into a single vector (steps S3-6).
[0067] The fourth processing unit 14 stores the sentence vector of sentence n, the numerical tags 1 and 3 of sentence n, and the vectorized subsequent context vector as a learning pair n in vector data for learning relationships with the subsequent context (step S3-7).
[0068] The fourth processing unit 14 sets n to n+1 and returns to step S3-3 (step S3-8).
[0069] Figure 13 shows the structure of the vector data used for learning relationships with the subsequent context, which is generated as a result of the processing shown in Figure 12.
[0070] Figure 14 is a flowchart showing the details of step S4 in Figure 7, i.e., the flow of sentence-specific tag learning. In this process, sentence-specific tag learning vector data is read, and sentence-specific tags are learned as long as sentence vectors exist.
[0071] The first processing unit 11 reads the text type tag learning vector data shown in Figure 9 from the storage unit 15 (step S4-1).
[0072] The first processing unit 11 sets n to 1 (step S4-2). n represents the nth sentence data and is denoted as sentence n.
[0073] The first processing unit 11 determines whether sentence n exists in the sentence-type tag learning vector data (step S4-3). If sentence n exists in the sentence-type tag learning vector data, steps S4-4 to S4-5 are executed. If sentence n does not exist in the sentence-type tag learning vector data, the process is terminated.
[0074] The first processing unit 11 learns combinations of sentence n and sentence type tags (tag 1) (step S4-4).
[0075] The first processing unit 11 sets n to n+1 and returns to step S4-3 (step S4-5).
[0076] Figure 15 is a flowchart showing the details of step S5 in Figure 7, i.e., the flow of relationship learning with the preceding context. In this process, relationship learning vector data with the preceding context is read, and as long as learning pairs exist, combinations of the preceding context vector and the value of tag 2 of the sentence are learned.
[0077] The second processing unit 12 reads the relationship learning vector data for the preceding context shown in Figure 11 from the memory unit 15 (step S5-1).
[0078] The second processing unit 12 sets n to 1 (step S5-2). n represents the nth learning pair and is denoted as learning pair n.
[0079] The second processing unit 12 determines whether or not a training pair n exists in the relationship learning vector data for the preceding context (step S5-3). If a training pair n exists in the relationship learning vector data for the preceding context, steps S5-4 to S5-5 are executed. If a training pair n does not exist in the relationship learning vector data for the preceding context, the process is terminated.
[0080] The second processing unit 12 learns combinations of the preceding context vector n and the tag 2 value of the sentence vector n for each learning pair n (step S5-4).
[0081] The second processing unit 12 sets n to n+1 and returns to step S5-3 (step S5-5).
[0082] Figure 16 is a flowchart detailing step S6 in Figure 7, i.e., the flow of relationship learning with the subsequent context. In this process, relationship learning vector data with the subsequent context is read, and as long as learning pairs exist, the combination of the value of tag 3 of the sentence and the subsequent context vector is learned.
[0083] The third processing unit 13 reads the relationship learning vector data from the memory unit 15, as shown in Figure 13 (step S6-1).
[0084] The third processing unit 13 sets n to 1 (step S6-2). n represents the nth learning pair and is denoted as learning pair n.
[0085] The third processing unit 13 determines whether or not a training pair n exists in the relationship learning vector data for the subsequent context (step S6-3). If a training pair n exists in the relationship learning vector data for the subsequent context, steps S6-4 to S6-5 are executed. If a training pair n does not exist in the relationship learning vector data for the subsequent context, the process is terminated.
[0086] The third processing unit 13 learns combinations of the tag value of the sentence vector n and the subsequent context vector n for each learning pair n (step S6-4).
[0087] The third processing unit 13 sets n to n+1 and returns to step S6-3 (step S6-5).
[0088] The above describes the processing during the learning phase.
[0089] Next, we will explain the inference processes performed on the dialogue document text data to be analyzed, including inference of sentence type tags, relationships with preceding context, and relationships with subsequent context.
[0090] Figure 17 is a flowchart illustrating the flow of this inference process. It consists of vectorization of the dialogue document text data to be analyzed (step S7) and each inference process (steps S8 to S10).
[0091] Figure 18 shows the structure of the dialogue document text data to be analyzed. In this disclosure, since the number of utterances participating in the dialogue is limited to two, a structure in which the utterance groups of speaker A and speaker B are arranged alternately is assumed. Each utterance group consists of multiple individual sentences.
[0092] The fourth processing unit 14 vectorizes the dialogue document text data shown in Figure 18 (step S7).
[0093] The first processing unit 11 uses the learning model acquired through the learning performed in step S4-4 of Figure 14 to infer the sentence type tags (tag 1) of the sentences included in the vectorized dialogue document vector data (step S8).
[0094] The second processing unit 12 uses the inference result of the sentence's sentence type tag (tag 1) and the learning model acquired through learning performed in step S5-4 of Figure 15 to infer the relationship with the preceding context of the sentence (step S9).
[0095] The third processing unit 13 uses the inference result of the sentence's sentence type tag (tag 1) and the learning model acquired through learning performed in step S6-4 of Figure 16 to infer the relationship between the sentence and the subsequent context (step S10).
[0096] Figure 19 is a flowchart showing the details of step S7 in Figure 17, i.e., the flow of the vectorization process for dialogue document text data. In this process, for all utterance groups contained in the dialogue document text data, each sentence within each utterance group is vectorized, and the vectorized sentence vector data for each utterance group is converted into a single paragraph vector for each utterance group.
[0097] The fourth processing unit 14 reads the dialogue document text data to be analyzed, as shown in Figure 18, from the storage unit 15 (step S7-1).
[0098] The fourth processing unit 14 sets n to 1 (step S7-2). n represents the nth utterance in the utterance group and is denoted as utterance group n.
[0099] The fourth processing unit 14 determines whether or not utterance group n exists in the dialogue document text data (step S7-3). If utterance group n exists in the dialogue document text data, steps S7-3 to S7-9 are executed. If utterance group n does not exist in the dialogue document text data, the process proceeds to step S7-10.
[0100] The fourth processing unit 14 sets m to 1 (step S7-4). m represents the m-th sentence data and is denoted as sentence m.
[0101] The fourth processing unit 14 determines whether or not sentence m exists within the utterance group n (step S7-5). If sentence m exists within the utterance group n, steps S7-6 to S7-7 are executed. If sentence m does not exist within the utterance group n, steps S7-8 to S7-9 are executed.
[0102] The fourth processing unit 14 vectorizes sentence m (step S7-6).
[0103] The fourth processing unit 14 sets m to m+1 and returns to step S7-5 (step S7-7).
[0104] The fourth processing unit 14 writes all sentence vector data of the utterance group n to the sentence vector data (steps S7-8).
[0105] The fourth processing unit 14 sets n to n+1 and returns to step S7-3 (step S7-9).
[0106] The fourth processing unit 14 sets n to 1 (step S7-10).
[0107] The fourth processing unit 14 determines whether or not utterance group n exists in the dialogue document text data (step S7-11). If utterance group n exists in the dialogue document text data, steps S7-12 to S7-13 are executed. If utterance group n does not exist in the dialogue document text data, processing is terminated.
[0108] The fourth processing unit 14 converts all sentence vectors contained in the utterance group n into a single paragraph vector and writes the paragraph vector to paragraph vector data (steps S7-12).
[0109] The fourth processing unit 14 sets n to n+1 and returns to step S7-11 (step S7-13).
[0110] Figure 20 shows the structure of the sentence vector data generated by steps S7-8 in Figure 19. Figure 21 shows the structure of the paragraph vector data generated by step S7-12 in Figure 19.
[0111] Figure 22 is a flowchart illustrating the details of step S8 in Figure 17, i.e., the flow of the sentence type tag inference process. In this process, sentence vector data is read, and as long as a group of utterances exists, the value of the sentence type tag (tag 1) to be assigned to each sentence vector in the group of utterances is inferred, and the inference result is appended to the sentence vector data.
[0112] The first processing unit 11 reads the sentence vector data shown in Figure 20 from the storage unit 15 (step S8-1).
[0113] The first processing unit 11 sets n to 1 (step S8-2). n represents the nth utterance in the utterance group and is denoted as utterance group n.
[0114] The first processing unit 11 determines whether or not utterance group n exists in the sentence vector data (step S8-3). If utterance group n exists in the sentence vector data, steps S8-4 to S8-9 are executed. If utterance group n does not exist in the sentence vector data, the process is terminated.
[0115] The first processing unit 11 sets m to 1 (step S8-4). m represents the m-th sentence vector data and is denoted as sentence vector m.
[0116] The first processing unit 11 determines whether or not a sentence vector m exists within the utterance group n (step S8-5). If a sentence vector m does not exist within the utterance group n, the process proceeds to step S8-6. If a sentence vector m exists within the utterance group n, steps S8-7 to S8-9 are executed.
[0117] The first processing unit 11 sets n to n+1 and returns to step S8-3 (step S8-6).
[0118] The first processing unit 11 uses the learning model acquired through the learning performed in step S4-4 of Figure 14 to infer the sentence type tag (the numerical value of tag 1) of the sentence vector m (step S8-7).
[0119] The first processing unit 11 writes the sentence type tag (the numerical value of tag 1) of the inferred sentence vector m to the sentence vector data (step S8-8).
[0120] The first processing unit 11 sets m to m+1 and returns to step S8-5 (step S8-9).
[0121] As a result of the processing shown in Figure 22, each sentence vector in the sentence vector data shown in Figure 20 is assigned a sentence type tag (tag 1) based on the inference result, as shown in Figure 23.
[0122] Figure 24 is a flowchart showing the details of step S9 in Figure 17, i.e., the flow of the inference process for the relationship with the preceding context. In this process, the sentence vector data after sentence type tag inference shown in Figure 23 and the paragraph vector data shown in Figure 21 are read, and starting with the second utterance group, as long as there are utterance groups, the value of tag 2 that should be assigned to each sentence vector in the utterance group is inferred based on its relationship with the paragraph vector of the previous utterance group, and the inference result is appended to the sentence vector data.
[0123] The second processing unit 12 reads from the storage unit 15 the sentence vector data after sentence type tag inference shown in Figure 23 and the paragraph vector data shown in Figure 21 (step S9-1).
[0124] The second processing unit 12 sets n to 2 (step S9-2). n represents the nth utterance in the utterance group and is denoted as utterance group n.
[0125] The second processing unit 12 determines whether or not utterance group n exists in the sentence vector data after sentence type tag inference (step S9-3). If utterance group n exists in the sentence vector data after sentence type tag inference, steps S9-3 to S9-11 are executed. If utterance group n does not exist in the sentence vector data after sentence type tag inference, the process is terminated.
[0126] The second processing unit 12 sets m to 1 (step S9-4). m represents the m-th sentence vector data and is denoted as sentence vector m.
[0127] The second processing unit 12 determines whether or not a sentence vector m exists within the utterance group n (step S9-5). If a sentence vector m does not exist within the utterance group n, step S9-6 is executed. If a sentence vector m exists within the utterance group n, steps S9-7 to S9-11 are executed.
[0128] The second processing unit 12 sets n to n+1 and returns to step S9-3 (step S9-6).
[0129] The second processing unit 12 determines whether the sentence type tag (value of tag 1) of the sentence vector m is a tag to which tag 2 should be assigned, based on whether or not there is an association between tag 1 and tag 2 (step S9-7).
[0130] Specifically, the second processing unit 12 determines that tags 1 that are already associated with tag 2 are eligible for tag 2 assignment. For example, the second processing unit 12 will assign tag 2 to tags 1 that have an arrow line pointing towards tag 2, as shown in Figure 3. Tags 1 that do not have an arrow line to tag 2 ("agree", "reject", "topic change request") will not be assigned tag 2.
[0131] If the sentence type tag of sentence vector m is not a tag to which tag 2 will be assigned, step S9-8 is executed. If the sentence type tag of sentence vector m is a tag to which tag 2 will be assigned, steps S9-9 to S9-11 are executed.
[0132] The second processing unit 12 sets m to m+1 and returns to step S9-5 (step S9-8).
[0133] The second processing unit 12 infers the relationship between the sentence vector m and the paragraph vector of the utterance group n-1 (the value of tag 2 of the sentence vector m) (step S9-9).
[0134] Specifically, the second processing unit 12 obtains the paragraph vector of utterance group n-1 from the paragraph vector data shown in Figure 21, and uses the learning model acquired through the learning performed in step S5-4 in Figure 15 (a learning model that has learned the combination of preceding context vectors and tag 2 values) to find the tag 2 value that best matches the preceding context vector to the paragraph vector of utterance group n-1.
[0135] The second processing unit 12 writes the value of tag 2 of the inferred sentence vector m to the sentence vector data after sentence-type tag inference (steps S9-10).
[0136] The second processing unit 12 sets m to m+1 and returns to step S9-5 (step S9-11).
[0137] Figure 25 is a flowchart showing the details of step S10 in Figure 17, i.e., the flow of the inference process for relationships with subsequent contexts. In this process, the sentence vector data after sentence type tag inference shown in Figure 23 and the paragraph vector data shown in Figure 21 are read, and starting with the first utterance group, as long as there are utterance groups, the value of tag 3 that should be assigned to each sentence vector in the utterance group is inferred based on its relationship with the paragraph vector of the next utterance group, and the inference result is appended to the sentence vector data.
[0138] The third processing unit 13 reads from the storage unit 15 the sentence vector data after sentence type tag inference shown in Figure 23 and the paragraph vector data shown in Figure 21 (step S10-1).
[0139] The third processing unit 13 sets n to 1 (step S10-2). n represents the nth utterance in the utterance group and is denoted as utterance group n.
[0140] The third processing unit 13 determines whether or not utterance group n+1 exists in the sentence vector data after sentence type tag inference (step S10-3). If utterance group n+1 exists in the sentence vector data after sentence type tag inference, steps S10-4 to S10-11 are executed. If utterance group n+1 does not exist in the sentence vector data after sentence type tag inference, the process is terminated.
[0141] The third processing unit 13 sets m to 1 (step S10-4). m represents the m-th sentence vector data and is denoted as sentence vector m.
[0142] The third processing unit 13 determines whether or not a sentence vector m exists within the utterance group n (step S10-5). If a sentence vector m does not exist within the utterance group n, step S10-6 is executed. If a sentence vector m exists within the utterance group n, steps S10-7 to S10-11 are executed.
[0143] The third processing unit 13 sets n to n+1 and returns to step S10-3 (step S10-6).
[0144] The third processing unit 13 determines whether the sentence type tag (value of tag 1) of the sentence vector m is a tag to which tag 3 should be assigned, based on whether or not there is a correspondence between tag 1 and tag 3 (step S10-7).
[0145] Specifically, the third processing unit 13 targets tags 1 that have a corresponding relationship with tag 3 for tag 3 assignment. For example, if the content of tag 1 is "question," the third processing unit 13 will target tag 1 for tag 3 assignment if there is a tag 3 related to "question." In the case of Figure 3, focusing on tag 1 related to "question," there are tags 3 related to "question," such as "question with an affirmative answer," "question with a negative answer," and "question that was evasive," so tag 1 will be targeted for tag 3 assignment.
[0146] If the sentence type tag of sentence vector m is not a tag to which tag 3 will be assigned, the process proceeds to step S10-8. If the sentence type tag of sentence vector m is a tag to which tag 3 will be assigned, steps S10-9 to S10-11 are executed.
[0147] The third processing unit 13 sets m to m+1 and returns to step S10-5 (step S10-8).
[0148] The third processing unit 13 infers the relationship between the sentence vector m and the paragraph vectors of the utterance group n+1 (the value of tag 3 of the sentence vector m) (step S10-9).
[0149] Specifically, the third processing unit 13 obtains the paragraph vector of utterance group n+1 from the paragraph vector data in Figure 21, and uses the learning model acquired through the learning performed in step S6-4 in Figure 16 (a learning model that has learned the combination of the subsequent context vector and the tag 3 value of the sentence vector) to find the tag 3 value that best matches the paragraph vector of utterance group n+1.
[0150] The third processing unit 13 writes the value of tag 3 of the inferred sentence vector m to the sentence vector data after sentence-type tag inference (step S10-10).
[0151] The third processing unit 13 sets m to m+1 and returns to step S10-5 (step S10-11).
[0152] As a result of the processing shown in Figures 24 and 25, each sentence vector in the sentence vector data of Figure 23 is assigned a relationship inference result tag (Tag 2, Tag 3) as shown in Figure 26. The assignment of these Tag 2 and Tag 3 constitutes the discourse structure analysis result of the document text data in this disclosure.
[0153] [effect] According to this embodiment, in a dialogue document containing a conversation between two parties (speakers A and B), the sentence type of each utterance by each speaker (speakers A and B) is inferred, the relationship between a predetermined speaker's (speaker B's) utterance in the dialogue document and the preceding group of utterances to the utterance context of the other speaker (speaker A) is inferred, and the relationship between a predetermined speaker's (speaker B's) utterance in the dialogue document and the following group of utterances to the utterance context of the other speaker (speaker A) is inferred. As a result, useful information for analyzing the entire dialogue document can be obtained, contributing to the improvement of dialogue document analysis technology.
[0154] [others] This disclosure is not limited to the embodiments described above. This disclosure can be modified in numerous ways within the scope of its essence.
[0155] The analysis device 1 of this embodiment described above can be realized using a general-purpose computer system, for example, as shown in Figure 27, which includes a CPU 901, a memory 902, a storage 903, a communication device 904, an input device 905, and an output device 906. The memory 902 and the storage 903 are storage devices. In this computer system, each function of the analysis device 1 is realized when the CPU 901 executes a predetermined program loaded onto the memory 902.
[0156] The analysis device 1 may be implemented on a single computer. The analysis device 1 may be implemented on multiple computers. The analysis device 1 may also be a virtual machine implemented on a computer.
[0157] The program for analysis device 1 can be stored on a computer-readable recording medium such as an HDD, SSD, USB memory, CD, or DVD. A computer-readable recording medium is, for example, a non-transitory recording medium. The program for analysis device 1 can also be distributed via a communication network. [Explanation of Symbols]
[0158] 1 Analysis device 11. First Processing Unit 12 Second Processing Unit 13 Third Processing Unit 14. Fourth Processing Unit 15 Storage section 901 CPU 902 memory 903 Storage 904 Communication equipment 905 Input device 906 Output device
Claims
1. In an analysis device that analyzes dialogue documents containing conversations between two parties, A first processing unit performs machine learning on multiple training data combining utterances and the sentence types of the utterances, and uses the machine learning model to infer the sentence types of the utterances contained in the dialogue document. A second processing unit performs machine learning on multiple training data sets that combine one or more utterances included in the preceding utterance group, each containing information indicating its relationship to the utterance context of the preceding utterance group, and the utterance context of the preceding utterance group, and uses the machine learning model to infer the relationship between a predetermined speaker's utterance included in the dialogue document and the utterance context of the preceding utterance group of the other speaker. A third processing unit performs machine learning on multiple training data sets that combine one or more utterances included in a subsequent utterance group, each containing information indicating its relationship to the utterance context of the subsequent utterance group, with the utterance context of the subsequent utterance group, and uses the machine learning model to infer the relationship between a predetermined speaker's utterance included in the dialogue document and the utterance context of the subsequent utterance group of the other speaker. An analytical device equipped with the following features.
2. In an analysis method for analyzing dialogue documents that include conversations between two parties, The analysis device, A first machine learning method is performed, which involves machine learning multiple training data sets that combine spoken sentences and the sentence types of said spoken sentences. A second machine learning process is performed, which involves combining multiple training data sets that combine one or more utterances included in the preceding utterance group, each containing information indicating its relationship to the utterance context of the preceding utterance group, with the utterance context of the preceding utterance group. A third machine learning method is performed, which involves combining multiple training data sets that combine one or more utterances included in the subsequent utterance group, each containing information indicating its relationship to the utterance context of the subsequent utterance group, with the utterance context of the subsequent utterance group. Using the first machine learning model described above, the sentence type of the utterances contained in the dialogue document is inferred. Using the second machine learning model described above, the relationship between a predetermined speaker's utterance included in the dialogue document and the preceding group of utterances of the other speaker's utterance is inferred. Using the third machine learning model described above, the relationship between a predetermined speaker's utterance included in the dialogue document and the subsequent group of utterances of the other speaker's utterance context is inferred. Analysis method.
3. An analysis program that causes a computer to function as the analysis device described in claim 1.