Document search device, document search system, document search program, and document search method

The document search device enhances retrieval accuracy and comprehensiveness by calculating likelihoods in both forward and backward directions using character generation models with wildcards, addressing the trade-off in existing methods.

JP7754095B2Active Publication Date: 2025-10-15RESONAC CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2022538005
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-07-22
Filing Date
2021-07-19
Publication Date
2025-10-15
Estimated Expiration
2041-07-19

AI Technical Summary

Technical Problem

Existing document retrieval methods face a trade-off between accuracy and comprehensiveness, with exact match searches being highly accurate but lacking comprehensiveness, and partial match searches being highly comprehensive but lacking accuracy.

Method used

A document search device that calculates the likelihood of a hit character string based on both forward and backward directions using character generation models, incorporating wildcards to balance accuracy and comprehensiveness, and displays results based on a threshold likelihood.

Benefits of technology

Improves the balance between accuracy and comprehensiveness in document retrieval by using forward and backward likelihood calculations, enabling accurate and comprehensive retrieval even with typographical errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007754095000001
    Figure 0007754095000001
  • Figure 0007754095000002
    Figure 0007754095000002
  • Figure 0007754095000003
    Figure 0007754095000003
Patent Text Reader

Abstract

The present invention maintains a balance between accuracy and coverage and enhances the precision of searching for a document. This document search device comprises: an input reception unit which receives an input of a document search keyword; a document search unit which acquires, from a document, a hit character string, which matches a character string obtained by substituting some characters of the keyword with wild cards, and character strings before and after the hit character string, and calculates the likelihood of the hit character string on the basis of the hit character string and the character strings before and after the hit character string; and a search result display unit which outputs the result of the document search on the basis of the likelihood.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority from basic application No. 2020-125341, filed with the Japan Patent Office on July 22, 2020, the entire contents of which are incorporated herein by reference.

[0002] The present invention relates to a document search device, a document search system, a document search program, and a document search method. [Background technology]

[0003] Conventionally, document retrieval that retrieves documents based on keywords specified by a user has been known. In document retrieval, there are known two methods: an exact match search that extracts a character string that exactly matches a keyword, and a partial match search that extracts a character string that partially matches a keyword (for example, Patent Document 1).

[0004] For example, if a document contains typos, an exact match search will not extract the character string the user wants, resulting in a missed search.On the other hand, a partial match search can comprehensively search within a document. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Patent No. 6374289 Summary of the Invention [Problem to be solved by the invention]

[0006] However, partial match searches extract strings that only partially match a keyword, which can result in the extraction of strings unrelated to the keyword. In other words, exact match searches are highly accurate but lack comprehensiveness, while partial match searches are highly comprehensive but lack accuracy.

[0007] Therefore, an object of the present invention is to improve the accuracy by maintaining a balance between accuracy and comprehensiveness of document retrieval. [Means for solving the problem]

[0008] [1] An input receiving unit that receives input of keywords for document search; A hit string that matches a string obtained by replacing some characters of the keyword with a wildcard, and character strings before and after the hit string are obtained from the document; a document search unit that calculates the likelihood of the hit character string based on the hit character string and character strings before and after the hit character string; a search result display unit that outputs the results of the document search based on the likelihood; A document search device comprising: [2] The document search device according to [1], wherein the document search unit calculates the likelihood of the hit character string based on the likelihood in the forward direction. [3] The document search device according to [1], wherein the document search unit calculates the likelihood of the hit character string based on the likelihood in the forward direction and the likelihood in the backward direction. [4] The document search device according to any one of [1] to [3], wherein the document search unit calculates the likelihood of the hit character string based on the likelihood of each character of the hit character string. [5] The document search device according to [4], wherein the document search unit considers the likelihood of characters in the hit character string that are not wildcards to be 100 percent. [6] the input receiving unit receives an input of a threshold value of the likelihood of the hit character string; The document search device according to any one of [1] to [5], wherein the search result display unit displays the hit character strings that have a likelihood equal to or greater than the threshold value, and surrounding sentences that include the hit character strings. [7] The document search device described in [6], wherein the search result display unit further displays images of handwritten documents corresponding to the hit character strings that have a likelihood greater than or equal to the threshold, and surrounding sentences that include the hit character strings. [8] The document search device according to any one of [1] to [7], wherein the search result display unit outputs the document search results in descending order of likelihood of the hit character strings. [9] A document search system including a document search device and a user terminal, The document search device an input receiving unit that receives input of a keyword for document search from the user terminal; A hit string that matches a string obtained by replacing some characters of the keyword with a wildcard, and character strings before and after the hit string are obtained from the document; a document search unit that calculates the likelihood of the hit character string based on the hit character string and character strings before and after the hit character string; a search result display unit that outputs document search results based on the likelihood to the user terminal.

[10] Computer, an input receiving unit that receives input of keywords for document search; A hit string that matches a string obtained by replacing some characters of the keyword with a wildcard, and character strings before and after the hit string are obtained from the document; a document search unit that calculates the likelihood of the hit character string based on the hit character string and character strings before and after the hit character string; a search result display unit that outputs the results of the document search based on the likelihood; A program to function as a

