Patent ID: 12216987

EXAMPLE EMBODIMENTS

Preferred example embodiments of the present invention will be described with reference to the accompanying drawings.

First Example Embodiment

[Overall Configuration]

FIG.1shows an overall configuration of a heading generation device according to the first example embodiment. The heading generation device100outputs a heading complemented document in which appropriate headings are added to an inputted document. If the inputted document has already been structured, the heading generation device100determines whether or not the headings included in the structured document are appropriate and outputs a heading complemented document in which the headings determined to be inappropriate are corrected. On the other hand, if the inputted document is not structured, the heading generation device100first structures the inputted document, and then corrects the inappropriate headings to output the heading complemented document.

[Structured Document]

A structured documents is a document that marks up the structure of the document, and typically XML (eXtensible Markup Language) or HTML (Hyper Text Markup Language) are known as the structured document. In XML and HTML documents, the structure of the document is expressed by character strings called tags.

FIG.2shows an example of a hierarchical structure of a structured document. This document is an explanatory document of the term “Vacation” and includes headings2,2a,2b, . . . and texts3a,3b. . . . The heading2is the heading at the highest level (the first level), and the headings2aand2bare the headings at the lower level (the second level). Each text3a,3bis a text corresponding to the heading2a,2b. In this structured document, both the headings2aand2bare “Annual Vacation” and have the same character strings. Therefore, when this structured document is used for search or browsing, there is a possibility that correct search results or answers cannot be outputted to the user's input regarding “Annual Vacation”. Thus, in the structured document, if the character string of the heading is identical to the character string of another heading in parallel relationship, those headings are inappropriate because they cannot be distinguished from each other. Also, even if the character strings of the headings are not identical, if the character strings of the headings are similar or if the character string of one heading implies the meaning of the character string of the other heading, the headings are considered to be inappropriate.

In addition, the heading is inappropriate if the character string of the heading in a parallel relationship in the structured document does not have sufficient meaning. The headings are considered to be inappropriate when each heading does not have a specific meaning, for example, when the character strings of the headings are merely numbers or symbols such as “1.”, “2.”, “(a) and “(b)”, or when the character strings of the headings merely indicate the order of sections such as “Chapter 1” and “Chapter 2”.

When the headings of the structured document are inappropriate, the output for the user's search and browsing may be inappropriate. Therefore, the heading generation device100detects inappropriate headings in the structured document and corrects them to be appropriate.

[Outline of the Method for Generating Headings]

FIG.3shows another example of a structured document. This example is also a structured document regarding the term “Vacation” and includes a hierarchical structure of multiple headings2and texts3. InFIG.3, for convenience, some headings and texts are not shown.

If the heading included in the structured document is inappropriate, heading generation device100generates a new heading instead of the inappropriate heading. Specifically, the heading generation device100generates a new heading to replace the inappropriate heading based on the subordinate elements of the inappropriate heading. Here, “the subordinate elements” includes at least one of headings (the subordinate headings)2and the texts3existing in the lower hierarchy of the inappropriate heading.

FIG.4shows the case where two headings Xa and Xb in parallel relationship are inappropriate in the structured document shown inFIG.3. In this example, both the headings Xa and Xb are “Type of vacation” and are inappropriate because both the headings Xa and Xb have the same character strings. In this case, the heading generation device100generates new headings instead of the two inappropriate headings Xa and Xb. Specifically, the heading generation device100generates a new heading to replace the inappropriate heading Xa based on the subordinate elements4a(i.e., document A) of the inappropriate heading Xa. Also, the heading generation device100generates a new heading to replace the inappropriate heading Xb based on the subordinate elements4b(i.e., document B) of the inappropriate heading Xb.

Specifically, the heading generation device100generates the new headings that replace the inappropriate headings Xa and Xb in a manner that differs from one another using the subordinate elements4aand4bof the inappropriate headings Xa and Xb. In other words, the heading generation device100generates the new headings so that the new headings that replace the inappropriate headings Xa and Xb do not fall under the inappropriate headings.

