Information processing program, information processing method, and information processing device
Patent Information
- Application Number
- PCT/JP2023/031586
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2025-03-06
Smart Images

Figure JP2023031586_06032025_PF_FP_ABST
Abstract
Description
Information processing program, information processing method, and information processing device
[0001] The present invention relates to an information processing program and the like.
[0002] Servers that provide search services for similar sentences, etc., have a huge amount of sentence data registered in a database (DB), and are required to appropriately search this DB for sentences similar to the search query specified by the user.
[0003] For example, in a conventional technique, a sentence vector of a search query is calculated, and a DB is searched for sentences with sentence vectors similar to the sentence vector of the search query. Note that, as a conventional technique using sentence vectors, training data consisting of sentence vectors and predetermined labels is created in advance, and machine learning is performed on a machine learning model.
[0004] Japanese Patent Application Laid-Open No. 2005-258831
[0005] However, the above-mentioned conventional techniques are unable to efficiently set sentence vectors for sentences, and there is room for improvement in machine learning of machine learning models that use sentence vectors.
[0006] In one aspect, the present invention aims to provide an information processing program, an information processing method, and an information processing device that can efficiently perform machine learning of a machine learning model.
[0007] In the first proposal, a computer is caused to execute the following process. The computer retrieves a sentence registered in a storage unit. The computer extracts predicates from each of a plurality of sentences included in the sentence, each of which has a complete meaning based on a subject, a predicate, and an object. The computer identifies cluster identification information for the plurality of predicates extracted by the extraction process based on a cluster dictionary in which similar predicates are clustered so that they belong to the same cluster. The computer uses the cluster identification information for the extracted plurality of predicates as input data and performs machine learning on a machine learning model using patterns of combinations of the cluster identification information for the plurality of predicates as labels.
[0008] Machine learning for machine learning models can be performed efficiently.
[0009] FIG. 1 is a diagram illustrating a process for extracting characteristic sentences from a text. FIG. 2 is a diagram illustrating a process for clustering characteristic sentences. FIG. 3 is a diagram (1) illustrating a process for the search phase. FIG. 4 is a diagram (2) illustrating a process for the search phase. FIG. 5 is a diagram illustrating a process for calculating similarity. FIG. 6 is a functional block diagram illustrating a configuration of an information processing device according to the first embodiment. FIG. 7 is a diagram illustrating an example of a data structure of a transition table. FIG. 8 is a flowchart illustrating a process procedure of the information processing device according to the first embodiment. FIG. 9 is a flowchart illustrating a process procedure for the preparation phase according to the first embodiment. FIG. 10 is a flowchart illustrating a process procedure for the search phase according to the first embodiment. FIG. 11 is a flowchart illustrating a process procedure for the ranking phase according to the first embodiment. FIG. 12 is a diagram illustrating a process for generating teacher data. FIG. 13 is a diagram illustrating a process for the learning phase. FIG. 14 is a diagram (1) illustrating a process for the inference phase. FIG. 15 is a diagram (2) illustrating a process for the inference phase. FIG. 16 is a diagram illustrating a process for the identification phase. FIG. 17 is a diagram illustrating an example of machine learning of a machine learning model using a teacher dataset. FIG. 18 is a functional block diagram showing a configuration of an information processing device according to the second embodiment. FIG. 19 is a flowchart showing a processing procedure of the information processing device according to the second embodiment. FIG. 20 is a flowchart showing a processing procedure of a preparation phase according to the second embodiment. FIG. 21 is a flowchart showing a processing procedure of a teacher data creation process according to the second embodiment. FIG. 22 is a flowchart showing a processing procedure of a learning phase according to the second embodiment. FIG. 23 is a flowchart showing a processing procedure of an inference phase according to the second embodiment. FIG. 24 is a flowchart showing a processing procedure of a specification phase according to the second embodiment. FIG. 25 is a diagram showing an example of a hardware configuration of a computer that realizes similar functions to the information processing device of the embodiments.
[0010] Hereinafter, an information processing program, an information processing method, and an information processing device disclosed in the present application will be described in detail with reference to the accompanying drawings. However, the present invention is not limited to these embodiments.
[0011] An information processing device according to the first embodiment will be described. For example, the information processing device according to the first embodiment performs a preparation phase process, a search phase process, and a ranking phase process. The information processing device according to the first embodiment will be referred to as an "information processing device 100." In addition, in the first embodiment, the granularity of a character string will be described by dividing it into "words," "sentences," and "paragraphs." A sentence is a unit that includes multiple words and has a complete meaning with a subject, a predicate, and an object.
[0012] For example, sentences are "Horses like sweet carrots," "This program is made up of multiple subprograms," "The cat is sleeping," etc. A sentence is a text that combines multiple sentences to form one meaning. In this Example 1, the vector of a sentence is represented as a sentence vector, and the vector of a sentence is represented as a sentence vector.
[0013] First, a description will be given of the preparatory phase processing executed by the information processing device 100. For example, the preparatory phase includes processing for extracting characteristic sentences from texts and processing for clustering the characteristic sentences, and an inverted index 60 is generated.
[0014] The process of extracting characteristic sentences from a sentence by the information processing device 100 will be described. FIG. 1 is a diagram for explaining the process of extracting characteristic sentences from a sentence. The information processing device 100 has a text DB 50 that stores a plurality of sentences. For example, the text DB 50 may have a break between each sentence (the position of the beginning of each sentence) set so that it can be identified.
[0015] The information processing device 100 extracts one sentence te1 from the text DB 50. For example, the sentence te1 includes a plurality of sentences se1-1, se1-2, se1-3, and se1-4.
[0016] The information processing device 100 calculates the sentence vectors of each of sentences se1-1 to se1-4 using Word2Vec or the like. The information processing device 100 extracts multiple words by performing morphological analysis on sentence se1-1. The information processing device 100 identifies the vectors of each word based on a word vector table 55 prepared in advance, and calculates the sentence vector of sentence se1-1 by accumulating the vectors of each word. The word vector table 55 is a table that associates words with vectors.
[0017] Here, as an example, the sentence vectors of sentences se1-1 to se1-4 are respectively set as sentence vectors sv1-1, sv1-2, sv1-3, and sv1-4. Furthermore, the information processing device 100 calculates the sentence vector tv1 of sentence te1 by integrating sentence vectors sv1-1 to sv1-4.
[0018] The information processing device 100 calculates the cosine similarity between the sentence vector tv1 and each of the sentence vectors sv1-1 to sv1-4, and extracts, based on the cosine similarity, sentences whose sentence vectors deviate from the sentence vector tv1 as "characteristic sentences." For example, the information processing device 100 extracts, as characteristic sentences, sentences whose sentence vectors have cosine similarities with the sentence vectors that are less than a threshold value.
[0019] 1, the cosine similarity between sentence vector tv1 and sentence vector sv1-1, the cosine similarity between sentence vector tv1 and sentence vector sv1-2, and the cosine similarity between sentence vector tv1 and sentence vector sv1-3 are each set to be less than a threshold. In this case, the information processing device 100 extracts sentence se1-1 of sentence vector sv1-1, sentence se1-2 of sentence vector sv1-2, and sentence se1-3 of sentence vector sv1-2 as characteristic sentences.
[0020] The information processing device 100 also executes the above process on other sentences stored in the text DB 50 to extract a plurality of characteristic sentences.
[0021] Next, the information processing device 100 clusters the feature sentences based on the "predicates" of the feature sentences extracted in the process of FIG. 1 . The information processing device 100 identifies predicates from sentences (feature sentences) by performing morphological analysis or Semantic Role Labeling (SRL) on the feature sentences. Note that, if the last word of a feature sentence is a particle, the information processing device 100 may identify an adjective or noun corresponding to the last word included in the feature sentence as the predicate. For example, the predicate of the sentence "Horses like sweet carrots" is "like." The predicate of the sentence "This program is composed of multiple subprograms" is "composed." The predicate of the sentence "The cat is sleeping" is "sleeping." Note that the granularity of the predicates identified by the information processing device 100 corresponds to the granularity of words.
[0022] FIG. 2 is a diagram for explaining the process of clustering characteristic sentences. In the explanation of FIG. 2, the characteristic sentences are explained as sentences se1-1, se1-2, and se1-3. For example, the information processing device 100 identifies a predicate pr1-1 from sentence se1-1. The information processing device 100 identifies a predicate pr1-2 from sentence se1-2. The information processing device 100 identifies a predicate pr1-3 from sentence se1-3.
[0023] The information processing device 100 identifies the vector of each predicate based on the word vector table 55. For example, the vector of predicate pr1-1 is set as pv1-1, the vector of predicate pr1-2 is set as pv1-2, and the vector of predicate pr1-3 is set as pv1-3.
[0024] The information processing device 100 also identifies predicates for the other characteristic sentences extracted in the process of FIG. 1 and identifies vectors for each predicate.
[0025] The information processing device 100 performs clustering on the vectors of predicates of multiple feature sentences. For convenience of explanation, Fig. 2 shows a two-dimensional vector space V1 with the horizontal axis as x and the vertical axis as y. For example, when the information processing device 100 performs clustering on the vectors of predicates of multiple feature sentences, the vectors of each predicate are classified into clusters cr1, cr2, and cr3.
[0026] For example, vector pv1-1 of predicate pr1-1 is classified into cluster cr1. Vector pv1-2 of predicate pr1-2 is classified into cluster cr2. Vector pv1-3 of predicate pr1-3 is classified into cluster cr3. For ease of explanation, the example shown in FIG. 2 shows clusters cr1 to cr3, but other clusters may also be included.
[0027] The information processing device 100 sets the cluster ID of the cluster into which the predicate vector of the characteristic sentence is classified as the identification number of the corresponding characteristic sentence. For example, the cluster ID of cluster cr1 is set to "ID1", the cluster ID of cluster cr2 is set to "ID2", and the cluster ID of cluster cr3 is set to "ID3".
[0028] The information processing device 100 sets the cluster ID "ID1" to the sentence se1-1 because the vector pv1-1 of the predicate pr1-1 is classified into cluster cr1. The information processing device 100 sets the cluster ID "ID2" to the sentence se1-2 because the vector pv1-2 of the predicate pr1-2 is classified into cluster cr2. The information processing device 100 sets the cluster ID "ID3" to the sentence se1-3 because the vector pv1-3 of the predicate pr1-3 is classified into cluster cr3.
[0029] The information processing device 100 registers the relationship between the cluster ID set for the characteristic sentence and the position of the corresponding characteristic sentence in the text DB 50 in the transposed index 60. The information processing device 100 repeatedly executes the above process for characteristic sentences extracted from multiple sentences stored in the text DB 50, thereby registering the relationship between the cluster ID set for each characteristic sentence and the position of the characteristic sentence in the transposed index 60. For example, the position of the characteristic sentence is set as an offset from the beginning of the text DB 50.
[0030] As described above, the information processing device 100 generates the inverted index 60 by executing the processing in the preparation phase. When generating the inverted index 60, the information processing device 100 identifies vectors of predicates included in characteristic sentences and excludes the processing of identifying vectors of other words, thereby reducing the generation cost of the inverted index 60. The predicate clustering result shown in FIG. 2 is used in the processing in the search phase. In the following description, the predicate clustering result shown in FIG. 2 is referred to as a "predicate cluster dictionary 70."
[0031] Next, the processing of the search phase executed by the information processing device 100 will be described. FIGS. 3 and 4 are diagrams for explaining the processing of the search phase. First, FIG. 3 will be described. In the description of FIG. 3, a search query q1 is a sentence specified by a user, and includes, for example, sentences se2-1, se2-2, se2-3, and se2-4 in order from the beginning. When the information processing device 100 acquires the search query q1, it extracts sentences se2-2, se2-3, and se2-4 from the search query q1 as characteristic sentences. The processing by which the information processing device 100 extracts characteristic sentences from sentences included in a sentence (search query q1) is the same as the processing described with reference to FIG. 1.
[0032] The information processing device 100 identifies predicates pr2-2, pr2-3, and pr2-4 from the characteristic sentences se2-2, se2-3, and se2-4, respectively. The process of identifying predicates from sentences is the same as the process described in FIG. 2. The information processing device 100 identifies the vectors of each of the predicates pr2-2 to pr2-4 based on the word vector table 55. For example, the vector of predicate pr2-2 is designated pv2-2. The vector of predicate pr2-3 is designated pv2-3. The vector of predicate pr2-4 is designated pv2-4.
[0033] The information processing device 100 sets cluster IDs for the sentences se2-2, se2-3, and se2-4 that become characteristic sentences based on the vectors of the predicates pr2-2 to pr2-4 and the predicate cluster dictionary 70. For example, the information processing device 100 compares the distance between the vector of the predicate and the center of each cluster included in the predicate cluster dictionary 70, and sets the cluster ID of the cluster with the smallest distance as the cluster ID of the characteristic sentence that includes the predicate.
[0034] The information processing device 100 compares the distance between the vector of the predicate pr2-2 and the clusters cr1 to cr3 included in the predicate cluster dictionary 70, and determines that the distance between the vector of the predicate pr2-2 and the cluster cr2 is the smallest. In this case, the information processing device 100 sets the cluster ID "ID2" to the sentence se2-2.
[0035] The information processing device 100 compares the distance between the vector of the predicate pr2-3 and the clusters cr1 to cr3 included in the predicate cluster dictionary 70, and determines that the distance between the vector of the predicate pr2-3 and the cluster cr1 is the smallest. In this case, the information processing device 100 sets the cluster ID "ID1" to the sentence se2-3.
[0036] The information processing device 100 compares the distance between the vector of the predicate pr2-4 and the clusters cr1 to cr3 included in the predicate cluster dictionary 70, and determines that the distance between the vector of the predicate pr2-4 and the cluster cr3 is the smallest. In this case, the information processing device 100 sets the cluster ID "ID3" to the sentence se2-4.
[0037] As described above, the information processing device 100 executes the process shown in FIG. 3 to extract characteristic sentences from the search query q1 and set cluster IDs to the characteristic sentences.
[0038] Next, we move on to the description of Fig. 4. The information processing device 100 searches for multiple similar sentences corresponding to the transition of cluster IDs in the order of "ID2" → "ID1" → "ID3," which is the search result. For example, it is assumed that the information processing device 100 stores a transition table 80 that associates the transition of cluster IDs with the positions (positions in the text DB 50) of similar sentences corresponding to the transition of cluster IDs. In the example shown in Fig. 4, similar sentences TX1, TX2, and TX3 are detected as similar sentences corresponding to the transition of cluster IDs in the order of cluster ID "ID2" → "ID1" → "ID3."
[0039] As described above, by executing the process shown in FIG. 4, the cluster ID corresponding to the characteristic sentence of the search query q1 is searched for, and a plurality of similar sentences are searched for based on the transition of the cluster ID.
[0040] The information processing device 100 may search for similar sentences from the text DB 50 based on the positions of multiple sentences corresponding to the cluster IDs set in the transposed index 60. For example, the information processing device 100 may extract, as similar sentences, sentences stored at positions including the position of a sentence corresponding to cluster ID "ID2", the position of a sentence corresponding to cluster ID "ID1", and the position of cluster ID "ID3".
[0041] Next, a description will be given of the ranking phase processing executed by the information processing device 100. The ranking phase processing includes a process of calculating the similarity between the search query and similar sentences and a process of ranking. In the description of the ranking phase processing, the similar sentences TX1, TX2, and TX3 are assumed to have been searched for as similar sentences.
[0042] FIG. 5 is a diagram for explaining the process of calculating similarity. In the explanation of FIG. 5, a case will be described in which the similarity between the search query q1 and the similar sentence TX1 is calculated. First, the process in which the information processing device 100 calculates the sentence vector of the search query q1 will be explained. The information processing device 100 extracts sentences se2-2, se2-3, and se2-4 from the search query q1 as characteristic sentences. The process in which the information processing device 100 extracts characteristic sentences from the sentences included in the search query q1 is the same as the process explained in FIG. 1.
[0043] The information processing device 100 performs morphological analysis on each characteristic sentence to extract a "predicate," a "subject," and an "object." For example, the information processing device 100 extracts a predicate pr2-2, a subject su2-2, and an object ob2-2 from a sentence se2-2. The information processing device 100 identifies the vectors of the predicate pr2-2, the subject su2-2, and the object ob2-2 based on a word vector table prepared in advance, and calculates a sentence vector v2-2 of the sentence se2-2 by integrating the identified vectors.
[0044] The information processing device 100 extracts the predicate pr2-3, the subject su2-3, and the object ob2-3 from the sentence se2-3. The information processing device 100 specifies the vectors of the predicate pr2-3, the subject su2-3, and the object ob2-3 based on the word vector table 55, and calculates the sentence vector v2-3 of the sentence se2-3 by adding up the specified vectors.
[0045] The information processing device 100 extracts the predicate pr2-4, the subject su2-4, and the object ob2-4 from the sentence se2-4. The information processing device 100 specifies the vectors of the predicate pr2-4, the subject su2-4, and the object ob2-4 based on the word vector table 55, and calculates the sentence vector v2-4 of the sentence se2-4 by adding up the specified vectors.
[0046] The information processing device 100 calculates the sentence vector tv2 of the search query q1 by integrating the sentence vectors v2-2, v2-3, and v2-4 calculated by the above process.
[0047] Next, the process by which the information processing device 100 calculates the sentence vector of the similar sentence TX1 will be described. The information processing device 100 extracts sentences se10-2, se10-3, and se10-4 as characteristic sentences from the similar sentence TX1. The process by which the information processing device 100 extracts characteristic sentences from sentences included in the similar sentence TX1 is the same as the process described in FIG.
[0048] The information processing device 100 performs morphological analysis on each characteristic sentence to extract a "predicate," a "subject," and an "object." For example, the information processing device 100 extracts a predicate pr10-2, a subject su10-2, and an object ob10-2 from a sentence se10-2. The information processing device 100 identifies the vectors of the predicate pr10-2, the subject su10-2, and the object ob10-2 based on the word vector table 55, and calculates a sentence vector v10-2 of the sentence se10-2 by integrating the identified vectors.
[0049] The information processing device 100 extracts a predicate pr10-3, a subject su10-3, and an object ob10-3 from the sentence se10-3. The information processing device 100 specifies the vectors of the predicate pr10-3, the subject su10-3, and the object ob10-3 based on the word vector table 55, and calculates a sentence vector v10-3 of the sentence se10-3 by integrating the specified vectors.
[0050] The information processing device 100 extracts a predicate pr10-4, a subject su10-4, and an object ob10-4 from the sentence se10-4. The information processing device 100 specifies the vectors of the predicate pr10-4, the subject su10-4, and the object ob10-4 based on the word vector table 55, and calculates a sentence vector v10-4 of the sentence se10-4 by integrating the specified vectors.
[0051] The information processing device 100 calculates the sentence vector tv10 of the similar sentence TX1 by integrating the sentence vectors v10-2, v10-3, and v10-4 calculated by the above process.
[0052] 5, the information processing device 100 calculates sentence vectors for similar sentences TX2 and TX3 by performing the same process as for similar sentence TX1. For example, the sentence vector for similar sentence TX2 is set as sentence vector tv20. The sentence vector for similar sentence TX3 is set as sentence vector tv30.
[0053] The information processing device 100 calculates the cosine similarity s1-1 between the sentence vector tx2 of the search query q1 and the sentence vector tx10 of the similar sentence TX1. The information processing device 100 calculates the cosine similarity s1-2 between the sentence vector tx2 of the search query q1 and the sentence vector tx20 of the similar sentence TX2. The information processing device 100 calculates the cosine similarity s1-3 between the sentence vector tx2 of the search query q1 and the sentence vector tx30 of the similar sentence TX3.
[0054] Next, the ranking process will be described. The information processing device 100 displays the similar sentences TX1 to TX3 in descending order of cosine similarity. For example, the magnitude relationship of the cosine similarity is set to cosine similarity s1-1 > cosine similarity s1-2 > cosine similarity s-3. In this case, the information processing device 100 displays the similar sentence TX1 in the first ranking, the similar sentence TX2 in the second ranking, and the similar sentence TX3 in the third ranking.
[0055] As described above, when calculating the similarity between the search query q1 and each similar sentence, the information processing device 100 can improve the accuracy of the similarity by using the predicate, subject, and object of the characteristic sentence, compared to when only the predicate of the characteristic sentence is used.
[0056] Next, a description will be given of an example configuration of an information processing device 100 that executes the processes described above in FIGS. 1 to 5. Fig. 6 is a functional block diagram showing the configuration of the information processing device according to the first embodiment. As shown in Fig. 6, the information processing device 100 according to the first embodiment includes a communication unit 110, an input unit 120, a display unit 130, a storage unit 140, and a control unit 150.
[0057] The communication unit 110 executes data communication with external devices via a network, and is realized by a network interface card (NIC) or the like.
[0058] The input unit 120 is an input device that inputs various types of information to the information processing device 100. The input unit 120 corresponds to a keyboard, a mouse, a touch panel, etc. For example, a user operates the input unit 120 to input a search query or the like to the control unit 150.
[0059] The display unit 130 is a display device that displays information output from the control unit 150. The display unit 130 corresponds to a liquid crystal display, an organic EL (Electro Luminescence) display, a touch panel, etc. For example, the display unit 130 displays ranking results of similar sentences, etc.
[0060] The storage unit 140 includes a text DB 50, a word vector table 55, an inverted index 60, a predicate cluster dictionary 70, and a transition table 80. The storage unit 140 is realized by, for example, a semiconductor memory element such as a random access memory (RAM) or a flash memory, or a storage device such as a hard disk or an optical disk.
[0061] The text DB 50 is a database that stores a plurality of sentences. Other details regarding the text DB 50 are the same as those described above.
[0062] The word vector table 55 is a table that associates words with vectors corresponding to the words. Other details regarding the word vector table 55 are the same as those described above.
[0063] The inverted index 60 is an index that associates the cluster ID to which a predicate belongs with the position of a sentence having the corresponding predicate in the text DB 50. Other explanations regarding the inverted index 60 are the same as those given above.
[0064] The predicate cluster dictionary 70 holds information about clusters to which multiple predicates belong. The predicate cluster dictionary 70 is similar to the description of the predicate cluster dictionary 70 described with reference to FIG.
[0065] The transition table 80 is a table that associates transitions of cluster IDs with the positions of similar sentences in the text DB 50. FIG. 7 is a diagram showing an example of the data structure of the transition table. As shown in FIG. 7, this transition table 80 associates transitions with similar sentence positions. A transition is a transition of cluster IDs identified from a search sentence. For example, in the example described in FIG. 2, the transition "ID2" → "ID1" → "ID3" is identified from the search query q1. A similar document position is a position in the text DB 50 where a similar sentence corresponding to a transition is stored. It is possible that multiple similar sentence positions are set for one transition.
[0066] Next, we will explain the control unit 150. The control unit 150 has a preparation processing unit 151, a search processing unit 152, and a ranking processing unit 153. The control unit 150 is realized by, for example, a CPU (Central Processing Unit) or an MPU (Micro Processing Unit). The control unit 150 may also be implemented by an integrated circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array).
[0067] The preparation processing unit 151 executes the above-described preparation phase processing. For example, as the preparation phase processing, the preparation processing unit 151 executes processing to extract characteristic sentences from sentences and processing to cluster the characteristic sentences, and generates the transposed index 60. The preparation phase processing executed by the preparation processing unit 151 is similar to the above-described preparation phase processing.
[0068] The search processing unit 152 receives a search query from the input unit 120 or the like, and executes the above-described search phase processing. The search phase processing executed by the search processing unit 152 is the same as the processing related to the search phase described above. The search processing unit 152 outputs information on the search query and multiple similar sentences that are search results to the ranking processing unit 153.
[0069] The ranking processing unit 153 acquires the search query and a plurality of similar sentences, and executes the processing of the ranking phase described above. The processing of the ranking phase executed by the ranking processing unit 153 is the same as the processing related to the ranking phase described above. The ranking processing unit 153 outputs the ranking results to the display unit 130 for display.
[0070] Next, an example of a processing procedure of the information processing device 100 according to the present embodiment will be described. Fig. 8 is a flowchart showing the processing procedure of the information processing device according to the present embodiment. As shown in Fig. 8, the preparation processing unit 151 of the information processing device 100 executes a preparation phase process (step S11).
[0071] The search processing unit 152 of the information processing device 100 executes a search phase process (step S12), and the ranking processing unit 153 of the information processing device 100 executes a ranking phase process (step S13).
[0072] Here, an example of the processing procedure of the preparation phase shown in step S11 of Fig. 8 will be described. Fig. 9 is a flowchart showing the processing procedure of the preparation phase according to the first embodiment. As shown in Fig. 9, the preparation processing unit 151 of the information processing device 100 acquires an unacquired sentence from the text DB 50 (step S101).
[0073] The preparation processing unit 151 extracts multiple characteristic sentences from the sentence (step S102). The preparation processing unit 151 identifies a predicate of each characteristic sentence (step S103). If the preparation processing unit 151 has not acquired all the sentences (step S104, No), the preparation processing unit 151 returns to step S101.
[0074] If all the sentences have been acquired (Yes at step S104), the preparation processing unit 151 proceeds to step S105. The preparation processing unit 151 performs clustering on each predicate (step S105).
[0075] The preparation processing unit 151 identifies a cluster ID corresponding to each characteristic sentence based on the clustering result for each predicate (step S108).The preparation processing unit 151 sets the relationship between the cluster ID and the position of the characteristic sentence in the inverted index 60 (step S109).
[0076] Next, an example of the processing procedure of the search phase shown in step S12 of Fig. 8 will be described. Fig. 10 is a flowchart showing the processing procedure of the search phase. As shown in Fig. 10, the search processing unit 152 of the information processing device 100 accepts input of a search query (sentence) (step S201).
[0077] The search processing unit 152 extracts multiple characteristic sentences from the search query (step S202). The search processing unit 152 identifies a predicate of each characteristic sentence (step S203). The search processing unit 152 identifies the cluster ID of the cluster to which each predicate belongs based on the predicate of each characteristic sentence and the predicate cluster dictionary 70 (step S204).
[0078] The search processing unit 152 searches for a plurality of similar sentences based on the transition of the cluster ID and the transition table 80 (step S205).
[0079] Next, an example of the processing procedure of the ranking phase processing shown in step S13 of Fig. 8 will be described. Fig. 11 is a flowchart showing the processing procedure of the ranking phase processing. As shown in Fig. 11, the ranking processing unit 153 of the information processing device 100 extracts a plurality of characteristic sentences from a search query (step S301).
[0080] The ranking processing unit 153 identifies the predicate, subject, and object of each characteristic sentence of the search query (step S302). The ranking processing unit 153 calculates a sentence vector of the search query based on the predicate, subject, and object of each characteristic sentence (step S303).
[0081] The ranking processing unit 153 selects unselected similar sentences from the similar sentences found in the search phase (step S304), and extracts characteristic sentences from the selected similar sentences (step S305).
[0082] The ranking processing unit 153 identifies the predicate, subject, and object of the multiple characteristic sentences (step S306).The ranking processing unit 153 calculates the sentence vector of the selected similar sentence based on the predicate, subject, and object of each characteristic sentence (step S307).
[0083] If the ranking processing unit 153 has not selected all the similar sentences (step S308, No), the ranking processing unit 153 proceeds to step S304. On the other hand, if the ranking processing unit 153 has selected all the similar sentences (step S308, Yes), the ranking processing unit 153 proceeds to step S309.
[0084] The ranking processing unit 153 calculates the cosine similarity between the sentence vector of the search query and the sentence vector of each similar sentence (step S309). The ranking processing unit 153 ranks the similar sentences based on the cosine similarity (step S310). The ranking processing unit 153 displays the ranking results on the display unit 130 (step S311).
[0085] Next, the effects of the information processing device 100 according to the first embodiment will be described. The information processing device 100 extracts characteristic sentences from sentences in the text DB 50 and extracts predicates from the characteristic sentences. The information processing device 100 performs clustering on a plurality of predicates, associates cluster IDs corresponding to the predicates with position information of characteristic sentences having the predicates, and sets the associations in an inverted index. This makes it possible to narrow down the processing targets to predicates and reduce the cost of generating an inverted index.
[0086] When the information processing device 100 receives a search query, it extracts characteristic sentences from the search query and extracts predicates from the characteristic sentences. The information processing device 100 identifies clusters corresponding to each predicate based on the predicates extracted from the characteristic sentences of the search query and the predicate cluster dictionary 70, thereby identifying cluster IDs corresponding to each predicate. This makes it possible to identify transitions of cluster IDs corresponding to multiple sentences included in the search query.
[0087] The information processing device 100 identifies multiple similar sentences based on the transition of the cluster IDs. The information processing device 100 calculates the similarity based on the subjects, predicates, and objects of multiple sentences included in the search query and the subjects, predicates, and objects of multiple sentences included in the multiple similar sentences. This allows the similarity between the search query and the similar sentences to be calculated more accurately than if the predicates were used alone.
[0088] The information processing device 100 displays a ranking of multiple similar sentences based on the similarity between the search query and the multiple similar sentences, thereby allowing the user to easily identify which of the multiple similar sentences is more similar to the search query.
[0089] Next, an information processing device according to the second embodiment will be described. For example, the information processing device according to the second embodiment performs a preparation phase process, a learning phase process, an inference phase process, and an identification phase process. The information processing device according to the second embodiment will be referred to as an "information processing device 200." In addition, in the second embodiment, similar to the first embodiment, the granularity of character strings will be described as "words," "sentences," and "paragraphs." A sentence is a unit that includes multiple words and has a complete meaning with a subject, a predicate, and an object.
[0090] First, a description will be given of the processing in the preparation phase executed by the information processing device 200. For example, the preparation phase includes processing for extracting characteristic sentences from text, processing for clustering the characteristic sentences, and processing for creating training data.
[0091] The process of extracting characteristic sentences from a sentence and the process of clustering the characteristic sentences performed by the information processing device 200 are similar to the processes performed by the information processing device 100 described in Example 1. The information processing device 200 performs the process of extracting characteristic sentences from a sentence and the process of clustering the characteristic sentences to generate an inverted index 60 and a predicate cluster dictionary 70.
[0092] The process of creating training data by the information processing device 200 will be described. FIG. 12 is a diagram for explaining the process of generating training data. The information processing device 200 extracts from the text DB 50 a set of multiple sentences in which the transitions from the previous sentence to the next sentence are similar to each other. In the following description, a set of multiple sentences in which the transitions from the previous sentence to the next sentence are similar will be referred to as a "set of similar sentences." The sets of similar sentences included in the text DB 50 are specified in advance.
[0093] The transition from the previous sentence to the next sentence is identified by the change (difference) in the sentence vector from the sentence vector of the previous sentence to the sentence vector of the next sentence. For example, suppose sentence A contains sentences 1a and 1b, and another sentence B contains sentences 1c and 1d. The difference between the sentence vector of sentence 1a and the sentence vector of sentence 1b is defined as difference D1, and the difference between the sentence vector of sentence 1c and the sentence vector of sentence 1d is defined as difference D2. If the difference between difference D1 and difference D2 is less than a threshold, sentence A and another sentence B are set as a pair of identical similar sentences.
[0094] 12 shows an example in which the information processing device 200 extracts sentences te1a, te1b, and te1c as a set of similar sentences. Sentence te1a includes multiple sentences se1a-1, se1a-2, and se1a-3. Sentence te1b includes multiple sentences se1b-1, se1b-2, and se1b-3. Sentence te1c includes multiple sentences se1c-1, se1c-2, and se1c-3.
[0095] For example, the transition from sentence se1a-1 to sentence se1a-2 in sentence tela is similar to the transition from sentence se1b-1 to sentence se1b-2 in sentence telb, and the transition from sentence se1c-1 to sentence se1c-2 in sentence telc.
[0096] The transition from sentence se1a-2 to sentence se1a-3 in sentence tela is similar to the transition from sentence se1b-2 to sentence se1b-3 in sentence telb, and the transition from sentence se1c-2 to sentence se1c-3 in sentence telc.
[0097] The information processing device 200 identifies the cluster ID of sentence se1a-1 included in document te1a by performing the following process. The information processing device 200 performs morphological analysis on sentence se1a-1 to extract predicates, and identifies the vector of the predicate based on the extracted predicates and the word vector table 55. The information processing device 200 identifies the cluster ID based on the vector of the predicate and the predicate cluster dictionary 70. For example, if the cluster ID of the predicate of sentence se1a-1 is "ID1," the information processing device 200 sets the cluster ID of sentence se1a-1 to "ID1." The information processing device 200 similarly sets cluster IDs "ID2" and "ID3" for sentences se1a-2 and se1a-3.
[0098] Similarly, the information processing device 200 sets clusters "ID1," "ID2," and "ID3" for sentences se1b-1, se1b-2, and se1b-3 included in sentence te1b. Similarly, the information processing device 200 sets clusters "ID1," "ID2," and "ID3" for sentences se1c-1, se1c-2, and se1c-3 included in sentence te1c.
[0099] The information processing device 200 identifies a transition pattern of the cluster IDs of sentences corresponding to a "set of similar sentences" based on the transition of the cluster IDs set for the sentences included in the sentences te1a to te1c. For example, when there are multiple transition patterns of the cluster IDs of sentences corresponding to a "set of similar sentences", the information processing device 200 identifies a transition pattern of the cluster IDs of sentences corresponding to a "set of similar sentences" based on a majority vote or the like.
[0100] 12, the information processing device 200 identifies "ID1 → ID2 → ID3" as the transition pattern of cluster IDs of sentences corresponding to a set of similar sentences (sentences te1a to te1c). The information processing device 200 also identifies a pattern type "transition pattern (1)" that uniquely identifies the identified transition pattern "ID1 → ID2 → ID3," and generates training data 85-1 that associates the transition pattern with the pattern type. The information processing device 200 registers the training data 85-1 in the training data set 85.
[0101] Furthermore, the information processing device 200 associates the pattern type "transition pattern (1)" with the position in the text DB 50 of any one of the sentences included in the "set of similar sentences", and registers them in the pattern table 90. The information processing device 200 may randomly select a sentence from the multiple sentences included in the "set of similar sentences", or may select the sentence that best matches the transition pattern. The example shown in FIG. 12 shows an example in which the information processing device 200 associates the pattern type "transition pattern (1)" with the position of the similar sentence, "the position of sentence te1a", and registers them in the pattern table 90.
[0102] The information processing device 200 repeatedly executes the above process for other "sets of similar sentences" designated in advance, thereby registering training data in the training data set 85, and registering the pattern type and the position of the sentence in the pattern table 90. In the following description, where appropriate, a sentence set in the position of a similar sentence set in the pattern table 90, which is a sentence located in the text DB 50, will be referred to as a "similar sentence."
[0103] As described in Figure 12, the information processing device 200 executes a process to generate training data, thereby generating a training data set 85 including multiple training data and a pattern table 90 that associates pattern types with the positions of similar sentences.
[0104] Next, the processing of the learning phase executed by the information processing device 200 will be described. FIG. 13 is a diagram for explaining the processing of the learning phase. The information processing device 200 executes machine learning of the machine learning model M1 based on backpropagation (backpropagation method) using the teacher dataset 85 generated in the preparation phase. A plurality of pieces of teacher data are registered in the teacher dataset 85. The machine learning model M1 is, for example, a neural network (NN).
[0105] For example, the information processing device 200 acquires teacher data 85-n from the teacher data set 85. The information processing device 200 inputs the transition pattern (ID1 → ID3 → ...) included in the teacher data 85-n into the machine learning model M1 to calculate an output result, and updates the parameters of the machine learning model M1 so as to reduce the difference between the output result and the pattern type (transition pattern (n)). The information processing device 200 repeatedly executes this process.
[0106] By executing the above-described learning phase processing, the information processing device 200 generates a machine learning model M1 that outputs a pattern type when a transition pattern is input.
[0107] Next, the processing of the inference phase executed by the information processing device 200 will be described. Figures 14 and 15 are diagrams for explaining the processing of the inference phase. First, Figure 14 will be described. The information processing device 200 accepts the specification of a sentence te20 to be analyzed. For example, sentence te20 includes, from the beginning, sentences se20-1, se20-2, and se20-3.
[0108] The information processing device 200 identifies predicates pr20-1, pr20-2, and pr20-3 from sentences se20-1, se20-2, and se20-3, respectively. The process of identifying predicates from sentences is the same as the process executed by the information processing device 100 in the first embodiment. The information processing device 200 identifies the vectors of each predicate pr20-1 to pv20-3 based on the word vector table 55. For example, the vector of predicate pr20-1 is defined as pv2-1. The vector of predicate pr20-2 is defined as pv20-2. The vector of predicate pr20-3 is defined as pv20-3.
[0109] The information processing device 200 sets cluster IDs for the sentences se20-1, se20-2, and se20-3 based on the vectors of the predicates pr20-1 to pr20-3 and the predicate cluster dictionary 70. For example, the information processing device 200 compares the distance between the vector of the predicate and the center of each cluster included in the predicate cluster dictionary 70, and sets the cluster ID of the cluster with the smallest distance as the cluster ID of the sentence containing the predicate.
[0110] The information processing device 200 compares the distance between the vector of the predicate pr20-1 and the clusters cr1 to cr3 included in the predicate cluster dictionary 70, and determines that the distance between the vector of the predicate pr20-1 and the cluster cr2 is the smallest. In this case, the information processing device 200 sets the cluster ID "ID2" to the sentence se20-1.
[0111] The information processing device 200 compares the distance between the vector of the predicate pr20-2 and the clusters cr1 to cr3 included in the predicate cluster dictionary 70, and determines that the distance between the vector of the predicate pr20-2 and the cluster cr1 is the smallest. In this case, the information processing device 200 sets the cluster ID "ID1" to the sentence se20-2.
[0112] The information processing device 200 compares the distance between the vector of the predicate pr20-3 and the clusters cr1 to cr3 included in the predicate cluster dictionary 70, and determines that the distance between the vector of the predicate pr20-3 and the cluster cr3 is the smallest. In this case, the information processing device 200 sets the cluster ID "ID3" to the sentence se20-3.
[0113] 14, the information processing device 200 sets cluster IDs for sentences se20-1 to se20-3 of the text te20. Furthermore, the information processing device 200 identifies the transition pattern "ID2 → ID1 → ID3" based on the cluster IDs set in order for sentences se20-1 to se20-3.
[0114] Next, we move on to the description of Fig. 15. The information processing device 200 obtains an output result (transition pattern type) by inputting the transition pattern "ID2 → ID1 → ID3" identified in Fig. 14 into the machine learning model M1 that has been trained in the learning phase.
[0115] The information processing device 200 compares the output result (transition pattern type) with the pattern table 90 to identify the position of the similar sentence corresponding to the pattern type. For example, the information processing device 200 extracts a similar sentence te30 from the text DB 50 based on the position of the similar sentence.
[0116] As described above, the information processing device 200 executes the processing of the inference phase to estimate a similar sentence te30 that is similar to the sentence te20 to be analyzed.
[0117] Next, the processing of the specific phase executed by the information processing device 200 will be described. FIGS. 16 and 17 are diagrams for explaining the processing of the specific phase. First, FIG. 16 will be described. In the explanation of FIG. 16, the sentence to be analyzed is assumed to be sentence te20, and a similar sentence estimated based on sentence te20 is assumed to be similar sentence te30. Sentence te20 includes sentences se20-1, se20-2, and se20-3. Similar sentence te30 includes sentences se30-1, se30-2, and se30-3.
[0118] The information processing device 200 performs morphological analysis on each of the sentences se20-1 to se20-3 to identify sentences se20-1 to se20-3 that are missing a subject or an object. Here, among the sentences se20-1 to se20-3, the sentence se20-2 is described as being missing a subject, and the sentence se20-3 is described as being missing an object.
[0119] The information processing device 200 extracts a predicate from the sentence se20-2, identifies a vector of the predicate based on the predicate and the word vector table 55, and sets the vector of the predicate of the sentence se20-2 as the sentence vector of the sentence se20-2. Sentence vectors are set in the same manner for the sentences se20-3, se30-1 to se30-3.
[0120] The information processing device 200 calculates the cosine similarity between the sentence vector of sentence se20-2 and the sentence vectors of sentences se30-1 to se30-3, and identifies the sentence with the greatest similarity. For example, assume that the cosine similarity between the sentence vector of sentence se20-2 and the sentence vector of sentence se30-2 is greater than the other cosine similarities. In this case, the information processing device 200 performs morphological analysis on sentence se30-2 and identifies the subject and predicate contained in sentence se30-2. Because a subject is missing in sentence se20-2, the information processing device 200 extracts the subject from sentence se30-2.
[0121] The information processing device 200 calculates the cosine similarity between the sentence vector of sentence se20-3 and the sentence vectors of sentences se30-1 to se30-3, and identifies the sentence with the greatest similarity. For example, assume that the cosine similarity between the sentence vector of sentence se20-3 and the sentence vector of sentence se30-3 is greater than the other cosine similarities. In this case, the information processing device 200 performs morphological analysis on sentence se30-3 and identifies the subject and predicate contained in sentence se30-3. Because sentence se20-3 lacks an object, the information processing device 200 extracts the object from sentence se30-3.
[0122] The information processing device 200 outputs the following information as the identification result of the above processing. The information processing device 200 finds that sentence se20-2 is missing a subject, and outputs the subject extracted from sentence se30-2 as a candidate subject. Furthermore, the information processing device 200 finds that sentence se20-3 is missing an object, and outputs the object extracted from sentence se30-3 as a candidate object.
[0123] As described above, the information processing device 200 executes the processing of the identification phase to identify sentences that are missing a subject or object among the sentences included in the text to be analyzed, and outputs candidates for the missing subject or object.
[0124] Meanwhile, when executing processing of a specific phase, the information processing device 200 may further execute the following processing to generate a teacher data set 95 that associates sentences with words (subjects or objects) that are missing from the sentences. For example, the information processing device 200 sets the sentence vector of sentence se20-2 as input data for teacher data 95-1, and sets the subject vector of sentence se30-2 as the label for teacher data 95-1. The information processing device 200 sets the sentence vector of sentence se20-3 as input data for teacher data 95-2, and sets the object vector of sentence se30-3 as the label for teacher data 95-2.
[0125] The information processing device 200 registers the teacher data 95-1 and 95-2 in the teacher dataset 95. The information processing device 200 executes the processing of the specific phase, thereby repeatedly executing the above processing and registering multiple pieces of teacher data in the teacher dataset 95.
[0126] Here, an example of machine learning of a machine learning model using a teacher dataset 95 will be described. FIG. 17 is a diagram for explaining an example of machine learning of a machine learning model using a teacher dataset. The information processing device 200 performs machine learning of a machine learning model M2 based on backpropagation (backpropagation method) using the teacher dataset 95 generated in a specific phase. A plurality of pieces of teacher data are registered in the teacher dataset 95. The machine learning model M2 is a neural network (NN) or the like.
[0127] For example, the information processing device 200 acquires training data 95-1 from the training data set 95. The information processing device 200 calculates an output result by inputting the vector of a sentence included in the training data 95-1 into the machine learning model M2, and updates the parameters of the machine learning model M2 so as to reduce the difference between the output result and the subject vector. The information processing device 200 repeatedly executes this process.
[0128] By executing the above process, the information processing device 200 generates a machine learning model M2 that outputs the missing subject or object when a sentence missing a subject or object is input.
[0129] When performing processing in the identification phase, the information processing device 200 may identify a missing subject or object using the trained machine learning model M2. For example, the information processing device 200 inputs sentence se20-2 of sentence se20 to be analyzed, shown in FIG. 16, into the trained machine learning model M2, thereby identifying a subject vector that is not included in sentence se20-2. The information processing device 200 compares the identified subject vector with the word vector table 55, thereby identifying a word (subject) that corresponds to the subject vector.
[0130] Next, a configuration example of an information processing device 200 that executes the processes shown in Figures 12 to 17 will be described. Figure 18 is a functional block diagram showing the configuration of an information processing device according to Example 2. As shown in Figure 18, the information processing device 200 according to Example 2 includes a communication unit 210, an input unit 220, a display unit 230, a storage unit 240, and a control unit 250.
[0131] The communication unit 210 executes data communication with external devices via a network, and is realized by a NIC or the like.
[0132] The input unit 220 is an input device that inputs various types of information to the information processing device 200. The input unit 220 corresponds to a keyboard, a mouse, a touch panel, etc. For example, a user operates the input unit 220 to input a sentence to be analyzed to the control unit 250.
[0133] The display unit 230 is a display device that displays information output from the control unit 250. The display unit 230 corresponds to a liquid crystal display, an organic EL (Electro Luminescence) display, a touch panel, etc. For example, the display unit 230 displays ranking results of similar sentences, etc.
[0134] The storage unit 240 includes a text DB 50, a word vector table 55, an inverted index 60, a predicate cluster dictionary 70, teacher data sets 85 and 95, a pattern table 90, and machine learning models M1 and M2. The storage unit 240 is realized by, for example, a semiconductor memory element such as a RAM or a flash memory, or a storage device such as a hard disk or an optical disk.
[0135] The text DB 50 is a database that stores a plurality of sentences. Other explanations regarding the text DB 50 are the same as those in Example 1. In Example 2, the sentences of the sentences stored in the text DB 50 include a subject, a predicate, and an object.
[0136] The word vector table 55 is a table that associates words with vectors corresponding to the words. Other explanations regarding the word vector table 55 are the same as those in the first embodiment.
[0137] The inverted index 60 is an index that associates the cluster ID to which a predicate belongs with the position of a sentence having the corresponding predicate in the text DB 50. Other explanations regarding the inverted index 60 are the same as those given in the first embodiment.
[0138] The predicate cluster dictionary 70 holds information about clusters to which a plurality of predicates belong. The predicate cluster dictionary 70 is similar to the description of the predicate cluster dictionary 70 described in FIG.
[0139] The teacher data set 85 holds a plurality of teacher data in which transition patterns (input data) are associated with pattern types (labels). The explanation of the teacher data set 85 is the same as the explanation of the teacher data set 85 in FIG. 12 .
[0140] The pattern table 90 stores information that associates pattern types with the positions of similar sentences. The explanation of the pattern table 90 is the same as the explanation of the pattern table 90 given in FIG.
[0141] The training data set 95 holds a plurality of training data in which sentence vectors (input data) of sentences lacking a subject or object are associated with vectors (labels) of the subject or object. The explanation of the training data set is the same as the explanation of the training data set 95 in FIG. 17 .
[0142] The machine learning model M1 is a machine learning model that outputs a pattern type when a transition pattern is input. The rest of the description of the machine learning model M1 is the same as the above description.
[0143] The machine learning model M2 is a machine learning model that outputs a vector of the missing subject or object when a sentence vector of a sentence lacking a subject or object is input. The rest of the description of the machine learning model M2 is the same as the description above.
[0144] We will now move on to explaining the control unit 250. The control unit 250 has a preparation processing unit 251, a learning processing unit 252, an inference processing unit 253, and a specification processing unit 254. The control unit 250 is realized by, for example, a CPU or an MPU. The control unit 250 may also be executed by, for example, an integrated circuit such as an ASIC or an FPGA.
[0145] The preparation processing unit 251 executes the above-described preparation phase processing. For example, as the preparation phase processing, the preparation processing unit 251 executes processing to extract characteristic sentences from sentences and processing to cluster the characteristic sentences, thereby generating an inverted index 60 and a predicate cluster dictionary 70. The preparation processing unit 251 executes processing to generate teacher data, thereby generating a teacher data set 85 and a pattern table 90. Other processing related to the preparation phase executed by the preparation processing unit 251 is similar to the above-described preparation phase processing.
[0146] The learning processing unit 252 executes the processing of the learning phase described above. For example, the learning processing unit 252 executes machine learning of the machine learning model M1 based on backpropagation (backpropagation method) using the teacher dataset 85 generated in the preparation phase. Other processing related to the learning phase executed by the learning processing unit 252 is similar to the processing of the learning phase described above.
[0147] The learning processing unit 252 performs machine learning of the machine learning model M2 based on backpropagation (backpropagation method) using the teacher dataset 95 generated in the specific phase.
[0148] The inference processing unit 253 executes the processing of the inference phase described above. For example, the inference processing unit 253 acquires a sentence to be analyzed from the input unit 220 and identifies a transition pattern of cluster IDs corresponding to each sentence included in the acquired sentence. The inference processing unit 253 inputs the estimated pattern into a trained machine learning model M1 to identify a pattern type, and based on the pattern table 90, identifies the position of a similar sentence corresponding to the pattern type and extracts the similar sentence from the text DB 50. Other processing executed by the inference processing unit 253 is the same as the processing of the inference phase described above.
[0149] The identification processing unit 254 executes the processing of the identification phase described above. For example, the identification processing unit 254 identifies a sentence that is missing a subject or an object from among the sentences included in the sentence to be analyzed, and identifies a sentence that is similar to the identified sentence and is included in the similar sentence. The identification processing unit 254 identifies the missing subject or object based on the sentence that is missing a subject or an object and a sentence included in the identified similar sentence. The identification processing unit 254 outputs the identification result to the display unit 230 for display. Other processing executed by the identification processing unit 254 is the same as the processing of the identification phase described above.
[0150] 16, the identification processing unit 254 may generate a teacher dataset 95. As described above, the learning processing unit 252 performs machine learning of the machine learning model M2 based on the teacher dataset 95. The identification processing unit 254 may input a sentence vector of a sentence that is included in the text to be analyzed and that lacks a subject or object into the trained machine learning model M2, and identify the subject or object required for the sentence.
[0151] Next, a description will be given of an example of a processing procedure of the information processing device 200 according to the present embodiment 2. Fig. 19 is a flowchart showing the processing procedure of the information processing device according to the present embodiment 2. As shown in Fig. 19, the preparation processing unit 251 of the information processing device 200 executes a preparation phase process (step S21).
[0152] The learning processing unit 252 of the information processing device 200 executes a learning phase process (step S22), and the inference processing unit 253 of the information processing device 200 executes an inference phase process (step S23).
[0153] The specific processing unit 254 of the information processing device 200 executes the specific phase process (step S24).
[0154] Here, an example of the processing procedure of the preparation phase shown in step S21 of Fig. 19 will be described. Fig. 20 is a flowchart showing the processing procedure of the preparation phase according to the second embodiment. As shown in Fig. 20, the preparation processing unit 251 of the information processing device 200 acquires an unacquired sentence from the text DB 50 (step S401).
[0155] The preparation processing unit 251 extracts a plurality of characteristic sentences from the sentence (step S402). The preparation processing unit 251 identifies a predicate of each characteristic sentence (step S403). If the preparation processing unit 251 has not acquired all the sentences (step S404, No), the preparation processing unit 251 returns to step S401.
[0156] If all the sentences have been acquired (Yes at step S404), the preparation processing unit 251 proceeds to step S405. The preparation processing unit 251 performs clustering on each predicate (step S405).
[0157] The preparation processing unit 251 identifies a cluster ID corresponding to each characteristic sentence based on the clustering result for each predicate (step S408). The preparation processing unit 251 sets the relationship between the cluster ID and the position of the characteristic sentence in the inverted index 60 (step S409). The preparation processing unit 251 then executes a training data creation process (step S410).
[0158] Next, an example of the processing procedure of the teacher data creation processing shown in step S410 of Fig. 20 will be described. Fig. 21 is a flowchart showing the processing procedure of the teacher data creation processing according to Example 2. As shown in Fig. 21, the preparation processing unit 251 of the information processing device 200 acquires a set of similar documents from the text DB 50 (step S501).
[0159] The preparation processing unit 251 selects an unselected sentence from the set of similar sentences (step S502). The preparation processing unit 251 identifies cluster IDs of multiple sentences included in the selected sentence (step S503). If an unselected sentence exists (step S504, Yes), the preparation processing unit 251 proceeds to step S502.
[0160] On the other hand, if there are no unselected sentences (No at step S504), the preparation processing unit 251 proceeds to step S505. The preparation processing unit 251 identifies a transition pattern corresponding to a set of similar sentences (step S505).
[0161] The preparation processing unit 251 registers training data including pairs of transition patterns and pattern types in the training data set 85 (step S506). The preparation processing unit 251 registers the relationship between the pattern types and the positions of similar sentences in the pattern table 90 (step S507).
[0162] If there is an unselected set of similar sentences (step S508, Yes), the preparation processing unit 251 proceeds to step S501. On the other hand, if there is no unselected set of similar sentences (step S508, No), the preparation processing unit 251 ends the process.
[0163] Next, an example of the processing procedure of the learning phase shown in step S22 of Fig. 19 will be described. Fig. 22 is a flowchart showing the processing procedure of the learning phase according to Example 2. As shown in Fig. 22, the learning processing unit 252 of the information processing device 200 acquires teacher data from the teacher data set 95 (step S601).
[0164] The learning processing unit 252 inputs the input data of the teacher data to the machine learning model M1 (step S602). The learning processing unit 252 updates the parameters of the machine learning model M1 so that the difference between the output result of the machine learning model M1 and the label of the teacher data is not small (step S603).
[0165] If the learning processing unit 252 determines to continue the process (step S604, Yes), the process proceeds to step S601. On the other hand, if the learning processing unit 252 determines not to continue the process (step S604, No), the process ends.
[0166] Next, an example of the processing procedure of the inference phase shown in step S23 of Fig. 19 will be described. Fig. 23 is a flowchart showing the processing procedure of the inference phase according to Example 2. As shown in Fig. 23, the inference processing unit 253 of the information processing device 200 receives a sentence to be analyzed from the input unit 220 (step S701).
[0167] The inference processing unit 253 identifies a transition pattern by identifying cluster IDs of multiple sentences included in the text (step S702). The transition pattern is input to the machine learning model M1, and the type of transition pattern is identified (step S703).
[0168] The inference processing unit 253 identifies the location of the similar sentence based on the identified pattern type and the pattern table 90 (step S704). The inference processing unit 253 acquires the similar sentence from the text DB 50 (step S705).
[0169] Next, an example of the processing procedure of the identification phase shown in step S24 of Fig. 19 will be described. Fig. 24 is a flowchart showing the processing procedure of the identification phase according to Example 2. As shown in Fig. 24, the identification processing unit 254 of the information processing device 200 performs morphological analysis on sentences included in the sentence to be analyzed, and identifies sentences lacking a subject or an object (step S801).
[0170] The identification processing unit 254 calculates the similarity between the sentence vector of the identified sentence and the sentence vector of each sentence included in the similar sentence (step S802). The identification processing unit 254 extracts the sentence included in the similar sentence that has the highest similarity (step S803).
[0171] The identification processing unit 254 performs morphological analysis on the extracted sentence and extracts the subject and object contained in the extracted sentence (step S804). If the sentence identified from the sentence to be analyzed is a sentence lacking a subject (step S805, Yes), the identification processing unit 254 proceeds to step S806. The identification processing unit 254 outputs information that the sentence to be analyzed is missing a subject and information about the extracted subject (step S806).
[0172] On the other hand, if the sentence identified from the sentence to be analyzed is not a sentence lacking a subject (i.e., a sentence lacking an object) (No at step S805), the identification processing unit 254 proceeds to step S807. The identification processing unit 254 outputs a message that the sentence to be analyzed is missing an object and information about the extracted object (step S807).
[0173] Next, the effects of the information processing device 200 according to the second embodiment will be described. The information processing device 200 acquires a set of similar sentences from the text DB 50, identifies a transition pattern based on the cluster ID to which the predicate of each sentence belongs, and registers training data in which the transition pattern is associated with a pattern type in the training data set 85. The information processing device 200 executes machine learning of the machine learning model M1 using the training data set 85. Compared to identifying a sentence vector of a sentence from each word included in the sentence, the information processing device 200 narrows down the assignment of cluster IDs equivalent to the sentence vectors to the predicates included in the sentence, thereby making it possible to improve the efficiency of machine learning of the machine learning model M1.
[0174] The information processing device 200 sets information associating the transition pattern types with the positions of similar sentences in the pattern table 90. This makes it possible to easily extract similar sentences corresponding to the transition pattern types.
[0175] The information processing device 200 identifies a transition pattern from the sentence to be analyzed, and extracts sentences similar to the sentence to be analyzed from the text DB 50 based on the transition pattern and the pattern table 90. In this way, it is possible to extract sentences similar to the sentence to be analyzed.
[0176] The information processing device 200 performs morphological analysis on multiple sentences included in the sentence to be analyzed to identify a first sentence that is missing a subject or object. The information processing device 200 identifies a second sentence that has the highest similarity to the first sentence from multiple sentences included in the similar sentence, and identifies the subject or object that is missing from the first sentence based on the first and second sentences. This makes it possible to identify the missing subject or object for the first sentence.
[0177] When the last word of a sentence in a text is a particle, the information processing device 200 determines that the adjective or noun corresponding to the last word in the sentence is a predicate, thereby making it possible to extract the predicate contained in the sentence.
[0178] Next, an example of the hardware configuration of a computer that realizes the same functions as the information processing device 100 (200) described in the above embodiment will be described. Fig. 25 is a diagram showing an example of the hardware configuration of a computer that realizes the same functions as the information processing device of the embodiment.
[0179] 25, computer 300 has a CPU 301 that executes various types of arithmetic processing, an input device 302 that accepts data input from a user, and a display 303. Computer 300 also has a communication device 304 that exchanges data with external devices via a wired or wireless network, and an interface device 305. Computer 300 also has a RAM 306 that temporarily stores various types of information, and a hard disk drive 307. Each of devices 301 to 307 is connected to a bus 308.
[0180] The hard disk drive 307 stores a preparation program 307 a, a search program 307 b, a ranking program 307 c, a learning program 307 d, an inference program 307 e, and a specific program 307 f. The CPU 301 reads out each of the programs 307 a to 307 f and loads them into the RAM 306.
[0181] The preparation program 307a functions as the preparation process 306a. The search program 307b functions as the search process 306b. The ranking program 307c functions as the ranking process 306c. The learning program 307a functions as the learning process 306a. The inference program 307b functions as the inference process 306b. The identification program 307f functions as the identification process 306f.
[0182] The processing of the preparation process 306a corresponds to the processing of the preparation processing units 151 and 251. The processing of the search process 306b corresponds to the processing of the search processing unit 152. The processing of the ranking process 306c corresponds to the processing of the ranking processing unit 153. The processing of the learning process 306d corresponds to the processing of the learning processing unit 252. The processing of the inference process 306e corresponds to the processing of the inference processing unit 253. The processing of the identification process 306f corresponds to the processing of the identification processing unit 254.
[0183] It should be noted that each of the programs 307a to 307f does not necessarily have to be stored in the hard disk drive 307 from the beginning. For example, each program may be stored in a "portable physical medium" such as a flexible disk (FD), CD-ROM, DVD, magneto-optical disk, or IC card that is inserted into the computer 300. Then, the computer 300 may read and execute each of the programs 307a to 307f.
[0184] 50 Text DB 55 Word vector table 60 Inverted index 70 Predicate cluster dictionary 80 Transition table 100, 200 Information processing device 110, 110 Communication unit 120, 220 Input unit 130, 230 Display unit 140, 240 Storage unit 150, 250 Control unit 151, 251 Preparation processing unit 152 Search processing unit 153 Ranking processing unit 252 Learning processing unit 253 Inference processing unit 254 Identification processing unit
Claims
1. An information processing program that causes a computer to execute the following processes: acquire a sentence registered in a memory unit; extract a preceding predicate from each of a plurality of sentences contained in the sentence, the plurality of sentences each having a complete meaning through a subject, a predicate, and an object; identify cluster identification information for the plurality of predicates extracted by the extraction process based on a cluster dictionary in which similar preceding predicates are clustered to belong to the same cluster; and execute machine learning of a machine learning model using the cluster identification information for the plurality of predicates extracted by the extraction process as input data and a combination pattern of the cluster identification information for the plurality of predicates as a label.
2. The information processing program according to claim 1, further comprising a process of causing the computer to execute a process of registering in a table a combination pattern of cluster identification information for the plurality of predicates in association with the position information of the sentence acquired by the acquisition process.
3. The information processing program according to claim 2, further comprising causing a computer to execute the following processes: acquiring a sentence to be analyzed; extracting predicates from each of the multiple sentences included in the sentence to be analyzed; identifying identification information of clusters corresponding to the multiple sentences included in the sentence to be analyzed based on the predicates extracted from each of the multiple sentences included in the sentence to be analyzed and the cluster dictionary; and inputting the identification information of clusters corresponding to the multiple sentences included in the sentence to be analyzed into the machine learning model to identify a pattern.
4. The information processing program according to claim 3, further comprising causing the computer to execute a process of extracting text from the memory unit based on the identified pattern and location information identified based on the table.
5. The information processing program of claim 4, further comprising a process for causing a computer to execute the following steps: by analyzing a plurality of sentences contained in the sentence to be analyzed, a first sentence missing a subject or object is identified; a second sentence having the greatest similarity to the first sentence is identified from a plurality of sentences contained in the sentence extracted by the process of extracting from the memory unit; and based on the first sentence and the second sentence, a subject or object missing from the first sentence is identified.
6. The information processing program according to claim 1, further comprising the step of causing the computer to execute a process of determining, when the final word of a sentence contained in the sentence is a particle, that an adjective or noun corresponding to the final word contained in the sentence is a predicate.
7. An information processing method characterized in that a computer executes the following processes: acquiring a sentence registered in a memory unit; extracting a preceding predicate from each of a plurality of sentences contained in the sentence, the plurality of sentences each having a complete meaning through a subject, a predicate, and an object; identifying cluster identification information for the plurality of predicates extracted by the extraction process based on a cluster dictionary in which preceding predicates similar to each other belong to the same cluster; and executing machine learning of a machine learning model using the cluster identification information for the plurality of predicates extracted by the extraction process as input data and a combination pattern of the cluster identification information for the plurality of predicates as a label.
8. The information processing method according to claim 7, further comprising the step of: the computer executing a process of registering in a table a combination pattern of cluster identification information for the plurality of predicates in association with position information of the sentence acquired by the acquisition process.
9. The information processing method according to claim 8, further comprising the steps of: acquiring a sentence to be analyzed; extracting predicates from each of the sentences included in the sentence to be analyzed; determining identification information of clusters corresponding to the multiple sentences included in the sentence to be analyzed based on the predicates extracted from each of the sentences included in the sentence to be analyzed and the cluster dictionary; and inputting the identification information of clusters corresponding to the multiple sentences included in the sentence to be analyzed into the machine learning model to identify a pattern.
10. The information processing method according to claim 9, further comprising the step of causing the computer to execute a process of extracting a sentence from the memory unit based on the identified pattern and location information identified based on the table.
11. The information processing method described in claim 10, further comprising the steps of: identifying a first sentence missing a subject or object by analyzing a plurality of sentences included in the sentence to be analyzed; identifying a second sentence having the greatest similarity to the first sentence from among the plurality of sentences included in the sentence extracted by the process of extracting from the memory unit; and identifying the subject or object missing from the first sentence based on the first sentence and the second sentence.
12. The information processing method according to claim 7, further comprising the step of: when the final word of a sentence contained in the text is a particle, determining that an adjective or noun corresponding to the final word contained in the sentence is a predicate, wherein the computer executes the process.
13. An information processing device comprising: a control unit that executes a process of acquiring a sentence registered in a memory unit; extracting a preceding predicate from each of a plurality of sentences contained in the sentence, the plurality of sentences each having a complete meaning through a subject, a predicate, and an object; identifying cluster identification information for the plurality of predicates extracted by the extraction process based on a cluster dictionary in which preceding predicates similar to each other belong to the same cluster; and executing machine learning of a machine learning model using the cluster identification information for the plurality of predicates extracted by the extraction process as input data and a combination pattern of the cluster identification information for the plurality of predicates as a label.
14. The information processing device according to claim 13, characterized in that the control unit further executes a process of registering in a table a combination pattern of cluster identification information for the plurality of predicates in association with position information of the sentence acquired by the acquisition process.
15. The information processing device according to claim 14, further comprising the control unit which: acquires a sentence to be analyzed; extracts predicates from each of the multiple sentences included in the sentence to be analyzed; identifies identification information of clusters corresponding to the multiple sentences included in the sentence to be analyzed based on the predicates extracted from each of the multiple sentences included in the sentence to be analyzed and the cluster dictionary; and identifies a pattern by inputting the identification information of clusters corresponding to the multiple sentences included in the sentence to be analyzed into the machine learning model.
16. The information processing device according to claim 15, characterized in that the control unit further executes a process of extracting a sentence from the memory unit based on the identified pattern and position information identified based on the table.
17. The information processing device described in claim 16, characterized in that the control unit further executes a process of identifying a first sentence missing a subject or object by analyzing a plurality of sentences included in the sentence to be analyzed, identifying a second sentence having the greatest similarity to the first sentence from among the plurality of sentences included in the sentence extracted by the process of extracting from the memory unit, and identifying the subject or object missing from the first sentence based on the first sentence and the second sentence.
18. The information processing device according to claim 13, characterized in that the control unit further executes a process of determining that, when the final word of a sentence included in the sentence is a particle, the adjective or noun corresponding to the final word included in the sentence is a predicate.
Citation Information
Patent Citations
Information processor, information processing method, program, and information processing system
JP2012238062A
Enabling rhetorical analysis through the use of communicative discourse trees
JP2020522044A
Generation method, dimension reduction method, display method and information processing device
JP2023014348A