[11] A method executed by a document search device, A step of accepting input of keywords for document search; A hit string that matches a string obtained by replacing some characters of the keyword with a wildcard, and character strings before and after the hit string are obtained from the document; calculating a likelihood of the hit character string based on the hit character string and character strings before and after the hit character string; outputting a result of the document retrieval based on the likelihood; A method comprising: [Effects of the Invention]

[0009] The present invention can improve accuracy by maintaining a balance between accuracy and comprehensiveness of document retrieval. [Brief explanation of the drawings]

[0010] [Figure 1] 1 is a diagram showing an overall system configuration including a document search device according to an embodiment of the present invention. [Figure 2] FIG. 2 is a diagram showing functional blocks of a character generation model construction unit of the document search device according to one embodiment of the present invention. [Figure 3] 10 is a flowchart showing the flow of processing for constructing a character generation model according to an embodiment of the present invention. [Figure 4] 2 is a diagram showing functional blocks of a document search function unit of the document search device according to the embodiment of the present invention; FIG. [Figure 5] 10 is a flowchart showing the flow of document search processing according to an embodiment of the present invention. [Figure 6] 10 is an example of training data for a forward character generation model according to an embodiment of the present invention. [Figure 7] 1 is an example of training data for a backward character generation model according to an embodiment of the present invention. [Figure 8] FIG. 10 is a diagram illustrating a search according to an embodiment of the present invention. [Figure 9] FIG. 10 is a diagram illustrating calculation of likelihood according to an embodiment of the present invention. [Figure 10] FIG. 10 is a diagram for comparing search accuracy according to an embodiment of the present invention. [Figure 11] 1 is a diagram illustrating a hardware configuration of a document search device and a user terminal according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0011] Hereinafter, each embodiment will be described with reference to the accompanying drawings. In this specification and drawings, components having substantially the same functional configuration are designated by the same reference numerals, and redundant description will be omitted.

[0012] <Terminology> The present invention can be applied to document retrieval, which retrieves any one or more documents. For example, a "document" can be a document converted from an image of a handwritten document using OCR (Optical Character Recognition), a document created using word processing software, etc. A "document" can contain typographical errors.

[0013] <System configuration> Fig. 1 is a diagram showing the overall system configuration including a document search device 10 according to one embodiment of the present invention. As shown in Fig. 1, the document search system 1 includes the document search device 10 and a user terminal 20. The document search device 10 can send and receive data to and from the user terminal 20 via any network. Each of these will be described below.

[0014] The document search device 10 is a device (e.g., a server) that performs document search processing. The document search device 10 has an input acceptance unit, a document search unit, and a search result display unit. Specifically, the document search device 10 can have a character generation model construction unit 100 and a document search function unit 200 that has an input acceptance unit, a document search unit, and a search result display unit. The input acceptance unit, the document search unit, and the search result display unit will be described later. The character generation model construction unit 100 will be described in detail later with reference to FIG. 2, and the document search function unit 200 will be described in detail with reference to FIG. 4. Note that, although the present specification describes a case where the character generation model construction unit 100 and the document search function unit 200 are included in a single device, the character generation model construction unit 100 and the document search function unit 200 may be included in separate devices.

[0015] The user terminal 20 is a terminal used when constructing a character generation model and a terminal used when searching for documents. For example, the user terminal 20 is a personal computer or the like. In this specification, a case will be described in which the terminal used when constructing a character generation model and the terminal used when searching for documents are one terminal, but the terminal used when constructing a character generation model and the terminal used when searching for documents may be separate terminals. Furthermore, multiple user terminals 20 may be connected to the document search device 10.

[0016] The document search device 10 may have some or all of the functions of the user terminal 20.

[0017] <Functional blocks of the character generation model construction unit 100> FIG. 2 is a diagram showing functional blocks of a character generation model construction unit 100 of a document search device 10 according to an embodiment of the present invention. The character generation model construction unit 100 constructs a prediction model (also referred to as a character generation model) used by a document search function unit 200. As shown in FIG. 2, the character generation model construction unit 100 may include an input reception unit 101, a document acquisition unit 102, a character type acquisition unit 103, a sentence reversal unit 104, a character string segmentation unit 105, a learning unit 106, a prediction model storage unit 107, a learning document database (DB) 108, and a character generation model database (DB) 109. Furthermore, by executing a program, the document search device 10 can function as the input reception unit 101, the document acquisition unit 102, the character type acquisition unit 103, the sentence reversal unit 104, the character string segmentation unit 105, the learning unit 106, and the prediction model storage unit 107.

[0018] The input receiving unit 101 receives input from the user. The following description will be divided into two parts: specifying the number of characters in a string of characters to be input when machine learning is performed, and specifying a document to be used in machine learning.

[0019] The input accepting unit 101 accepts a designation of the number of characters (hereinafter also referred to as the designated number of characters) of a string of characters to be input when the learning unit 106 performs machine learning. For example, the input accepting unit 101 can accept a designation of the number of characters input by the user to the user terminal 20.

[0020] The input accepting unit 101 accepts the specification of documents to be used for machine learning by the learning unit 106 (hereinafter, documents used for machine learning are also referred to as "learning documents"). For example, the input accepting unit 101 can accept the specification of learning documents input by a user to the user terminal 20. For example, the learning documents are all documents in the learning document DB 108, or documents that contain content similar to a document that the user wants to search.