[Hardware Configuration]

FIG.5is a block diagram showing a hardware configuration of the heading generation device100. As shown, the heading generation device100includes an interface (IF)11, a processor12, a memory13, a recording medium14, and a data base (DB)15.

The IF11inputs and outputs data to and from external devices. Specifically, the documents subject to the heading generation processing are inputted through the IF11. In addition, the heading complemented document whose inappropriate headings are corrected by the heading generation device100is outputted to an external device through the IF11.

The processor12is a computer such as a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit) and controls the entire heading generation device100by executing a program prepared in advance. Specifically, the processor12executes the heading generation processing to be described later.

The memory13may be a ROM (Read Only Memory) and a RAM (Random Access Memory). The memory13is also used as a working memory during the execution of various processing by the processor12.

The recording medium14is a non-volatile and non-transitory recording medium such as a disk-type recording medium, a semiconductor memory, or the like, and is configured to be detachable from the heading generation device100. The recording medium14records various programs executed by the processor12. When the heading generation device100performs various processing, the program recorded in the recording medium14is loaded into the memory13and executed by the processor12.

The database15temporarily stores the documents inputted through the IF11. The heading generation device100may include a keyboard, an input unit such as a mouse, and a display unit such as a liquid crystal display for the user's instruction and input.

[Function Configuration]

FIG.6is a block diagram illustrating a functional configuration of the heading generation device. The heading generation device100includes a document input unit21, a structuring unit22, an inappropriate heading detection unit23, a feature word extraction unit24, a heading generation unit25, and a document output unit26.

To the document input unit21, a document that is subjected to the heading generation (hereinafter, also referred to as “objective document”) is inputted. When the objective document inputted to the document input unit21is a structured document, i.e., a document that has already been structured, the document input unit21outputs the document to the inappropriate heading detection unit23. On the other hand, when the objective document is a non-structured document (unstructured document), the document input unit21outputs the inputted document to the structuring unit22and receives the structured objective document from the structuring unit22. Then, the document input unit21outputs the structured objective document to the inappropriate heading detection unit23and the document output unit26.

The structuring unit22structures the inputted unstructured document, and outputs the structured document to the document input unit21as the structured document. For example, the structuring unit22performs processing of extracting the character string corresponding to the heading in the inputted unstructured document and putting a tag to the character string. Thus, the structuring unit22generates the structured document and outputs it to the document input unit21.

The inappropriate heading detection unit23identifies a point in the inputted objective document where the generation of the heading is required. Specifically, the inappropriate heading detection unit23extracts the heading corresponding to the aforementioned inappropriate heading from the headings included in the objective document. Then, the inappropriate heading detection unit23outputs the subordinate elements of the inappropriate heading to the feature word extraction unit24. In the example ofFIG.4, the inappropriate heading detection unit23detects the inappropriate headings Xa and Xb, and outputs the respective subordinate elements4aand4b, i.e., documents A and B, to the feature word extraction unit24. Also, the inappropriate heading detecting unit23outputs information indicating the position of the inappropriate heading in the objective document to the document output unit26. In the example ofFIG.4, the inappropriate heading detection unit23outputs information indicating the positions of the inappropriate headings Xa and Xb in the objective document to the document output unit26.

The feature word extraction unit24extracts feature words from the subordinate elements of the inappropriate heading. “Feature word” is a word that characterizes the content of the document corresponding to the subordinate elements. In the example ofFIG.4, the feature word extraction unit24extracts the feature words from the document A corresponding to the subordinate elements4aand extracts the feature words from the document B corresponding to the subordinate elements4b. The feature word extraction unit24outputs, for each document, a plurality of feature words together with the feature scores of the feature words. The feature score indicates the degree to which the feature word is characteristic, and a higher feature score indicates that the feature word is more characteristic in the document. For example, the feature word extraction unit24outputs the feature word lists ranked by the feature scores to the heading generation unit25for each document A and B.

