Document search device
The document search device uses similarity-based algorithms to identify sentences matching specified multi-word strings in patent specifications, addressing the exact matching limitations of existing keyword search methods and ensuring sentence-level consistency.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- KISA PATENT & TRADEMARK ATTORNEYS CORP
- Filing Date
- 2024-09-30
- Publication Date
- 2026-05-07
AI Technical Summary
Existing keyword search methods in patent specifications fail to accurately find sentences similar to specified strings of multiple words due to exact matching requirements, making it difficult to ensure consistency at the sentence level, especially when expressions in the claims and detailed descriptions differ.
A document search device that includes an interface display unit, memory unit, source text processing, query retrieval unit, and search unit to identify sentences similar to a specified string of multiple words based on similarity, using TF-IDF and cosine similarity algorithms to analyze tokenized sentences.
Enables accurate retrieval of sentences similar to the specified string from the search target document, overcoming the limitations of exact matching and ensuring consistency at the sentence level.
Smart Images

Figure 0007854735000001 
Figure 0007854735000002 
Figure 0007854735000003
Abstract
Description
Technical Field
[0001] This disclosure relates to a document search device for searching documents. Place
Background Art
[0002] Generally, when creating or translating a patent specification, etc., keyword search may be utilized to examine how the words described in the patent specification are used in other parts of the patent specification. Patent Document 1 discloses a device that stores link information associating a specified word with the location in the patent specification where the specified word is described by performing a keyword search using the specified word on the patent specification to be searched.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] When drafting or translating patent specifications, it is sometimes necessary to ensure consistency among similar expressions within the specification, not at the word level, but at the sentence level or other strings of a certain length. In such cases, it is desirable to specify a string of multiple words (for example, a collection of phrases or a sentence) rather than a single word, and search the target document for sentences similar to the specified string. However, the keyword search disclosed in Patent Document 1 searches the patent specification for locations that contain the entire specified string. Therefore, when a search is performed using a string of multiple words, only locations that exactly match the specified string will be found. In a patent specification, embodiments corresponding to the invention described in the claims are described in the detailed description of the invention. As a result of the above, even if a search is performed using a string of multiple words described in the claims, it may not be possible to find sentences similar to the specified string in the detailed description of the invention within the patent specification. This is because even if the concepts described in the claims and the detailed description of the invention are the same, the expressions may not match. It is also conceivable to perform searches by assuming various patterns of strings of multiple words, but it is difficult to cover all patterns.
[0005] This disclosure was made to solve the above-mentioned problems, and is a document search system that can accurately search for sentences similar to a string of specified words from a target document. Place The purpose is to provide it. [Means for solving the problem]
[0006] The document search device relating to this disclosure includes an interface display unit that displays a screen on a display device that includes a first field in which a search target containing multiple sentences is displayed, A memory unit, a source text processing unit that saves the source text specified by the user to the memory unit and outputs the source text as a search target to the first field, A query retrieval unit that retrieves a string consisting of multiple words included in the search target displayed in the first field, and which is selected by the user in the first field, as a query, Original text Based on the similarity between the multiple sentences contained and the query Original text The system includes a search unit that searches for sentences similar to the query and outputs the search results to the first field, and a query retrieval unit that, after the search unit has performed the search, retrieves as the query the string included in the search results output to the first field that was selected by the user in the first field. The search unit then retrieves the strings included in the search results as queries using the query retrieval unit. Based on the similarity between the queries obtained from the strings in the search results and the multiple sentences in the original text, it searches the original text for sentences similar to the queries and outputs the search results to the first field. . [Effects of the Invention]
[0009] Document search tool for this disclosure Place According to this method, sentences similar to the query are searched from the search target based on the similarity between multiple sentences included in the search target and a string of multiple words selected by the user as the query. Therefore, sentences similar to the specified string of multiple words can be accurately searched from the search target document. [Brief explanation of the drawing]
[0010] [Figure 1] This is a diagram showing the configuration of a document search system according to Embodiment 1. [Figure 2] This is a hardware configuration diagram showing a document search device according to Embodiment 1. [Figure 3] This is a schematic diagram showing the screen displayed by the document search software according to Embodiment 1. [Figure 4] This is a flowchart showing a document search method performed by the document search device according to Embodiment 1. [Figure 5] This flowchart shows the flow of the search process performed by the document search device according to Embodiment 1. [Figure 6] This figure shows how the search target, saved as the original text, is displayed in the first field of the screen in Embodiment 1. [Figure 7] This figure shows how a portion of the search targets displayed in the first field has been selected by the user in Embodiment 1. [Figure 8]This figure shows the first field of the screen displaying the search results and the second field displaying the query in Embodiment 1. [Figure 9] This figure shows how a portion of the search results displayed in the first field has been selected by the user in Embodiment 1. [Figure 10] This figure shows the first field of the screen displaying the search results and the second field displaying the query in Embodiment 1. [Figure 11] This figure shows how a portion of the search results displayed in the first field has been selected by the user in Embodiment 1. [Figure 12] This figure shows how the query is displayed in the second field of the screen in Embodiment 1. [Figure 13] This figure shows the first field of the screen where the search results are displayed and the query is shown in the second field, in Embodiment 1. [Modes for carrying out the invention]
[0011] Embodiment 1. Figure 1 is a configuration diagram showing a document search system 1 according to Embodiment 1. The document search system 1 includes, for example, a document search device 2, an input device 3, and a display device 4. The document search system 1 is a system for searching for strings that meet certain conditions from documents to be searched. Hereafter, searching for strings that meet certain conditions from documents to be searched will be referred to as "document search" or "document retrieval." The documents to be searched are, for example, patent specifications for filing a patent application. However, the documents to be searched are not limited to patent specifications, as long as they contain text that includes multiple sentences. Here, "sentence" refers to a series of words or strings separated by any delimiter. In the following explanation, the delimiter is used as an example to refer to a period, but it is not limited to this. In addition, strings that constitute clauses such as "~when," and "~in the case," may be treated as delimiters. In this case, a part of a compound sentence can be treated in the same way as a "sentence" here.
[0012] The document search device 2 is, for example, a PC terminal possessed by a user who performs document search. Software for performing document search is installed in the document search device 2. Hereinafter, this software is referred to as document search software. The document search software includes a document search program in which instructions for causing a computer to execute are described, and setting data for controlling the document search program and the like. The document search device 2 has a control unit 5 and a storage unit 6. As functional units, the control unit 5 has an interface display unit 11, a query acquisition unit 12, a conversion unit 13, a search unit 14, an original text processing unit 15, a result storage unit 16, and a query log operation unit 17. The storage unit 6 stores an original text 21, a query log 22, a query description file 23, and a result file 24, which are data related to the processing of the document search software. The descriptions of the original text 21, the query log 22, the query description file 23, and the result file 24 will be described later together with the descriptions of the functional units of the control unit 5.
[0013] The input device 3 is a device for inputting to the document search device 2, such as a mouse or a keyboard connected to the document search device 2. The display device 4 is, for example, a display connected to the document search device 2, and is a device for displaying a screen for operating the document search software based on an instruction from the document search device 2.
[0014] FIG. 2 is a hardware configuration diagram showing the document search device 2 according to Embodiment 1. The document search device 10 is composed of a processor 41 and a memory 42. The processor 41 and the memory 42 are mutually connected by, for example, a bus 43. The processor 41 is, for example, a CPU, and by reading and executing the document search program stored in the memory 42, realizes the functions of each functional unit of the control unit 5 of the document search device 10. The memory 42 constitutes the storage unit 6 and is composed of, for example, a volatile or non-volatile semiconductor memory such as RAM, ROM, flash memory, EPROM, EEPROM, an HDD or an SSD, or a combination thereof.
[0015] Hereinafter, based on the screen displayed by the document search software, the details of the document search by the document search device 2 and each functional part of the control unit 5 will be described. The document search device 2 performs similar search, normal search, and regular expression search as document search methods. The similar search is a search method that searches for sentences similar to a character string (for example, a collection of clauses or a sentence) consisting of a plurality of words specified by the user as a query from the documents to be searched, based on the similarity between a plurality of sentences included in the documents to be searched and the character string. Specifically, in the similar search, a plurality of sentences included in the search target are rearranged in descending order of similarity to the character string specified as the query, and the result is output as the search result. The normal search is a search method that searches for a character string that matches the character string specified as the query from the documents to be searched. The regular expression search is a search method (performing pattern matching) that searches for a character string that matches a character string including the regular expression specified as the query from the documents to be searched. Note that the regular expression is an example of a formal expression for performing pattern matching, and other formal expressions other than the regular expression may be used for performing pattern matching. Here, the formal expression for performing pattern matching can specifically be said to be an expression by a symbol string that follows a formally defined grammar. The symbol string here means a collection such as a character, a symbol, or a character code, and the formally defined grammar means a set of rules that govern the order of the symbol string. FIG. 3 is a schematic diagram showing a screen G displayed by the document search software according to the first embodiment. The interface display unit 11 causes the screen G shown in FIG. 3 to be displayed on the display device 4. The screen G functions as an interface for receiving operations from the user. The user inputs information to the fields on the screen G and operates the buttons via the input device 3. Note that the notations and arrangements of the fields and buttons on the screen G are merely examples. The notations and arrangements of the fields and buttons on the screen G are not particularly limited as long as the same functions as those described below can be executed.
[0016] As shown in Figure 3, screen G displays the first field 51, the second field 52, and the third field 53. The first field 51 is a text box that displays the original text 21, which has been temporarily stored in the storage unit 6 after the original text processing unit 15 has removed unprocessable data such as images from the search target selected by the user. The first field 51 also displays the search results, which are the result of the document search. In other words, the first field 51 displays the original text 21 of the search target before the document search, and displays the search results after the document search. To put it another way, the first field 51 switches between displaying the original text 21 of the search target and the search results before and after the document search. The size of the first field 51 may be freely changed by the user. The second field 52 is a text box that displays the query used in similarity search or regular expression search, provided by the query acquisition unit 12. The third field 53 is a text box that displays the query used in normal search, provided by the query acquisition unit 12. Note that the user can also directly input strings they wish to specify in the query into the second field 52 and the third field 53.
[0017] Furthermore, buttons 61, 62, and 63 are displayed on screen G. Buttons 61, 62, and 63 are buttons for performing a similarity search. Button 61 is the "Similarity Search" button. When button 61 is pressed by the user, the query acquisition unit 12 acquires the string directly entered by the user in the second field 52 as a query. The search unit 14 then performs a similarity search on the search target based on the query acquired by the query acquisition unit 12. In other words, button 61 is a button for performing a similarity search based on the string directly entered by the user in the second field 52. The search unit 14 records the query used for the similarity search in the query log 22. The query log 22 is stored, for example, in the storage unit 6. Specifically, it is saved as a text file in a folder pre-configured in the document search software. The query log 22 stores the strings that have been used as queries when performing a similarity search in the document search software so far. When multiple similarity searches are performed, the multiple strings used as queries are separated by arbitrary identifiers (e.g., newlines or tabs).
[0018] Button 62 is the "Search for Similar Terms" button. When button 62 is pressed by the user, the query acquisition unit 12 acquires the string selected by the user in the first field 51 as a query and outputs it to the second field 52. The search unit 14 then performs a similar search on the search target based on the query acquired by the query acquisition unit 12. In other words, button 62 is a button for performing a similar search based on the string selected by the user from the search target in the first field 51. The search unit 14 records the query used for the similar search in the query log 22.
[0019] Button 63 is the "External File Search" button. When button 63 is pressed by the user, the query acquisition unit 12 reads a query description file 23, such as a text file, which contains the strings to be acquired as queries, and acquires the strings described in the read query description file 23 as queries. The query description file 23 is prepared by the user before button 63 is pressed and stored in the storage unit 6. The query log 22 may be used as the query description file 23, or an edited version of the query log 22 may be used as the query description file 23. The query description file 23 may also be created separately from the query log 22. The search unit 14 performs a similarity search on the search target based on the queries acquired by the query acquisition unit 12. The query acquisition unit 12 recognizes any identifiers (e.g., newlines or tabs) described in the query description file 23 and acquires the strings before and after the identifiers as separate queries. In other words, when performing a similarity search with multiple queries, the user prepares a query description file 23 in which identifiers are described between the strings to be acquired as queries. If the query description file 23 contains multiple strings separated by identifiers, the query retrieval unit 12 and the search unit 14 repeatedly retrieve the query and perform similarity searches corresponding to each string. At this time, the result storage unit 16 sets the string used as the query as the file name of the result file 24, makes the search results from the query the content of the result file 24, and outputs the result file 24. The result storage unit 16 may also perform editing processing for file name specification, such as shortening the string used as the query or deleting special characters contained in the string used as the query.
[0020] Here, we will describe an example of an algorithm for calculating similarity in the similarity search in the search unit 14. The algorithm for calculating similarity is a known method using TF-IDF (Term Frequency-Inverse Document Frequency) and cosine similarity. Similarity search using TF-IDF and cosine similarity is easy to implement and is expected to require less computation than similarity search using other methods, such as edit distance (Levenshtein distance). First, each of the sentences included in the query and the search target is divided into multiple tokens. A token is a unit that represents each of the parts when a string is divided into multiple parts for text analysis. Specifically, words registered in the dictionary are tokenized as they are. The dictionary here refers to data that organizes information such as part of speech and conjugation for each word. For example, an open-source natural language processing library is used as the dictionary. By tokenizing the words registered in the dictionary, the boundary between tokens and untokenized parts is determined in the sentences included in the query and the search target. Parts of a sentence that are not registered in the dictionary (i.e., parts of the query and search target that have not been tokenized using the dictionary) are tokenized after the range considered to be a single word is recognized using the spaces entered in the first field 51 and the second field 52, and the boundaries between recognized tokens and untokenized parts. For example, each area separated by a boundary or space is treated as one token. Therefore, each token may contain punctuation or control characters. Also, a single token may actually contain multiple words. Using this method, strings containing specialized terms and neologisms that are not registered in the dictionary can also be included in the calculation of similarity.
[0021] Next, the TF-IDF scores of the tokens are calculated for the query and the search target, and document vectors A and B are generated. Specifically, the TF-IDF score of a token included in the query is calculated as TF score * IDF score. The TF score of each token in the query indicates the frequency of occurrence of the token in the text, and is calculated for each token by the number of occurrences of that token in the query / the total number of tokens in the query. The IDF score of each token in the query indicates the general frequency of occurrence of the token, and is calculated for each token by log(total number of sentences in the source text / number of documents containing that token among all sentences in the search target + 1) + 1. Once the TF-IDF scores of all tokens have been calculated, document vector A is generated with the TF-IDF scores of each token in the query as its elements.
[0022] Similarly, the TF-IDF score for each token in each sentence included in the search target is calculated by TF score * IDF score. The TF score for each token in each sentence included in the search target is calculated for each sentence and token by the number of occurrences of that token in the sentence included in the search target / the total number of tokens in the sentence included in the search target. The IDF score for each token in each sentence included in the search target is calculated for each sentence and token by log(total number of sentences in the source text 21 / number of documents containing that token among all sentences included in the search target + 1) + 1. Once the TF-IDF scores for all sentences and tokens included in the search target have been calculated, a document vector B is generated with the TF-IDF score of each token in the search target as its element.
[0023] Next, the cosine similarity between the query document vector and the search target document vector is calculated. The cosine similarity cosθ is calculated by cosθ = ||A||||B|| / A·B. Here, ||A|| is the norm (length) of the query document vector, and ||B|| is the norm (length) of the document vector of the sentence included in the search target. A·B is the dot product of the query document vector and the document vector of the sentence included in the search target. The maximum value of cosine similarity is 1, and the minimum value is -1. When the cosine similarity is the maximum value, the query document vector and the document vector of the sentence included in the search target are in the exact same direction, meaning that the query and the sentence included in the search target are identical. When the similarity is the minimum value, the query document vector and the document vector of the sentence included in the search target are in opposite directions, meaning that the query and the search target are completely different. The similarity in Embodiment 1 is calculated by applying a correction to the cosine similarity calculated in this way so that the maximum value is 1 and the minimum value is 0. The correction method is not particularly limited. For example, the range of cosine similarity (-1 to 1) may be reduced to the range of similarity (0 to 1), or if the cosine similarity is less than 0, it may be treated as if the similarity is 0. However, the maximum value of the similarity may be set to a value other than 1, and the minimum value may be set to a value other than 0. If the maximum value of the similarity is set to 1 and the minimum value to -1, the cosine similarity may be used as is without any correction.
[0024] Furthermore, buttons 71 and 72 are displayed on screen G. Buttons 71 and 72 are buttons for performing a normal search. Button 71 is the "Normal Search" button. When button 71 is pressed by the user, the search unit 14 obtains the string that the user directly entered into the third field 53 as a query. The search unit 14 then performs a normal search based on the query obtained by the query acquisition unit 12. In other words, button 71 is a button for performing a normal search based on the string that the user directly entered into the third field 53.
[0025] Button 72 is the "Normal Search with Selected Term" button. When button 72 is pressed by the user, the query acquisition unit 12 acquires the string selected by the user in the first field 51 as a query and outputs it to the third field 53. The search unit 14 then performs a normal search based on the query acquired by the query acquisition unit 12. In other words, button 72 is a button for performing a normal search based on the string selected by the user from the search target in the first field 51.
[0026] Furthermore, buttons 81 and 82 are displayed on screen G. Buttons 81 and 82 are buttons for performing regular expression searches. Button 81 is the "Regular Expression Conversion" button. When button 81 is pressed by the user, the conversion unit 13 converts the string selected by the user in the first field 51 into a regular expression, obtains the converted string as a query, and outputs it to the second field 52. Specifically, the conversion unit 13 replaces each of the kanji, numbers, katakana, and alphabet characters in the string selected by the user in the first field 51 with a regular expression that does not specify the number of characters to represent that character type, for each group of consecutive characters of the same type. On the other hand, the conversion unit 13 does not convert hiragana and punctuation marks in the string selected by the user in the first field 51 into a regular expression. Therefore, the query consists of regular expressions for the kanji, numbers, katakana, or alphabet characters contained in the string selected by the user in the first field 51, and hiragana and punctuation marks.
[0027] In the above example, kanji, katakana, numbers, and alphabets are assumed to be converted to regular expressions, but the types of characters to be converted are not particularly limited. Furthermore, the user may be able to select which characters to convert. In addition, the format of the regular expression (the pattern set of the regular expression) to which each character type is converted is not particularly limited and should be designed considering, for example, the OS installed on the document search device 2, the type of document, and other factors related to character representation on the computer. Moreover, this embodiment assumes a configuration where the regular expression is hardcoded, but is not limited to this. For example, the pattern set of the regular expression may be dynamically supplied from an external source, or the formal expression (pattern) used for pattern matching may be generated each time by connecting the document search device 2 with a generation AI, etc. Also, although consecutive blocks of the same character type are converted to a regular expression without specifying the number of characters, the regular expression may include a specified number of characters.
[0028] Button 82 is the "Regular Expression Search" button. When button 82 is pressed by the user, the search unit 14 performs a regular expression search using the phrase converted into a regular expression obtained by the query acquisition unit 12 as the query. As described above, the query is a regular expression in which kanji, numbers, katakana, or alphabet characters have been converted. In Japanese, particles and auxiliary verbs are written in hiragana, so the search unit 14 can search for sentences included in the search target that have a grammatical structure common to the query.
[0029] Screen G also displays buttons 91, 92, and 93, as well as a checkbox 94. Buttons 91, 92, and 93 are buttons for performing operations common to similarity search, normal search, and regular expression search. Button 91 is the "paste to clipboard" button. When button 91 is pressed, it is assumed that the document to be searched has been copied to the clipboard by the user before button 91 is pressed. When button 91 is pressed by the user, the source text processing unit 15 deletes unprocessable data such as images from the data copied to the clipboard and saves it to the storage unit 6 as the source text 21. The source text 21 only needs to be temporarily stored in the storage unit 6 for at least the duration from when the document search software is launched until it is closed. The source text processing unit 15 also outputs the source text 21 to the first field 51.
[0030] Button 92 is a "return" button. When button 92 is pressed by the user, the source text processing unit 15 outputs the source text 21 to the first field 51. Button 92 is used, for example, when search results are displayed in the first field 51, to return the content displayed in the first field 51 to the search target saved as the source text 21.
[0031] Button 93 is the "Save Search Results" button. When button 93 is pressed by the user, the results saving unit 16 saves the search results displayed in the first field 51 to a results file 24, such as a text file. The results file 24 is stored in the storage unit 6.
[0032] Checkbox 94 is used to limit the number of characters in the search results saved in the results file 24 when button 63 or button 93 is pressed. If checkbox 94 is checked by the user, the results saving unit 16 cuts off the specified number of characters from the beginning of the search results and writes them to the results file 24. If checkbox 94 is not checked by the user, the results saving unit 16 writes the entire search result to the results file 24. The example in Figure 3 shows a case where the number of characters is limited to 1000 characters, but the number of characters that are limited is not particularly limited. The user may also be allowed to specify the number of characters that are limited.
[0033] Furthermore, buttons 101 and 102 are displayed on screen G. Buttons 101 and 102 are buttons for performing operations on the query log 22. Button 101 is the "Check Query Log" button. When button 91 is pressed by the user, the query log operation unit 17 opens the query log 22 saved in a pre-configured folder. At this time, the user can freely edit the contents of the query log 22.
[0034] Button 92 is the "Save query log to specified folder" button. When button 92 is pressed by the user, the query log operation unit 17 opens a dialog box that accepts the user's choice of folder. Once the user has specified a folder, the query log operation unit 17 copies the query log 22, which is stored in a folder pre-configured in the document search software, to the folder specified by the user.
[0035] Here, the overall flow of the document search method by the document search device 2 will be explained using Figure 4. Figure 4 is a flowchart of the document search method performed by the document search device 2 according to Embodiment 1. First, when the document search device 2 executes the document search software, the interface display unit 11 displays the interface screen G on the display device 4 (step S1). Next, when the user copies the document to be searched to the clipboard and the button 91 ("paste to clipboard" button) is pressed, the original text processing unit 15 saves the contents of the clipboard as the original text 21 after deleting unprocessable data such as images (step S2). Next, the original text processing unit 15 outputs the search target saved as the original text 21 to the first field 51 (step S3). Here, the search unit 14 executes the search process according to the button pressed by the user (step S4). Finally, when the user presses the button 93 ("save search results" button), the result saving unit 16 saves the search results obtained by the search process to an external file (step S5).
[0036] Here, the search process in step S4 will be explained in detail using Figure 5. Figure 5 is a flowchart showing the flow of the search process performed by the document search device 2 according to Embodiment 1. First, the search unit 14 waits until a button is pressed by the user and detects which of the following buttons has been pressed: button 61 ("Similar Search"), button 62 ("Similar Search with Selected Words"), button 63 ("External File Search"), button 71 ("Normal Search"), button 72 ("Normal Search with Selected Words"), button 81 ("Regular Expression Conversion"), and button 82 (Regular Expression Search) (step S400). Depending on the button pressed, the search unit 14 performs one of the following steps S401 to S408, S411 to S415, or S421 to S424.
[0037] Firstly, when the user presses button 61 ("Similar Search" button) while a string has been entered in the second field 52, the query acquisition unit 12 acquires the string entered in the second field 52 as a query (step S401). Then, the search unit 14 searches for sentences similar to the query from the search target saved as the source text 21 based on the similarity between the string acquired as a query and the multiple sentences included in the search target saved as the source text 21 (step S402), and outputs the search results to the first field 51 (step S403). This completes the similar search using the string directly entered by the user in the second field 52 as the query. Note that when the user enters a string in the second field 52, they may click on the second field 52 and type the string directly, or they may drag and drop a string selected from the first field 51 into the second field 52. When performing a similar search using button 61 ("Similar Search"), the user's input of words into the second field 52 is performed independently of the execution of the similar search.
[0038] Secondly, if the user has selected a part of the string displayed in the first field 51 (either the source text 21 or the search result) and the button 62 ("Search for Similar Terms with Selected Terms" button) is pressed, the query acquisition unit 12 acquires the string selected by the user as a query (step S404) and outputs the acquired query to the second field 52 (step S405). Then, the search unit 14 searches for sentences similar to the query from the search target stored as the source text 21 based on the similarity between the multiple sentences contained in the search target stored as the source text 21 and the string acquired as a query (step S402), and outputs the search results to the first field 51 (step S403). This completes the similarity search using the string selected by the user from the first field 51 as the query. When performing a similarity search using the button 62 ("Search for Similar Terms with Selected Terms" button), the process from query acquisition to output of search results is performed continuously.
[0039] Thirdly, when the user presses button 63 ("External File Search" button), the query acquisition unit 12 displays a dialog box (not shown) for specifying the query description file 23. Once the user specifies the query description file 23 from the dialog box, the query acquisition unit 12 acquires the string described in the external file as the query (step S406). At this time, the query acquisition unit 12 acquires a single string separated by an identifier. Subsequently, the process in step S403 is executed, similar to when button 62 ("Search Similar Terms with Selected Phrase" button) is pressed. Then, the search unit 14 searches for sentences similar to the query from the search target saved as the source text 21, based on the similarity between the string acquired as the query and the multiple sentences contained in the search target saved as the source text 21 (step S402). The result saving unit 16 outputs the search results from the search unit 14 to the result file 24 (step S407). The query retrieval unit 12 determines whether the last processed string is the last string listed in the query description file 23 (i.e., whether processing has been performed on all strings listed in the query description file 23) (step S408). If the last processed string is not the last string listed in the query description file 23 (step S408: NO), the query retrieval unit 12 retrieves the next string listed in the external file as the query (step S406) and performs a similarity search (step S402). If the last processed string is the last string listed in the query description file 23 (step S408: YES), the similarity search using the string entered by the user in the external file as the query is completed. Note that when performing a similarity search using button 63 ("External File Search" button), the user does not need to select a string to specify as the query from the first field 51 or enter a query in the second field 52.
[0040] When performing a similarity search using button 63 ("External File Search" button) with a query specified via query description file 23, the query description file 23 may be replaced with the query log 22. The query log 22 stores the strings used as queries when similarity searches have been performed in the document search software in the past. Therefore, when the query log 22 is specified as the query description file 23, the search results of similarity searches using the multiple strings described in the query log 22 are saved in a result file 24 for each query. In this case, the string used as the query is specified as the filename of the result file 24, and the search results from the query are output as the contents of the result file 24.
[0041] Fourth, if the user has entered a string in the third field 53 and the user presses button 71 ("Normal Search" button), the query acquisition unit 12 acquires the string entered in the third field 53 as the query (step S411). Then, the search unit 14 searches the search target saved as the source text 21 for a string that matches the string specified as the query (step S412), and outputs the search results to the first field 51 (step S413). Here, as part of the output of the search results, the part of the source text displayed in the first field 51 that matches the string specified as the query is selected and highlighted. This completes the normal search using the string directly entered by the user in the third field 53 as the query. Note that when the user enters a string in the third field 53, they can either click on the third field 53 and type the string directly, or they can drag and drop a string selected from the first field 51 into the third field 53. When a regular search is performed using button 71 ("Regular Search"), the user's input of words into the third field 53 is performed independently of the execution of the regular search.
[0042] Fifth, if the user has selected a part of the string displayed in the first field 51 (either the source text 21 or the search result) and the button 72 ("Normal Search with Selected Term" button) is pressed, the query acquisition unit 12 acquires the string selected by the user as a query (step S414) and outputs the acquired query to the third field 53 (step S415). Then, the search unit 14 searches the search target saved as the source text 21 for a string that matches the string specified as the query (step S412) and outputs the search result to the first field 51 (step S413). Here, as with the output of the search result, the part of the source text displayed in the first field 51 that matches the string specified as the query is selected and highlighted, just as when the button 71 ("Normal Search" button) is pressed. This completes the normal search using the string selected by the user from the first field 51 as the query. When a normal search is performed using the button 72 ("Normal Search with Selected Term" button), the process from query acquisition to output of search results is performed continuously.
[0043] Sixth, if the user has selected a portion of the search results displayed in the first field 51 and the button 81 ("Regular Expression Conversion" button) is pressed, the conversion unit 13 converts the string selected by the user into a regular expression and obtains the string converted into a regular expression as a query. As a result, the conversion unit 13 obtains a query that includes the regular expression (step S421). The conversion unit 13 also outputs the query that includes the regular expression to the second field 52 (step S422).
[0044] Seventh, when the second field 52 displays a query containing a regular expression and button 82 ("Search with Regular Expression" button) is pressed, the search unit 14 searches the search target saved as the source text 21 for sentences that match the query containing the regular expression (step S423) and outputs the search results to the first field 51 (step S424). This completes the regular expression search, which searches the search target document for strings that match the string containing the regular expression specified as the query. Button 82 ("Search with Regular Expression" button) is expected to be pressed immediately after button 81 ("Convert to Regular Expression" button) is pressed.
[0045] After the search using each search method is completed, if the user does not press any of the following buttons ("Similar Search", "Similar Search with Selected Terms", "External File Search", "Normal Search", "Normal Search with Selected Terms", "Regular Expression Conversion", and "Regular Expression Search"), the search process ends and the system proceeds to step S5.
[0046] On the other hand, if any of the buttons 61 ("Similar Search"), 62 ("Similar Search with Selected Terms"), 63 ("External File Search"), 71 ("Normal Search"), 72 ("Normal Search with Selected Terms"), 81 ("Regular Expression Conversion"), and 82 ("Regular Expression Search") are pressed by the user (Step S430: YES), processing is performed according to the pressed button. In other words, the user may perform a search using each search method only once, or may perform searches using the same or different search methods repeatedly. If a search is performed by pressing any of the buttons 61 ("Similar Search"), 62 ("Similar Search with Selected Terms"), 71 ("Normal Search"), 72 ("Normal Search with Selected Terms"), and 82 ("Regular Expression Search"), the search results are displayed in the first field 51. Therefore, if a user attempts to perform a further search after these searches by pressing one of the buttons 62 ("Search for similar terms with selected phrases"), 72 ("Normal search with selected phrases"), or 82 ("Search using regular expressions"), they will select a string to retrieve as a query from the search results displayed in the first field 51.
[0047] Here, the document search method using the document search device 2 will be explained with specific operating procedures and an example of search content using Figures 4 to 13. Here, we will explain the case in which a similarity search based on a string obtained from the search target saved as the source text 21, a similarity search based on a string obtained from the search results, and a regular expression search are performed in order, and explanations of other operations, including normal searches, will be omitted. In addition, in the following explanation, the step numbers shown in Figure 4 or Figure 5 will be referenced as appropriate to indicate that the process is the same as the process explained in Figure 4 or Figure 5. As described above, when the document search device 2 first executes the document search software, the interface display unit 11 displays the interface screen G on the display device 4 (step S1). Subsequently, when the document to be searched is copied to the clipboard by the user and button 91 ("Clipboard Paste" button) is pressed, the source text processing unit 15 saves the contents of the clipboard as the source text 21 after deleting unprocessable data such as images (step S2). The source text processing unit 15 also outputs the search target saved as the source text 21 to the first field 51 (step S3). Figure 6 shows how the search target saved as the original text 21 is displayed in the first field 51 of the screen in Embodiment 1. As shown in Figure 6, after step S3, the search target saved as the original text 21 is displayed in the first field 51. In the example in Figure 6, the entire patent specification is displayed in the first field 51. For the sake of explanation, in the following figures, the size of the first field 51 is shown to be larger than the first field 51 shown in Figure 3. Also, the illustration of buttons has been omitted as appropriate.
[0048] Following step S3, the user selects a string from the source text 21 displayed in the first field 51 that they want to use as a query. For example, the user selects the string by dragging the mouse from the start position to the end position of the string they want to use as a query. Figure 7 shows how a part of the search target displayed in the first field 51 has been selected by the user in Embodiment 1. In the example in Figure 7, a string consisting of multiple words from claim 1, "A search unit that searches for sentences similar to the query from the search target based on the similarity between a plurality of sentences included in the search target and the query, and outputs the search results on the screen," has been selected. As shown in Figure 7, when a part of the source text 21 displayed in the first field 51 is selected by the user and button 62 ("Search for Similar Words" button) is pressed, the query acquisition unit 12 acquires the sentence selected by the user as a query (step S404) and outputs the acquired query to the second field 52 (step S405). Then, the search unit 14 searches for sentences similar to the query from the search target stored as the source text 21 based on the similarity between the multiple sentences contained in the search target stored as the source text 21 and the string obtained as the query (step S402), and outputs the search results to the first field 51 (step S403).
[0049] Figure 8 shows how, in Embodiment 1, the search results are displayed in the first field 51 of the screen and the query is displayed in the second field 52. In the example in Figure 8, the search results are output by sorting the multiple sentences included in the search target in descending order of similarity to the string "A search unit that searches the search target for sentences similar to the query based on the similarity between the multiple sentences included in the search target and the query selected in Figure 7, and outputs the search results to the screen," in descending order of similarity. In addition, the determined similarity is displayed above each sentence. In this example, Claim 1, which contains the string selected by the user, is determined to have the highest similarity (0.72). Next, the means for solving the problem, which also contains the string selected by the user, is determined to have the second highest similarity (0.55). Furthermore, a sentence in the detailed description of the invention, which is different from the string selected by the user but contains similar content, is determined to have the third highest similarity (0.48). Thus, even if a sentence in the detailed description of an invention that is similar to a string of multiple words specified as a query in the claims does not perfectly match the string specified as a query, a relatively high similarity score is given when considering the entire set of sentences included in the search.
[0050] Here, after step S403, the user selects a portion of the search results, specifies it as a query, and performs another similarity search. Figure 9 shows how a portion of the search results displayed in the first field 51 has been selected by the user in Embodiment 1. In the example in Figure 9, the string consisting of multiple words, "Output search results to the first field 51," has been selected. As shown in Figure 9, if a portion of the search results displayed in the first field 51 has been selected by the user and button 62 ("Similarity Search with Selected Phrase" button) has been pressed again (step S430: YES and step S400: button 62), the query acquisition unit 12 acquires the phrase acquired by the user from the search results as a query (step S404), and outputs the acquired query to the second field 52 (step S405). Then, the search unit 14 searches for sentences similar to the query from the search target saved as the source text 21 based on the similarity between the multiple sentences included in the search target saved as the source text 21 and the string obtained as the query (step S402), and outputs the search results to the first field 51 (step S403). Figure 10 is a diagram showing how the search results are displayed in the first field 51 of the screen and the query is displayed in the second field 52 in Embodiment 1. In the example in Figure 10, the search results are displayed by sorting the multiple sentences included in the search target in descending order of similarity to the string "Output search results to the first field 51" selected in Figure 9.
[0051] Also here, after the second step S403, it is assumed that the user performs a regular expression search. FIG. 11 is a diagram showing a state in which a part of the search results output to the first field 51 by the user in Embodiment 1 is selected. In the example of FIG. 11, the string "Output the original text 21 to the first field 51" is selected. As shown in FIG. 11, when a part of the search results displayed in the first field 51 by the user is selected and the button 81 ("Regular expression conversion" button) is pressed (step S430: YES and step S400: button 81), the conversion unit 13 converts the string selected by the user into a regular expression and obtains the string converted into a regular expression as a query. Thereby, the conversion unit 13 obtains a query including a regular expression (step S421). Further, the conversion unit 13 outputs the query including the regular expression to the second field 52 (step S422). FIG. 12 is a diagram showing a state in which a query is displayed in the second field 52 of the screen in Embodiment 1. In the example of FIG. 12, "Original text 21", "First", and "Output" included in the string "Output the original text 21 to the first field 51" selected in FIG. 11 are converted into regular expressions ([one - yue]) indicating Chinese characters. "Field" is converted into a regular expression ([a - nv]) indicating katakana. "51" is converted into a regular expression ("0 - 9") indicating a number. Note that a symbol "+" for connecting these is supplemented between each regular expression and hiragana.
[0052] When the button 82 (“search by regular expression” button) is pressed (step S400: button 82), the search unit 14 searches for sentences that match the query including the regular expression from the search target stored as the original text 21 (step S423), and outputs the search results to the first field 51 (step 424). FIG. 13 is a diagram showing a state where the search results are displayed in the first field 51 of the screen and the query is displayed in the second field 52 in the first embodiment. In the example of FIG. 13, the string “output the search results to the first field 51” that matches the query “[一-鉞]+を[一-鉞]+[ァ-ンヴー]+「0-9」+に[一-鉞]+する” shown in FIG. 12 is selected and highlighted as the location corresponding to the search.
[0053] Finally, when the button 93 (“save search results” button) is pressed by the user, the result storage unit 16 saves the search results to an external file (step S5).
[0054] As described above, according to the document search device 2 of the first embodiment, sentences similar to the query are searched from the search target based on the similarity between a plurality of sentences included in the search target and a character string composed of a plurality of words selected by the user as the query. Therefore, sentences similar to the character string composed of a plurality of words specified as the query can be accurately searched from the document to be searched.
[0055] For example, when the patent specification is the document to be searched, by selecting the gist of the invention described in the claims as the query and performing a similarity search, the user can discover expressions similar to the gist of the invention described in the detailed description of the invention. Thereby, when creating or translating a patent specification, etc., the consistency of similar expressions described in the patent specification can be ensured in units of character strings having a certain length, such as sentences. Also, it is possible to easily confirm whether the support requirements defined by the Patent Law are satisfied.
[0056] Furthermore, by combining multiple patent specifications into a single document and making it the searchable document, it becomes possible to ensure consistency in wording across multiple patent specifications, and to check how certain content is expressed in the patent specifications, which can then be used as a reference when drafting the specifications.
[0057] Furthermore, by using documents cited in rejection notices and other similar documents as searchable documents, and performing a similarity search using the characteristics of those documents described in the rejection notice as queries, users can easily find the cited sections in those documents and understand the surrounding context.
[0058] Furthermore, according to Embodiment 1, the string selected by the user is obtained as a query from the string displayed in the first field 51. Therefore, the user does not have to take the trouble to enter the string to be used as a query.
[0059] Furthermore, the document search device 2 of Embodiment 1 displays the search results in the first field 51 where the search target is displayed. Therefore, there is no need to provide a dedicated field on screen G for displaying the search results, resulting in excellent space efficiency. In addition, both the similarity search based on the string obtained from the search target saved as the source text 21 and the similarity search based on the string obtained from the search results are queries obtained from the string displayed in the first field 51. Therefore, while maintaining space efficiency, the work efficiency is improved when performing similarity searches with different query origins consecutively. The document search device 2 may also be configured to provide a dedicated field on screen G for displaying the search results, and display the search results in the dedicated field where the search target is displayed.
[0060] Furthermore, according to the document search device 2 of Embodiment 1, by obtaining the selected string from the search results displayed in the first field 51 as a query, it is possible to efficiently search for sentences related to the expression.
[0061] Furthermore, according to the document search device 2 of Embodiment 1, the search results are displayed on the screen in order of the degree of similarity of multiple sentences included in the search target. Therefore, the user can check the sentences included in the search target in order of the likelihood of them being similar to the string specified in the query. In addition, the user can comprehensively check sentences other than the sentence determined to have the highest degree of similarity among the sentences included in the search target.
[0062] Furthermore, according to the document search device 2 of Embodiment 1, the queries used for the search are recorded as a query log 22. Therefore, the user can check the content of past searches.
[0063] Furthermore, according to the document search device 2 of Embodiment 1, searches are performed based on multiple queries obtained from the query description file 23. This eliminates the need to select a string to be specified as a query from the first field 51 each time, thus improving the convenience of document searching. In addition, if the document to be searched is a patent document cited in a notice of reasons for rejection, etc., the words cited in the notice of reasons for rejection, etc. can be copied to the query description file 23, allowing for the confirmation of descriptions related to the words cited in the notice of reasons for rejection, etc., within the patent document cited in the notice of reasons for rejection, etc.
[0064] Furthermore, if the query log 22 is specified as the query description file 23, the search results from previous similarity searches performed with the document search software are saved in the result file 24 for each query. Therefore, as long as the user saves the query log 22, they can easily obtain the search results without having to save the result file 24 which records the search results from previous similarity searches performed with the document search software.
[0065] Furthermore, the document search device 2 of Embodiment 1 can perform regular expression searches. Therefore, in addition to document searches based on the similarity between the sentences included in the search target and the string selected by the user as a query, it is also possible to perform document searches from the perspective of the similarity of the grammatical structure between sentences.
[0066] Furthermore, according to the document search device 2 of Embodiment 1, by performing a normal search using a selected string from the similarity search results displayed in the first field 51 as a query, it is possible to move to the position in the original text where the string specifically appears. This makes it easy to find out the specific location of the string in the original text and the surrounding context.
[0067] The above describes the embodiments of the present disclosure, but the present disclosure is not limited to the configuration of the embodiments described above, and various modifications are possible within the scope of its technical concept. For example, the document search device 2 may not be a PC terminal, but a server or the like that can communicate with a PC terminal. In this case, for example, the document search system 1 is configured in a so-called server-client manner. The document search device 2, as a server, receives user operations from an input device 3 connected to a PC terminal and displays a screen G on a display device 4 connected to the PC terminal.
[0068] Furthermore, the embodiment described a case in which the search results are output by sorting the search target sentences saved as the original text 21 in descending order of similarity. However, the search results may also be output by paragraph rather than sentence by sentence. In other words, each sentence output as a search result is output without being extracted from a paragraph. In this case, the search results may be output after editing such as changing the color or underlining so that the sentences in the paragraph for which similarity has been determined are clearly indicated. The search target is divided into paragraphs by, for example, one or a specified number of line breaks. Also, if the search target document is a patent specification, paragraphs may be composed of paragraph numbers enclosed in black brackets. By outputting the search results by paragraph rather than sentence by sentence, the user can check in what context sentences for which similarity has been determined are used within the paragraph. However, when outputting the search results sentence by sentence, the paragraph number may also be displayed.
[0069] Furthermore, although the embodiment described a case where a similarity score is included when displaying search results, the display of the similarity score may be omitted.
[0070] Furthermore, the embodiment described a case where all searched sentences are sorted in descending order of similarity and output as search results. However, it is also possible to output only a subset of sentences with high similarity as search results. In this case, for example, only sentences with a similarity score higher than a predetermined or user-defined threshold may be output. Alternatively, only sentences with a similarity rank higher than a predetermined or user-defined rank may be output.
[0071] Furthermore, although the embodiment was described assuming that the query in the similarity search is a string consisting of multiple words, it is also possible to specify a single word as the query in the similarity search.
[0072] Furthermore, in this embodiment, the queries used for similarity searches were recorded in the query log 22, but the queries for normal searches or regular expression searches may also be recorded in the query log 22.
[0073] Furthermore, the source text processing unit 15 may perform data processing when saving the search target document copied to the clipboard as the source text 21. Examples of data processing include translating the search target document or adding specific strings (e.g., HTML tags). [Explanation of symbols]
[0074] 1 Document search system, 2 Document search device, 3 Input device, 4 Display device, 5 Control unit, 6 Storage unit, 11 Interface display unit, 12 Query acquisition unit, 13 Conversion unit, 14 Search unit, 15 Original text processing unit, 16 Result storage unit, 17 Query log operation unit, 21 Original text, 22 Query log, 23 Query description file, 24 Result file, 41 Processor, 42 Memory, 43 Bus, 51 First field, 52 Second field, 53 Third field, 61 Button, 62 Button, 63 Button, 71 Button, 72 Button, 81 Button, 82 Button, 91 Button, 92 Button, 93 Button, 94 Check box, 101 Button, 102 Button.
Claims
1. An interface display unit that displays a screen on a display device that includes a first field displaying search targets containing multiple sentences, Memory unit and, A source text processing unit that stores the source text specified by the user in the storage unit and outputs the source text as the search target to the first field, A query acquisition unit that acquires a string consisting of multiple words included in the search target displayed in the first field, and which is selected by the user in the first field, as a query; The system includes a search unit that searches for sentences similar to the query from the source text based on the similarity between multiple sentences contained in the source text and the query, and outputs the search results to the first field, The query acquisition unit acquires the string selected by the user in the first field from the search results output to the first field after the search unit has performed the search, as the query. The search unit, after the query acquisition unit has acquired the string included in the search results as the query, searches the original text for sentences similar to the query based on the similarity between the multiple sentences included in the original text and the query acquired from the string included in the search results, and outputs the search results to the first field. Document search device.
2. The search unit records the queries used in the search as a query log. The document retrieval device according to claim 1.
3. The query acquisition unit reads a query description file containing multiple strings, and acquires the multiple strings as multiple queries. The search unit performs repeated searches based on the multiple queries obtained by the query acquisition unit. The document retrieval device according to claim 1 or 2.
4. It has a result storage unit that outputs multiple result files as a result of repeated searches. Each of the multiple result files has a filename that contains each of the multiple strings used as the multiple queries. The document retrieval device according to claim 3.
5. The search unit sorts the multiple sentences contained in the original text in descending order of similarity and outputs the results as the search results to the screen. The document retrieval device according to claim 1 or 2.
6. The system includes a conversion unit that removes hiragana and punctuation from the string selected by the user, replaces each consecutive block of the same character type with a regular expression representing that character type, thereby converting a portion of the string selected by the user into a formal expression for pattern matching, and obtains a query that includes the formal expression for pattern matching. The search unit searches the source text for strings that match the query, which includes the formal expression for performing the pattern matching. The document retrieval device according to claim 1 or 2.
Citation Information
Patent Citations
Generating method, browsing method, generating device and browsing device for specification description
JP2002149704A
Document retrieval method and apparatus, and computer program therefor
JP2008287394A