[0021] The document acquisition unit 102 acquires learning documents from the learning document DB 108 in accordance with the specification received by the input reception unit 101. For example, the document acquisition unit 102 acquires all documents in the learning document DB 108, or selects and acquires documents in the learning document DB 108 that contain content similar to the document the user wants to search for.

[0022] Any document is stored in the learning document DB 108. The documents in the learning document DB 108 and the documents in the digital document DB 206 of the document search function unit 200 (described later) may be the same, or may be partially or completely different. For example, the documents in the learning document DB 108 are documents that do not contain typos.

[0023] The character type acquisition unit 103 acquires all character types contained in the training document acquired by the document acquisition unit 102. The character types are used as the output of predictions made by the character generation model. Specifically, the character type acquisition unit 103 acquires all characters from the training document and creates a set of characters by excluding duplicate characters.

[0024] The text reversal unit 104 rearranges the characters contained in the learning document acquired by the document acquisition unit 102 so that the order of the character strings is reversed (inverted) (i.e., the last character of the document becomes the first character, and the first character of the document becomes the last character). A document that has been rearranged so that the order of the character strings is reversed is called a "reversed document," and a document that has not been rearranged so that the order of the character strings is reversed (i.e., a document that was stored in the learning document DB 108) is called a "forward document."

[0025] The character string segmentation unit 105 segments a pair of character strings X and y from a learning document (i.e., a forward document) acquired by the document acquisition unit 102, for constructing a forward-direction character generation model through machine learning. The character string segmentation unit 105 also segments a pair of character strings X and y from a document (i.e., a reverse document) in which characters have been rearranged by the sentence reversal unit 104, for constructing a reverse-direction character generation model through machine learning. X is a character string to be input to the character generation model, and y is a character output from the character generation model. The number of characters in X is the specified number of characters accepted by the input acceptance unit 101. The character type of y is the character type acquired by the character type acquisition unit 103. In other words, y is any character included in the set of characters created by the character type acquisition unit 103, excluding duplicate characters.

[0026] Examples of training data will be described below with reference to FIGS.

[0027] Fig. 6 is an example of training data for a forward character generation model according to one embodiment of the present invention. Fig. 6 is a diagram showing an example of a character string extracted from a forward document when the specified number of characters is 5. As shown in Fig. 6, a string of five consecutive characters extracted from the forward document is designated as X, and the character following that is designated as y.

[0028] Fig. 7 is an example of training data for a reverse character generation model according to one embodiment of the present invention. Fig. 7 is a diagram showing an example of a character string extracted from a reverse document when the specified number of characters is 5. As shown in Fig. 7, a string of five consecutive characters extracted from the reverse document is designated as X, and the character following that is designated as y.

[0029] Returning to the explanation of Fig. 2, the learning unit 106 performs machine learning using a set of character strings X extracted by the character string extraction unit 105 and a set of characters y, and constructs a character generation model that, when a character string is input, outputs the character that follows the input character string.

[0030] Specifically, the learning unit 106 performs machine learning using a pair of character strings X and y extracted from a "forward document" by the character string extraction unit 105, and constructs a forward character generation model. The learning unit 106 also performs machine learning using a pair of character strings X and y extracted from a "reverse document" by the character string extraction unit 105, and constructs a reverse character generation model. For example, the learning unit 106 can use, as a machine learning (deep learning) technique, learning that can handle sequence data such as character strings (for example, a recurrent neural network (RNN) or a long short-term memory (LSTM)). Therefore, prediction can be made taking into account the order of character strings.

[0031] The prediction model storage unit 107 stores the forward character generation model and the backward character generation model constructed by the learning unit 106 in the character generation model DB 109.

[0032] The character generation model DB 109 stores a forward character generation model and a backward character generation model.

[0033] <Processing method> FIG. 3 is a flowchart showing the flow of processing for constructing a character generation model according to one embodiment of the present invention.

[0034] In step 100 (S100), the input accepting unit 101 accepts a specification of the number of characters in a string of characters to be input when the learning unit 106 performs machine learning. For example, the input accepting unit 101 can accept a specification of the number of characters input by a user to the user terminal 20. The input accepting unit 101 also accepts a specification of a learning document to be used by the learning unit 106 for machine learning. For example, the input accepting unit 101 can accept a specification of a learning document input by a user to the user terminal 20.

[0035] In step 101 (S101), the document acquisition unit 102 acquires learning documents from the learning document DB 108 in accordance with the specification received by the input receiving unit 101. For example, the document acquisition unit 102 sequentially acquires all learning documents in the learning document DB 108, or selects documents in the learning document DB 108 that contain content similar to a document that the user wants to search for, and sequentially acquires the selected learning documents if there are multiple selected learning documents.

[0036] In step 102 (S102), the character type acquisition unit 103 acquires all character types contained in the learning document acquired by the document acquisition unit 102 in S101.

[0037] The following will be explained separately for segmentation for constructing a forward character generation model (step 103) and segmentation for constructing a backward character generation model (steps 104 and 105).

[0038] In step 103 (S103), the character string extraction unit 105 extracts a pair of character strings X and y for constructing a forward character generation model through machine learning from the learning document acquired by the document acquisition unit 102 in S101. The number of characters in the character string X is the specified number of characters accepted in S100.