The heading generation unit25generates new headings corresponding to inappropriate headings using the feature words inputted from the feature word extraction unit24. At this time, the heading generation unit25generates new headings so that the new headings have a difference from each other. In the example ofFIG.4, the heading generation unit25generates new headings corresponding to the inappropriate headings Xa and Xb so that each of the new headings is differentiated from each other. Then, the heading generation unit25outputs the generated new headings to the document output unit26.

The document output unit26acquires information indicating the position of the inappropriate heading from the inappropriate heading detection unit23and acquires the new heading generated by the heading generation unit25. Then, the document output unit26corrects the inappropriate heading in the objective document using the new heading and outputs the objective document as the heading complemented document.

Specifically, in the example ofFIG.4, it is supposed that the new heading “Annual Vacation” is generated for the inappropriate heading Xa and the new heading “Other Vacation” is generated for the inappropriate heading Xb. In this case, as a first method of correcting the inappropriate heading, the document output unit26replaces the inappropriate heading with the new heading. That is, the document output unit26replaces the inappropriate heading Xa “Type of vacation” with the new heading “Annual Vacation” and replaces the inappropriate heading Xb “Type of vacation” with the new heading “Other Vacation”.

As a second method of correcting the inappropriate heading, the document output unit26adds the new heading to the inappropriate heading. In this case, the document output unit26modifies the inappropriate heading Xa “Type of vacation” to the new heading “Type of vacation (Annual Vacation)” and modifies the inappropriate heading Xb “type of vacation” to the new heading “Type of vacation (Other Vacation)”.

In this way, the heading generation device100can correct inappropriate headings included in the objective document and output the objective document as a heading complemented document. Further, according to the heading generation device100, even when the objective document is not structured, appropriate headings can be given after the objective document is structured by the structuring unit22.

[Configuration Example of the Feature Word Extraction Unit]

Next, a configuration example of the feature word extraction unit24will be described.

First Example

The feature word extraction unit24xaccording to the first example extracts the feature words based on the appearance frequency of the words in the document corresponding to the subordinate elements.FIG.7shows a configuration of extracting feature words using the method of TF-IDF (Term Frequency-Inverse Document Frequency) as a typical method. The feature word extraction unit24xincludes a word division unit31and a TF-IDF calculation unit32. The word division unit31performs morphological analysis of the document corresponding to the subordinate elements of the inappropriate heading and divides the document into word units.

The TF-IDF calculation unit32calculates a TF-IDF value for each word. The TF-IDF value is an index obtained by multiplying a TF value by an IDF value. The TF value is “the number of occurrences of a certain word in a document” and the IDF value is “the reciprocal number of the number of documents containing the certain word divided by the total number of the documents”. The TF-IDF value is given by the following equation.
TF-IDF(w,d)=TFw,d×log(Nd/DFw,d)

In the above equation, “TFw,d” is the number of occurrences of the word w in the document d, “DFw,d” is the number of documents containing the word w, and “Nd” is the number of all documents. A high TF-IDF value indicates that a certain word appears many times in the document and that the word does not appear very much in other documents, and the higher TF-IDF value indicates that the word is more characteristic in the document. Therefore, the feature word extraction unit24xcalculates the TF-IDF value of each word included in the document corresponding to the subordinate elements, and extracts a predetermined number of words as the feature words in the descending order of the values from the one of the highest value. In this case, the TF-IDF value is used as the feature score for the feature word.

Second Example

The feature word extraction unit24yaccording to the second example extracts the feature word by reducing the dimension of the word appearing in the document using principal component analysis (hereinafter, referred to as “PCA”).FIG.8Ashows a configuration of the feature word extraction unit24yusing PCA. The feature word extraction unit24yincludes a word division unit41, a matrix creating unit42, and a PCA unit43. The word division unit41performs morphological analysis of the document inputted as the subordinate element of the inputted inappropriate heading and divides the document into word units.