[0039] In step 104 (S104), the sentence reversing unit 104 rearranges the characters contained in the learning document acquired by the document acquiring unit 102 in S101 so that the order of the character strings is reversed (reversed).

[0040] In step 105 (S105), the character string extraction unit 105 extracts a pair of character strings X and y for constructing a reverse-direction character generation model through machine learning from the document in which the order of character strings has been reversed by the sentence reversal unit 104 in S104. The number of characters in the character string X is the specified number of characters received in S100.

[0041] In step 106 (S106), the character string extraction unit 105 determines whether extraction processing has been completed for all learning documents that were acquired by the document acquisition unit 102 in S101. If extraction processing has been completed, the process proceeds to step 107 and step 108, respectively, and if extraction processing has not been completed, the process returns to step 101.

[0042] The construction of a forward character generation model (step 107) and the construction of a backward character generation model (step 108) will be explained below separately.

[0043] In step 107 (S107), the learning unit 106 performs machine learning using the pair of character strings X and y extracted from the "forward document" by the character string extraction unit 105 in S103, and constructs a forward character generation model.

[0044] In step 108 (S108), the learning unit 106 performs machine learning using the pair of character strings X and y extracted from the "reverse document" by the character string extraction unit 105 in S105, and constructs a reverse character generation model.

[0045] In step 109 (S109), the prediction model storage unit 107 stores in the character generation model DB 109 the forward character generation model constructed by the learning unit 106 in S107 and the backward character generation model constructed by the learning unit 106 in S108.

[0046] <Functional Block of Document Search Function Unit 200> FIG. 4 is a diagram showing functional blocks of the document search function unit 200 of the document search device 10 according to one embodiment of the present invention. The document search function unit 200 performs document search processing using a prediction model (character generation model) constructed by the character generation model construction unit 100. As shown in FIG. 4, the document search function unit 200 can include an input acceptance unit 201, a document acquisition unit 202, a character generation model acquisition unit 203, a document search unit 204, a search result display unit 205, a digital document database (DB) 206, and a character generation model database (DB) 207. Furthermore, by executing a program, the document search function unit 200 can function as the input acceptance unit 201, the document acquisition unit 202, the character generation model acquisition unit 203, the document search unit 204, and the search result display unit 205.

[0047] The input receiving unit 201 receives input from the user. Below, we will explain the document the user wants to search, the keyword the user wants to search, the ratio or number of characters of wildcards to be substituted for characters in the keyword, the number of characters of the string to be input to the character generation model, and the likelihood threshold.

[0048] The input receiving unit 201 receives the designation of one or more documents that the user wishes to search. For example, the input receiving unit 201 can receive the designation of one or more documents that the user inputs to the user terminal 20. In the present invention, the one or more documents designated by the user are searched based on the keywords designated by the user.

[0049] The input receiving unit 201 receives the specification of a keyword that the user wishes to search for. For example, the input receiving unit 201 can receive the specification of a keyword that the user inputs to the user terminal 20. In the present invention, a document is searched for by replacing characters in the keyword specified by the user with a wildcard.

[0050] The input accepting unit 201 accepts a ratio of the number of wildcard characters to the number of keyword characters, or a specification of the number of wildcard characters. For example, the input accepting unit 201 can accept a specification of the ratio of wildcards or the number of wildcard characters input by a user to the user terminal 20. Note that a wildcard is a special character such as an asterisk or a question mark that is substituted for a character in a keyword. In a search, a wildcard is considered to match any character.

[0051] The input receiving unit 201 receives a designation of the number of characters in a character string to be input to the character generation model. Specifically, the input receiving unit 201 can receive a designation of the number of characters input by the user to the user terminal 20.

[0052] The input receiving unit 201 receives a specification of a threshold value for likelihood (details of which will be described later). Specifically, the input receiving unit 201 can receive a specification of a threshold value for likelihood input to the user terminal 20 by the user.

[0053] The document acquisition unit 202 acquires one or more documents that the user wishes to search from the digital document DB 206 in accordance with the specification received by the input reception unit 101 .

[0054] Any document is stored in the digital document DB 206. Note that the document in the digital document DB 206 and the document in the learning document DB 108 of the character generation model construction unit 100 may be the same, or may be partially or entirely different. For example, the document in the digital document DB 206 is a document that includes typos.

[0055] The character generation model acquisition unit 203 acquires a forward character generation model and a backward character generation model from the character generation model DB 207 .

[0056] The character generation model DB 207 stores a forward character generation model and a backward character generation model constructed by the character generation model construction unit 100.

[0057] For all documents acquired by the document acquisition unit 202, the document search unit 204 (1) generates a character string including a wildcard from a keyword, (2) searches for documents using the character string including the wildcard, and acquires the part where the character string including the wildcard is hit (hit character string) and the character strings before and after it, (3) calculates the likelihood of the hit character string (forward likelihood) using the character string before the hit character string and a forward character generation model, (4) calculates the likelihood of the hit character string (backward likelihood) using the character string after the hit character string and a backward character generation model, and (5) calculates the average of the forward likelihood and backward likelihood as the effective likelihood of the hit character string. This will be explained in detail below.

[0058] (1) Generating strings containing wildcards The document search unit 204 generates a character string including wildcards by replacing some characters of the keyword received by the input receiving unit 201 with wildcards. The number of characters to be replaced with wildcards is determined based on the ratio of wildcards or the number of characters received by the input receiving unit 201.

[0059] (2) Search and obtain hit strings and surrounding strings The document search unit 204 uses a character string containing a wildcard to search all documents acquired by the document acquisition unit 202, and acquires the character strings before and after the point where the character string containing a wildcard is hit (a character string that matches a character string containing a wildcard is also called a "hit character string"). In other words, the document search unit 204 acquires the character string that matches the character string containing a wildcard (hit character string), as well as the character string that precedes the hit character string and the character string that follows the hit character string. The number of characters in the character strings before and after the hit character string that are acquired together with the hit character string are each the number of characters in the character string that is input to the character generation model accepted by the input accepting unit 201.

[0060] (3) Calculation of forward likelihood The document search unit 204 uses the character string preceding the hit character string to create a character string to be input to the forward character generation model (hereinafter referred to as the input character string), and calculates the likelihood of the hit character string. Specifically, it calculates the forward likelihood when it is assumed that the hit character string is a search keyword.

[0061] The following describes a case where the number of characters in the keyword and the number of characters in the string preceding the hit string are the same. The document search unit 204 inputs the string preceding the hit string into the forward character generation model and calculates the likelihood of the first character of the hit string. Next, the document search unit 204 adds the first character of the hit string to the end of the input string and inputs the string excluding the first character of the input string into the forward prediction model, and calculates the likelihood of the second character counting from the beginning of the hit string. The document search unit 204 performs this process for all characters included in the hit string. The average of the likelihoods of all characters included in the hit string calculated in this way is set as the forward likelihood of the hit string. There are no particular restrictions on how the average is calculated, but an arithmetic mean is preferable.

[0062] (4) Calculation of backward likelihood The document search unit 204 uses the character string after the hit character string reversed (i.e., rearranges the characters so that the character string is in the reverse order) to create a character string to be input to the backward character generation model (hereinafter referred to as the input character string), and calculates the likelihood of the hit character string. Specifically, it calculates the backward likelihood when it is assumed that the hit character string is a search keyword.

[0063] The following describes a case where the number of characters in the keyword and the number of characters in the string following the hit string are the same. The document search unit 204 inputs the reversed string following the hit string into the backward character generation model and calculates the likelihood of the last character of the hit string. Next, the document search unit 204 adds the last character of the hit string to the end of the input string and inputs the string obtained by excluding the first character of the input string into the backward prediction model and calculates the likelihood of the second character counting from the end of the hit string. The document search unit 204 performs this process for all characters included in the hit string. The average of the likelihoods of all characters included in the hit string calculated in this way is set as the backward likelihood of the hit string. There are no particular restrictions on how the average is calculated, but an arithmetic mean is preferable.

[0064] <Other embodiments> In a string containing wildcards, non-wildcard characters are always present in the document, so the likelihood of a non-wildcard character can be considered 100 percent.

[0065] (5) Calculation of the effective likelihood The document search unit 204 calculates the average value of the forward likelihood and the backward likelihood as the effective likelihood of the hit character string. There are no particular restrictions on how to calculate the average, but it is preferable to use an arithmetic mean.

[0066] Hereinafter, the search and likelihood calculation will be specifically described with reference to FIGS.

[0067] FIG. 8 is a diagram illustrating a search according to an embodiment of the present invention. As shown in FIG. 8, assume that the keyword a user wishes to search for is "congratulations." In this case, some characters of the keyword "congratulations" are replaced with wildcards, and keywords containing wildcards are generated, such as "congratulations*," "congratulations*ou," "congratulations*tou," "congratulations*tou," and "*congratulations." Then, assume that the hit character string "congratulations" is searched for. The character string "Akemashite" (New Year) before the hit character string "congratulations" is obtained to calculate the forward likelihood, and the character string "arimasu" (gozaimasu) after the hit character string "congratulations" is obtained to calculate the backward likelihood.

[0068] 9 is a diagram for explaining likelihood calculation according to one embodiment of the present invention. As shown in FIG. 9, assume that the keyword the user wants to search for is "congratulations." Then, assume that the hit character string "congratulations" is searched. The character string "Happy New Year" before the hit character string "congratulations" and the character string "Thank you" after the hit character string "congratulations" are obtained. The forward likelihood and backward likelihood are calculated, and the average likelihood obtained by averaging both is the effective likelihood.

[0069] Next, the forward likelihood will be explained. The likelihood is calculated assuming that the hit character string is a search keyword. In FIG. 9, the likelihood of each character included in the search keyword, "o," "me," "de," "to," and "ou," is calculated. The likelihood when "o" follows "Akemashite" is calculated (assuming it is 100 percent). The likelihood when "me" follows "kemashiteo" is calculated (assuming it is 70 percent). The likelihood when "mesisome" follows "de" is calculated (assuming it is 100 percent). The likelihood when "shiteomede" follows "to" is calculated (assuming it is 100 percent). The likelihood when "teomedeto" follows "u" is calculated (assuming it is 100 percent). The average of all the likelihoods (i.e., the likelihood of "o," the likelihood of "me," the likelihood of "de," the likelihood of "to," and the likelihood of "ou") becomes the forward likelihood (average forward likelihood).