The matrix creating unit42creates the matrix of the document x appearing words. The matrix of the document x appearing words indicates, for each document, the appearance frequency of each word.FIG.8Bshows an example of the matrix. In this example, the matrix indicates the appearance frequency of each word in the documents A and B corresponding to the aforementioned subordinate elements4aand4b. The matrix creating unit42outputs the created matrix to the PCA unit43.

The PCA unit43performs principal component analysis of the words appearing in each document based on the inputted matrix and extracts a predetermined number of principal components. For example, when reducing the matrix of the documents x appearing words to n dimensions, the PCA unit43extracts the first through n-th principal components of the words appearing in the document and outputs n words corresponding to those as the feature words. At this time, the contribution ratio of each principal component is used as the feature score of each feature word. In this way, the PCA unit43outputs a predetermined number of feature words in descending order of the feature scores from the one of the highest score for each document.

The Third Example

The feature word extraction unit24zaccording to the third example extracts the feature word by reducing the dimension of the word appearing in the document using auto-encoding.FIG.9shows a configuration of the feature word extraction unit24zusing auto-encoding. The feature word extraction unit24zincludes a word division unit51, an encoder52, an autoencoder53, and a decoder54. The word division unit51performs morphological analysis of the document inputted as the subordinate element of the inputted inappropriate heading and divides the document into word units.

The encoder52expresses the words appearing in each document by vectors of a predetermined dimension using a method of a word distributed representation or a word embedding. The examples of the word distributed representation or the word embedding are Word2vec, Doc2vec, BERT (Bidirectional Encoder Representations from Transformers), and fastText. Instead of the method using the pre-trained model as described above, the documents may be vectorized using a simple model such as a Bag of Words.

For each document, the autoencoder53reduces the dimension of the vectorized word and generates the vector after the dimensionality reduction. The decoder54returns the vector after the dimensionality reduction to the word using method of the word distributed representation or the word embedding as described above. Thus, the feature word extraction unit24zoutputs a predetermined number of feature words together with the feature scores.

In the above-described configuration, the document input unit21is an example of an acquisition means, the structuring unit22is an example of a structuring means, the inappropriate heading detection unit23is an example of an inappropriate heading detection means, the feature word extraction unit24is an example of a feature word extraction means, the heading generation unit25is an example of a heading generation means, and the document output unit26is an example of a document correction means. The matrix creating unit42is an example of a matrix creating means, the PCA unit43is an example of an analyzing means.

[Heading Generation Processing]

FIG.10is a flowchart of heading generation processing executed by the heading generation device100. This processing is realized by the processor12shown inFIG.5, which executes a pre-prepared program and operates as each element shown inFIG.6.

First, the document input unit21acquires an objective document (step S11) and determines whether or not the objective document is structured (step S12). When the inputted objective document is structured (step S12: Yes), the document input unit21outputs the objective document to the inappropriate heading detection unit23. On the other hand, when the inputted objective document is not structured (step S12: No), the document input unit21outputs the objective document to the structuring unit22, and the structuring unit22structures the objective document (step S13). Then, the structuring unit22outputs the structured objective document to the document input unit21, and the document input unit21outputs the structured objective document to the inappropriate heading detection unit23.

The inappropriate heading detection unit23determines whether or not one or more inappropriate headings are included in the inputted objective document (step S14). Specifically, the inappropriate heading detection unit23determines whether or not a plurality of headings in the parallel relationship are inappropriate in the objective document. When the objective document does not include any inappropriate heading (step S14: No), the processing ends.

On the other hand, when the objective document includes one or more inappropriate headings (step S14: Yes), the feature word extraction unit24extracts the feature words for each document corresponding to the subordinate elements of the inappropriate heading and creates a feature word list (step S15). The feature word extraction unit24extracts the feature words using any of the first through third method described above. The feature word list is a list in which, for each document, a plurality of extracted feature words are sorted in descending order of the feature scores. In the example ofFIG.4, the feature word extraction unit24creates the feature word lists La and Lb for the documents A and B corresponding to the subordinate elements4aand4bof the inappropriate headings Xa and Xb and outputs them to the heading generation unit25.