[0070] The backward likelihood will now be explained. The likelihood is calculated in the same way as the forward likelihood described above. The likelihood when "u" follows "sumaizago" is calculated (assuming it is 100 percent). The likelihood when "to" follows "maizagou" is also calculated (assuming it is 100 percent). The likelihood when "de" follows "izagouto" is also calculated (assuming it is 100 percent). The likelihood when "me" follows "zagoutode" is also calculated (assuming it is 95 percent). The likelihood when "o" follows "goutodeme" is also calculated (assuming it is 100 percent). The average of all the likelihoods (i.e., the likelihood of "u", the likelihood of "to", the likelihood of "de", the likelihood of "me", and the likelihood of "o") becomes the backward likelihood (average backward likelihood).

[0071] Furthermore, the average of the forward likelihood and the backward likelihood is the effective likelihood (average likelihood).

[0072] Returning to the explanation of Fig. 4, the search result display unit 205 outputs the search results. Specifically, the search result display unit 205 displays on the screen of the user terminal 20 documents whose effective likelihood calculated by the document search unit 204 is equal to or greater than a likelihood threshold value designated by the user.

[0073] For example, the search result display unit 205 can display hit character strings and their surrounding sentences. Furthermore, for example, if a document is converted from an image of a handwritten document using OCR, the search result display unit 205 can display the image of the handwritten document as a search result along with documents whose effective likelihood is equal to or greater than a threshold. Furthermore, for example, the search result display unit 205 can display documents in descending order of effective likelihood.

[0074] In this specification, a case will be described in which an effective likelihood, which is the average of a forward likelihood and a backward likelihood, is used, but only a forward likelihood or only a backward likelihood may be used.

[0075] <Processing method> FIG. 5 is a flowchart showing the process flow of document search according to one embodiment of the present invention.

[0076] In step 200 (S200), the input receiving unit 201 receives a keyword that the user wishes to search for. For example, the input receiving unit 201 can receive a keyword that the user inputs to the user terminal 20.

[0077] In step 201 (S201), the character generation model acquisition unit 203 acquires a forward direction character generation model and a backward direction character generation model from the character generation model DB 207.

[0078] In step 202 (S202), the document acquisition unit 202 acquires one or more documents that the user wishes to search from the digital document DB 206 in accordance with the specification received by the input reception unit 201.

[0079] In step 203 (S203), the document search unit 204 searches the documents of S202 using the character string including the wildcard generated from the keyword of S200, obtains hit character strings, and calculates the average of the forward likelihood and backward likelihood of the hit character string as the effective likelihood of the hit character string using the forward character generation model and the backward character generation model.

[0080] In step 204 (S204), the document search unit 204 determines whether or not the search process for all documents acquired by the document acquisition unit 202 in S202 has been completed. If the search process has been completed, the process proceeds to step 205; if the search process has not been completed, the process returns to step 202.

[0081] In step 205 (S205), the search result display unit 205 determines whether there is a document whose effective likelihood calculated by the document search unit 204 in S203 is equal to or greater than the likelihood threshold value specified by the user. If there is a document, the process proceeds to step 206; if there is no document, the process proceeds to step 210. In step 210 (S210), the search result display unit 205 outputs a notification indicating that no corresponding document exists, and ends the process.

[0082] In step 206 (S206), the search result display unit 205 acquires surrounding sentences that include the hit character string.

[0083] In step 207 (S207), the search result display unit 205 displays the surrounding sentences including the hit character string as the output of the acquired results.

[0084] In step 208 (S208), the search result display unit 205 determines whether or not it has received from the user an instruction to display an image of the handwritten document converted using OCR and a selection of the text. If it has, it proceeds to step 209; if it has not, it ends the process.

[0085] In step 209 (S209), the search result display unit 205 displays an image of the handwritten document corresponding to the sentence selected in S208.

[0086] <Evaluation of search accuracy> The evaluation of search accuracy will be described below.

[0087] The search accuracy was evaluated for the novel "I Am a Cat." This document contains 2,245 paragraphs. By randomly replacing 20% ​​of the characters in the document with other characters, we generated a pseudo-document containing typos.

[0088] The keywords used were wife (107), soba (6), bonito flakes (10), Meitei-kun (64), Yamato spirit (7), furoshiki (wrapping cloth) (6), memory (6), dum-dum bullets (4), champagne (6), and violin (61). The numbers in parentheses indicate the number of paragraphs containing each keyword.

[0089] <Document Search by Document Search Device 10 (LSTM Search)> By searching documents using strings in which some characters of keywords were replaced with wildcards, paragraphs containing strings containing wildcards were retrieved and judged to be correct or not, retrieval accuracy was quantitatively evaluated. Long short-term memory (LSTM) was used as a learning method capable of handling sequence data such as strings. LSTM training was performed using TensorFlow (registered trademark), a software library used for machine learning. The number of training epochs was 200. The input string was eight characters long.

[0090] "Precision," "Recall," and "F-measure" were calculated as evaluation indicators of search accuracy.

[0091] "Precision" is a value calculated by dividing the number of correct documents found in a search by the total number of documents found in the search, and can be considered an index of the accuracy of the search.

[0092] "Recall" is a value calculated by dividing the number of correct documents found in a search by the total number of correct documents, and can be considered an index of the comprehensiveness of a search.

[0093] The "F-measure" is a value calculated by taking the harmonic mean of "Precision" and "Recall," and can be considered an indicator of the balance between search accuracy and comprehensiveness.

[0094] For each keyword, we calculated "Precision," "Recall," and "F-value," and then calculated their macro-average values ​​as "average Precision," "average Recall," and "average F-value."

[0095] In document retrieval using the document retrieval device 10 of the present invention, it is necessary to set the ratio of wildcards in keywords (wildcard ratio) and the threshold value of the effective likelihood of hit strings as hyperparameters that affect retrieval accuracy. Here, 50% of the paragraphs in a document were used as training data, and the hyperparameters were tuned to maximize the "F-measure" of the training document. As a result, the wildcard ratio was 0.6 and the threshold value of the effective likelihood of hit strings was 0.8. Using these hyperparameters, a document retrieval was performed using strings containing wildcards. Here, a document retrieval was performed using the remaining 50% of the paragraphs, excluding the training data, as test data, and the retrieval accuracy was evaluated. If a keyword did not exist in the test data, that keyword was excluded and the retrieval accuracy was evaluated.

[0096] <Comparative Example 1 (Keyword Search)> In Comparative Example 1, document retrieval was performed using only keywords (i.e., exact match search) without using wildcards or effective likelihood. For other aspects, the retrieval accuracy was evaluated using the same procedure as in <Document retrieval by document retrieval device 10 (LSTM search)>.

[0097] <Comparative Example 2 (Wildcard Search)> In Comparative Example 2, document retrieval was performed using a character string including a wildcard (i.e., partial match search) without using effective likelihood. In Comparative Example 2, it is necessary to set the wildcard ratio as a hyperparameter that affects search accuracy. Therefore, the hyperparameters were tuned using the same procedure as in <Document Retrieval by Document Search Device 10 (LSTM Search)>. As a result, the wildcard ratio was 0.3. For other aspects, search accuracy was evaluated using the same procedure as in <Document Retrieval by Document Search Device 10 (LSTM Search)>.

[0098] FIG. 10 is a diagram for comparing retrieval accuracy according to one embodiment of the present invention. Specifically, FIG. 10 is a diagram showing the retrieval accuracy of document retrieval by the document retrieval device 10 of the present invention, as well as comparative examples 1 and 2. As shown in FIG. 10, by using the document retrieval device 10 of the present invention, both the "average precision" and the "average recall" are high in a balanced manner. As a result, it can be seen that the "average F-measure" is higher than that of the comparative examples. From the above results, it can be seen that by using the document retrieval device 10 described in this specification, both the accuracy and comprehensiveness of document retrieval can be improved in a balanced manner.

[0099] <Effects> In this way, in the same way that a human being can determine whether a character string is a typographical error by inferring it from the context, the document search device can calculate the likelihood of a character string extracted by a search using a character string containing a wildcard. Therefore, even if a document contains a typographical error, the desired document can be accurately and comprehensively retrieved.

[0100] Furthermore, the likelihood differs depending on whether it is calculated from the front or the back. By calculating the likelihood predicted from the front and back of the sentence and averaging both likelihoods, it is possible to obtain a likelihood that is more in line with human intuition.

[0101] <Hardware configuration> 11 is a hardware configuration diagram of a document search device 10 and a user terminal 20 according to one embodiment of the present invention. The document search device 10 and the user terminal 20 have a CPU (Central Processing Unit) 1001, a ROM (Read Only Memory) 1002, and a RAM (Random Access Memory) 1003. The CPU 1001, the ROM 1002, and the RAM 1003 form a so-called computer.

[0102] The document search device 10 and the user terminal 20 may also include an auxiliary storage device 1004 , a display device 1005 , an operation device 1006 , an I / F (Interface) device 1007 , and a drive device 1008 .

[0103] The hardware components of the document search device 10 and the user terminal 20 are connected to each other via a bus B.

[0104] The CPU 1001 is a computing device that executes various programs installed in the auxiliary storage device 1004 .

[0105] The ROM 1002 is a non-volatile memory. The ROM 1002 functions as a main storage device that stores various programs, data, etc. required for the CPU 1001 to execute various programs installed in the auxiliary storage device 1004. Specifically, the ROM 1002 functions as a main storage device that stores boot programs such as a BIOS (Basic Input / Output System) and an EFI (Extensible Firmware Interface).

[0106] The RAM 1003 is a volatile memory such as a dynamic random access memory (DRAM) or a static random access memory (SRAM). The RAM 1003 functions as a main storage device that provides a working area in which various programs installed in the auxiliary storage device 1004 are expanded when the CPU 1001 executes them.

[0107] The auxiliary storage device 1004 is an auxiliary storage device that stores various programs and information used when the various programs are executed.

[0108] The display device 1005 is a display device that displays the internal state of the document search device 10 and the user terminal 20, etc.