The heading generation unit25generates new headings corresponding to the inappropriate headings using the feature word lists inputted from the feature word extraction unit24. At this time, the heading generation unit25generates new headings so that the new headings are differentiated from each other. Specifically, the heading generation unit25acquires the first elements KYa and KYb of the feature word lists La and Lb (step S16) and determines whether or not there are any remaining elements in each of the feature word lists La and Lb (step S17). When there are no remaining elements in any of the feature word lists La and Lb (step S17: No), the processing proceeds to step S20.

On the other hand, when there are the remaining elements in any of the feature word lists La and Lb (step S17: Yes), the heading generation unit25determines whether or not the element KYa and the element KYb are in a matching relation or an implication relation (step S18). When the element KYa and the element KYb are not in the matching relation or the implication relation (step S18: No), the feature words corresponding to the element KYa and the element KYb are different, and they do not fall under the inappropriate headings. Therefore, the processing proceeds to step S20.

On the other hand, when the element KYa and the element KYb are in the matching relation or the implication relation (step S18: Yes), the heading generation unit25changes the elements KYa and KYb to the next elements in the feature word lists La and Lb (step S19). Here, the next element is the element that has the next higher feature score in the feature word list. At this time, the heading generation unit25may change only one of the elements KYa and KYb to the next element instead of changing both of the elements KYa and KYb to the next elements at the same time. Then, the processing returns to step S17, and the heading generation unit25performs the processing of steps S17to S18on the elements KYa and KYb after the change. Then, when there are no remaining elements in the feature word lists La and Lb (step S17: No), or when the element KYa and the element KYb are not in the matching relation or the implication relation (step S18: No), the processing proceeds to step S20.

In step S20, the heading generation unit25determines the elements KYa and KYb at that time as the new headings. Thus, the feature words that are not in the matching relation or the implication relation are determined as the new headings. Next, the document output unit26corrects the inappropriate headings in the objective document using the new headings and outputs the heading complemented document (step S21). As described above, as the method of correcting the inappropriate heading, the document output unit26may replace the inappropriate headings with the new headings and may add the new headings to the inappropriate headings. Then, the heading generation processing ends.

As described above, the heading generation unit25acquires the elements KYa and KYb in descending order of the feature scores from the feature word lists La and Lb and determines the elements KYa and KYb that do not fall under the inappropriate headings as the new headings. Thus, it is possible to obtain the new headings that sufficiently express the features of documents A and B and are not in the inappropriate relation such as the matching relation and the implication relation.

(Modification)

In the above flowchart, in step S17-S19, when the first element of the feature word list is in the matching relation or the implication relation, the heading generation unit25performs processing of changing to the next element. However, when the feature word extraction unit24uses PCA as in the second example and when the feature word extraction unit24uses autoencoder as in the third example, since the feature words extracted from different documents are basically differentiated from each other, step S17to S19may be omitted. In this case, the first elements KYa and KYb of the feature word lists obtained by step S16may be adopted as the new headings.

Second Example Embodiment

Next, a second example embodiment of the present invention will be described.FIG.11is a block diagram illustrating a functional configuration of an information processing device according to the second example embodiment. The information processing device70includes an acquisition means71, a feature word extraction means72, and a heading generation means73. The acquisition means71acquires a structured document including headings and texts. The feature word extraction means72extracts feature words from subordinate elements of the heading for the headings included in the structured document. The heading generation means73generates a new heading corresponding to the subordinate elements based on the extracted feature words.

FIG.12is a flowchart of heading generation processing in the second example embodiment. The acquisition means71acquires a structured document including headings and texts (step S31). Next, the feature word extraction means72extracts feature words from subordinate elements of the heading for the headings included in the structured document (step S32). Then, the heading generation means73generates a new heading corresponding to the subordinate elements based on the extracted feature words (step S33).