[0109] The operation device 1006 is an input device through which the person operating the document search device 10 and the user terminal 20 inputs various instructions to the document search device 10 and the user terminal 20 .

[0110] The I / F device 1007 is a communication device that connects to a network and communicates with other devices.

[0111] The drive device 1008 is a device for loading a recording medium 1009. The recording medium 1009 here includes media that record information optically, electrically, or magnetically, such as a CD-ROM, a flexible disk, or a magneto-optical disk. The recording medium 1009 may also include semiconductor memories that record information electrically, such as an EPROM (Erasable Programmable Read Only Memory) or a flash memory.

[0112] The various programs to be installed in the auxiliary storage device 1004 are installed, for example, by setting the distributed recording medium 1009 in the drive device 1008 and reading out the various programs recorded on the recording medium 1009 by the drive device 1008. Alternatively, the various programs to be installed in the auxiliary storage device 1004 may be installed by being downloaded from a network via the I / F device 1007.

[0113] Although the examples of the present invention have been described in detail above, the present invention is not limited to the specific embodiments described above, and various modifications and variations are possible within the scope of the gist of the present invention as set forth in the claims. [Explanation of symbols]

[0114] 1 Document Search System 10 Document Search Device 20 User terminal 100 Character generation model construction section 200 Document Search Function Unit 101 Input reception unit 102 Document Acquisition Department 103 Character type acquisition section 104 Sentence Reversal Section 105 String Extraction Section 106 Learning Department 107 Prediction model storage unit 108 Learning Document DB 109 Character Generation Model DB 201 Input reception section 202 Document Acquisition Department 203 Character Generation Model Acquisition Unit 204 Document Search Unit 205 Search result display section 206 Digital Document Database 207 Character Generation Model DB 1001 CPU 1002 ROM 1003 RAM 1004 Auxiliary storage device 1005 Display device 1006 Operating device 1007 I / F device 1008 Drive device 1009 Recording media

Claims

1. an input receiving unit that receives input of keywords for document search; A hit string that matches a string obtained by replacing some characters of the keyword with a wildcard, and character strings before and after the hit string are obtained from the document; Calculating a forward likelihood of the hit string based on the hit string and a string preceding the hit string; Calculating a backward likelihood of the hit string based on the hit string and a string following the hit string; a document search unit that calculates an average value of the forward likelihood and the backward likelihood as an effective likelihood of the hit character string; a search result display unit that outputs the results of the document search based on the effective likelihood; A document search device comprising:

2. 2. The document search device according to claim 1, wherein the document search unit calculates the forward likelihood or backward likelihood of the hit character string based on the forward likelihood or backward likelihood of each character of the hit character string.

3. 3. The document search device according to claim 2, wherein the document search unit considers the forward likelihood or backward likelihood of the characters in the hit character string that are not wildcards to be 100 percent.

4. the input receiving unit receives an input of a threshold value of the effective likelihood of the hit character string; The document search device according to claim 1 , wherein the search result display unit displays the hit character strings having an effective likelihood equal to or greater than the threshold value, and surrounding sentences containing the hit character strings.

5. The document search device according to claim 4 , wherein the search result display unit further displays images of handwritten documents corresponding to the hit character strings having an effective likelihood equal to or greater than the threshold value and surrounding sentences containing the hit character strings.

6. The document search device according to claim 1 , wherein the search result display unit outputs the document search results in descending order of effective likelihood of the hit character strings.

7. A document search system including a document search device and a user terminal, The document search device an input receiving unit that receives input of a keyword for document search from the user terminal; A hit string that matches a string obtained by replacing some characters of the keyword with a wildcard, and character strings before and after the hit string are obtained from the document; Calculating a forward likelihood of the hit string based on the hit string and a string preceding the hit string; Calculating a backward likelihood of the hit string based on the hit string and a string following the hit string; a document search unit that calculates an average value of the forward likelihood and the backward likelihood as an effective likelihood of the hit character string; a search result display unit that outputs document search results based on the effective likelihood to the user terminal.

8. Computer, an input receiving unit that receives input of keywords for document search; A hit string that matches a string obtained by replacing some characters of the keyword with a wildcard, and character strings before and after the hit string are obtained from the document; Calculating a forward likelihood of the hit string based on the hit string and a string preceding the hit string; Calculating a backward likelihood of the hit string based on the hit string and a string following the hit string; a document search unit that calculates an average value of the forward likelihood and the backward likelihood as an effective likelihood of the hit character string; a search result display unit that outputs the results of the document search based on the effective likelihood; A program to function as a

9. A method executed by a document search device, comprising: A step of accepting input of keywords for document search; A hit string that matches a string obtained by replacing some characters of the keyword with a wildcard, and character strings before and after the hit string are obtained from the document; Calculating a forward likelihood of the hit string based on the hit string and a string preceding the hit string; Calculating a backward likelihood of the hit string based on the hit string and a string following the hit string; calculating an average value of the forward likelihood and the backward likelihood as an effective likelihood of the hit character string; outputting a document retrieval result based on the effective likelihood; A method comprising:

Citation Information

Patent Citations

  • Magnetic recording and reproducing device

    JP1988074289A

  • Character string search device and program

    JP2007048272A

  • Character string retrieval device, character string retrieval method and character string retrieval program

    JP2012141742A