According to the information processing device70of the second example embodiment, since the feature word is extracted from the subordinate elements of the heading included in the structured document and a new heading is generated, the information processing device70can generate appropriate headings for the objective document.

A part or all of the example embodiments described above may also be described as the following supplementary notes, but not limited thereto.

(Supplementary Note 1)

An information processing device comprising:an acquisition means configured to acquire a structured document including headings and texts;a feature word extraction means configured to extract feature words from subordinate elements of the heading for the headings included in the structured document; anda heading generation means configured to generate a new heading corresponding to the subordinate elements based on the extracted feature words.
(Supplementary Note 2)

The information processing device according to Supplementary note 1, wherein the subordinate elements include at least one of the subordinate headings below the heading and the texts below the heading in the structured document.

(Supplementary Note 3)

The information processing device according to Supplementary note 1 or 2, wherein the feature word extraction means extracts a feature word using a TF-IDF value.

(Supplementary Note 4)

The information processing device according to Supplementary note 1 or 2, the feature word extraction means comprising:a matrix creating means configured to generate a matrix of frequency of occurrence of words appearing in the document for each document included in the subordinate elements; andan analyzing means configured to extract the feature words by reducing dimension of the appearing words using principal component analysis.
(Supplementary Note 5)

The information processing device according to Supplementary note 1 or 2, wherein the feature word extraction means comprises:an encoder configured to convert the words appearing in the document into vectors, for each document included in the subordinate elements;an autoencoder configured to reduce the dimension of the vector using autoencoding; anda decoder configured to convert the vectors whose dimensions are reduced into words and output the feature words.
(Supplementary Note 6)

The information processing device according to any one of Supplementary note 1 to 5, further comprising an inappropriate heading detection means configured to detect an inappropriate heading from the headings included in the structured document,wherein the feature word extraction means extracts the feature words from the subordinate elements of the inappropriate heading, andwherein the heading generation means generates a new heading based on the extracted feature words.
(Supplementary Note 7)

The information processing device according to Supplementary note 6, further comprising a document correction means configured to generate a corrected document by replacing the inappropriate heading in the document with the new heading.

(Supplementary Note 8)

The information processing device according to Supplementary note 6, further comprising a document correction means configured to generate a corrected document by adding at least a part of the new heading to the inappropriate heading in the document.

(Supplementary Note 9)

The information processing device according to any one of Supplementary note 6 to 8, wherein the inappropriate heading is a heading of a character string identical to another heading in a parallel relationship in the document.

(Supplementary Note 10)

The information processing device according to any one of Supplementary note 6 to 9, wherein the inappropriate heading is in a parallel relationship in the document and includes a number or a symbol without meaning or content.

(Supplementary Note 11)

The information processing device according to any one of Supplementary note 1 to 9, further comprising a structuring means configured to convert an inputted document into the structured document.

(Supplementary Note 12)

An information processing method comprising:acquiring a structured document including headings and texts;extracting feature words from subordinate elements of the heading for the headings included in the structured document; andgenerating a new heading corresponding to the subordinate elements based on the extracted feature words.
(Supplementary Note 13)

A recording medium recording a program which causes a computer to execute processing of:acquiring a structured document including headings and texts;extracting feature words from subordinate elements of the heading for headings included in the structured document; andgenerating a new heading corresponding to the subordinate elements based on the extracted feature words.

While the present invention has been described with reference to the example embodiments and examples, the present invention is not limited to the above example embodiments and examples. Various changes which can be understood by those skilled in the art within the scope of the present invention can be made in the configuration and details of the present invention.

DESCRIPTION OF SYMBOLS

2Heading3Text12Processor21Document input unit22Structuring unit23Inappropriate heading detection unit24Feature word extraction unit25Heading generation unit26Document output unit31,41,51Word division unit32TF-IDF Calculation unit42Matrix creating unit43PCA unit52Encoder53Autoencoder54Decoder