JP2008146209A - Document retrieval device, document retrieval method and document retrieval program - Google Patents

Document retrieval device, document retrieval method and document retrieval program Download PDF

Info

Publication number
JP2008146209A
JP2008146209A JP2006330571A JP2006330571A JP2008146209A JP 2008146209 A JP2008146209 A JP 2008146209A JP 2006330571 A JP2006330571 A JP 2006330571A JP 2006330571 A JP2006330571 A JP 2006330571A JP 2008146209 A JP2008146209 A JP 2008146209A
Authority
JP
Japan
Prior art keywords
node
search
score
document
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006330571A
Other languages
Japanese (ja)
Inventor
Hiroki Tanioka
広樹 谷岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JustSystems Corp
Original Assignee
JustSystems Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by JustSystems Corp filed Critical JustSystems Corp
Priority to JP2006330571A priority Critical patent/JP2008146209A/en
Publication of JP2008146209A publication Critical patent/JP2008146209A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To improve usability and retrieval accuracy in document retrieval processing. <P>SOLUTION: An acquisition part 201 acquires an XML document. A generation part 202 generates a node list from the XML document. An input part 203 receives input of a retrieval condition. A calculation part 204 calculates a score showing matching degree of the retrieval condition for each node shown in the node list. A decision part 205 decides whether each the node shown in the node list satisfies a prescribed matching condition or not. An addition part 206 adds the score of the node decided that the node satisfies the prescribed matching condition by the decision part 205 to the score of a parent node to which the node belongs. A determination part 207 determines the node having the high matching degree of the retrieval condition as a retrieval result from the nodes shown in the node list based on the score added by the addition part 206 and the score calculated by the calculation part 204. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

この発明は、階層構造化された文書セットから、自然文により入力された検索条件に合致するノードを検索する文書検索装置、文書検索方法および文書検索プログラムに関する。   The present invention relates to a document search apparatus, a document search method, and a document search program for searching a node that matches a search condition input by a natural sentence from a hierarchically structured document set.

従来より、一連の文書を、章や節などの適切な単位の部分文書に分割し、階層構造化することによって、出版の多様性、情報検索の的確性、分割/結合の容易性など、多くのメリットを得ることができるものとされている。たとえば、階層構造化された文書の代表的なものとしては、XML文書が挙げられる。このXML文書は、タグによって文書要素や文書テキストがマークアップされている。このため、要素ノードおよびテキストノードによって構成される木構造でモデル化することができる。これにより、ノード単位での部分文書の検索をおこなうことができる。   Conventionally, by dividing a series of documents into sub-documents of appropriate units such as chapters and sections and making them into a hierarchical structure, there are many publishing diversity, accuracy of information retrieval, ease of division / combination, etc. It is supposed that the merit of can be obtained. For example, an XML document is a typical example of a hierarchically structured document. In the XML document, document elements and document text are marked up by tags. Therefore, it is possible to model with a tree structure composed of element nodes and text nodes. As a result, it is possible to search for partial documents in node units.

XML文書に対する部分文書の検索処理に用いられる検索方法の一般的なものとして、指定された検索文字列を含む最小単位の部分文書をXML文書の中から全て検索する方法が挙げられる(たとえば、下記特許文献1参照。)。   As a general search method used for a partial document search process for an XML document, there is a method for searching all partial documents in a minimum unit including a specified search character string from XML documents (for example, (See Patent Document 1).

特開平11−306205号公報JP-A-11-306205

しかしながら、上記特許文献1に記載の従来技術にあっては、検索文字列を含む複数の最小単位の部分文書が同一の部分文書に含まれている場合であっても、複数の最小単位の部分文書が断片的に検索されてしまう。たとえば、文書が、章、節、項、文ごとに分割されていた場合、検索文字列を含む文単位の部分文書が断片的に検索されてしまう。このような場合、ユーザにとっては、複数の最小単位の部分文書を包括する単位(たとえば、章や節など)の部分文書が検索結果として検索されることが望ましいものである。   However, in the conventional technique described in Patent Document 1, a plurality of minimum unit parts are included even when a plurality of minimum unit partial documents including a search character string are included in the same partial document. Documents are searched in pieces. For example, when a document is divided into chapters, sections, terms, and sentences, partial documents in units of sentences including a search character string are searched in fragments. In such a case, it is desirable for the user to search as a search result a partial document of a unit (for example, a chapter or a section) that includes a plurality of partial documents of the minimum unit.

このような問題に対応すべく、検索文字列を含む最小単位(たとえば、文)の部分文書を全て検索するだけでなく、検索文字列に関連する様々な単位(たとえば、章、節、項など)の部分文書も全て検索する方法が考案されているが、この場合、検索された部分文書の中には、検索文字列との関連性が低く、ユーザが意図したものとはかけ離れている部分文書も多く含まれる。   In order to deal with such problems, not only all partial documents of the minimum unit (for example, sentence) including the search string are searched, but also various units (for example, chapters, sections, terms, etc.) related to the search string ) Has also been devised, but in this case, some of the searched partial documents have a low relevance to the search character string and are far from what the user intended. Many documents are included.

また、上記特許文献1に記載の従来技術にあっては、関連性の強弱を考慮した検索処理をおこなっていないため、より検索文字列との関連性の強い部分文書のみを検索することや、検索された部分文書を検索文字列との関連性の強弱に応じた順序で表示することができない。   Further, in the prior art described in the above-mentioned Patent Document 1, since the search processing considering the strength of relevance is not performed, it is possible to search only a partial document having a stronger relevance to the search character string, The retrieved partial documents cannot be displayed in the order corresponding to the strength of the relationship with the search character string.

このように、上述した従来技術においては、適切な単位および数の部分文書を検索することができないだけでなく、検索された部分文書を適切な順序で表示することができないといった問題が生じていた。   As described above, in the above-described conventional technology, there is a problem that not only the partial documents of an appropriate unit and number cannot be searched but also the searched partial documents cannot be displayed in an appropriate order. .

この発明は、上述した従来技術による問題点を解消するため、適切な単位および数の部分文書を検索したうえ、検索された部分文書を適切な順序で表示することによって、文書検索処理における検索精度およびユーザビリティの向上を図ることができる文書検索装置、文書検索方法および文書検索プログラムを提供することを目的とする。   In order to solve the above-described problems caused by the prior art, the present invention retrieves partial documents of an appropriate unit and number, and displays the retrieved partial documents in an appropriate order. It is another object of the present invention to provide a document search apparatus, a document search method, and a document search program capable of improving usability.

上述した課題を解決し、目的を達成するため、この発明にかかる文書検索装置は、階層構造化された文書セットから、自然文により入力された検索条件に合致するノードを検索する文書検索装置であって、前記文書セットを取得する取得手段と、前記取得手段によって取得された文書セットからノードリストを生成する生成手段と、前記検索条件の入力を受け付ける入力手段と、前記生成手段によって生成されたノードリストに示されているノードごとに、前記入力手段によって入力された検索条件に基づいた、前記検索条件の合致度を示すスコアを算出する算出手段と、前記生成手段によって生成されたノードリストに示されているノードごとに、所定の適合条件を満たすか否かを判断する判断手段と、前記判断手段によって所定の適合条件を満たすと判断されたノードのスコアを、当該ノードが属する親ノードのスコアに加算する加算手段と、前記加算手段によって加算されたスコアと、前記算出手段によって算出されたスコアと、に基づいて、前記生成手段によって生成されたノードリストの中から、前記検索条件の合致度が高いノードを検索結果として決定する決定手段と、を備えたことを特徴とする。   In order to solve the above-described problems and achieve the object, a document search apparatus according to the present invention is a document search apparatus that searches a hierarchically-structured document set for a node that matches a search condition input by a natural sentence. An acquisition unit for acquiring the document set, a generation unit for generating a node list from the document set acquired by the acquisition unit, an input unit for receiving input of the search condition, and the generation unit For each node indicated in the node list, a calculation means for calculating a score indicating the degree of match of the search condition based on the search condition input by the input means, and a node list generated by the generation means A determination means for determining whether or not a predetermined conformity condition is satisfied for each indicated node; and a predetermined conformance condition by the determination means. Based on the addition means for adding the score of the node determined to satisfy the score of the parent node to which the node belongs, the score added by the addition means, and the score calculated by the calculation means, And determining means for determining, as a search result, a node having a high degree of matching with the search condition from the node list generated by the generating means.

この発明によれば、文書検索処理において、テキストノードを持つノードが所定の適合条件を満たしている場合、このノードが属する親ノードを、検索条件の合致度が高いノードとして扱うことができる。   According to the present invention, in a document search process, when a node having a text node satisfies a predetermined matching condition, the parent node to which this node belongs can be handled as a node having a high matching degree of the search condition.

また、この発明にかかる文書検索装置は、上記に記載の発明において、前記決定手段によって検索結果として決定されたノードを、前記検索条件の合致度が高い順に表示されるよう出力を制御する出力制御手段をさらに備えたことを特長とする   In the document search device according to the present invention, in the above-described invention, output control for controlling output so that nodes determined as search results by the determination unit are displayed in descending order of matching degree of the search conditions. Characterized by further providing means

この発明によれば、文書セットの中から検索された検索条件の合致度が高いノードを、適切な順序で表示されるよう出力を制御することができる。   According to the present invention, it is possible to control output so that nodes having a high degree of matching of search conditions searched from a document set are displayed in an appropriate order.

また、この発明にかかる文書検索装置は、上記に記載の発明において、前記決定手段は、前記加算手段によって加算されたスコアと、前記算出手段によって算出されたスコアと、に基づいて、前記生成手段によって生成されたノードリストを、前記検索条件の合致度が高い順にソートし、ソートされたノードリストの中から、上位から所定数のノードを検索結果として決定することを特徴とする。   In the document search device according to the present invention as set forth in the invention described above, the determining means is configured to generate the generating means based on the score added by the adding means and the score calculated by the calculating means. The node list generated by the above is sorted in descending order of matching degree of the search condition, and a predetermined number of nodes are determined as search results from the top of the sorted node list.

この発明によれば、検索条件の合致度がより高いノードを、必要な数だけ文書セットの中から検索することができる。   According to the present invention, a necessary number of nodes having a higher matching degree of search conditions can be searched from the document set.

また、この発明にかかる文書検索装置は、上記に記載の発明において、前記算出手段は、TF−IDF法を用いて、前記生成手段によって生成されたノードリストに示されているノードごとに、前記入力手段によって入力された検索条件に基づいた、検索条件の合致度を示すスコアを算出することを特徴とする。   Further, in the document search device according to the present invention, in the invention described above, the calculation means uses the TF-IDF method for each node indicated in the node list generated by the generation means. A score indicating the degree of match of the search condition is calculated based on the search condition input by the input means.

この発明によれば、文書検索処理において、TF−IDF法を用いてスコアを算出することにより、単に検索条件に含まれるキーワードが多く出現するノードではなく、そのキーワードをノードの特徴的なものとするノードを、検索条件の合致度が高いノードとして扱うことができる。   According to the present invention, in the document search process, by calculating the score using the TF-IDF method, the keyword is not simply a node in which many keywords included in the search condition appear, but the keyword is characterized by the node. Can be handled as a node having a high degree of matching with the search condition.

また、この発明にかかる文書検索方法は、階層構造化された文書セットから、自然文により入力された検索条件に合致するノードを検索する文書検索方法であって、前記文書セットを取得する取得工程と、前記取得工程によって取得された文書セットからノードリストを生成する生成工程と、前記検索条件の入力を受け付ける入力工程と、前記生成工程によって生成されたノードリストに示されているノードごとに、前記入力工程によって入力された検索条件に基づいた、前記検索条件の合致度を示すスコアを算出する算出工程と、前記生成工程によって生成されたノードリストに示されているノードごとに、所定の適合条件を満たすか否かを判断する判断工程と、前記判断工程によって所定の適合条件を満たすと判断されたノードのスコアを、当該ノードが属する親ノードのスコアに加算する加算工程と、前記加算工程によって加算されたスコアと、前記算出工程によって算出されたスコアと、に基づいて、前記生成工程によって生成されたノードリストの中から、前記検索条件の合致度が高いノードを検索結果として決定する決定工程と、をコンピュータに実行させることを特徴とする。   The document search method according to the present invention is a document search method for searching a node that matches a search condition input by a natural sentence from a hierarchically structured document set, and acquiring the document set And a generation step of generating a node list from the document set acquired by the acquisition step, an input step of receiving input of the search condition, and for each node indicated in the node list generated by the generation step, Based on the search condition input in the input step, a calculation step for calculating a score indicating the degree of match of the search condition, and a predetermined match for each node indicated in the node list generated by the generation step A determination step for determining whether or not a condition is satisfied, and a score of a node determined to satisfy a predetermined conformity condition by the determination step The node list generated by the generation step based on the addition step of adding to the score of the parent node to which the node belongs, the score added by the addition step, and the score calculated by the calculation step A determination step of determining, as a search result, a node having a high degree of matching with the search condition is executed by a computer.

この発明によれば、文書検索処理において、テキストノードを持つノードが所定の適合条件を満たしている場合、このノードが属する親ノードを、検索条件の合致度が高いノードとしてコンピュータに扱わせることができる。   According to the present invention, in a document search process, when a node having a text node satisfies a predetermined matching condition, the parent node to which this node belongs can be handled by the computer as a node having a high matching degree of the search condition. it can.

また、この発明にかかる文書検索プログラムは、階層構造化された文書セットか、自然文により入力された検索条件に合致するノードを検索する文書検索プログラムであって、前記文書セットを取得する取得工程と、前記取得工程によって取得された文書セットからノードリストを生成する生成工程と、前記検索条件の入力を受け付ける入力工程と、前記生成工程によって生成されたノードリストに示されているノードごとに、前記入力工程によって入力された検索条件に基づいた、前記検索条件の合致度を示すスコアを算出する算出工程と、前記生成工程によって生成されたノードリストに示されているノードごとに、所定の適合条件を満たすか否かを判断する判断工程と、前記判断工程によって所定の適合条件を満たすと判断されたノードのスコアを、当該ノードが属する親ノードのスコアに加算する加算工程と、前記加算工程によって加算されたスコアと、前記算出工程によって算出されたスコアと、に基づいて、前記生成工程によって生成されたノードリストの中から、前記検索条件の合致度が高いノードを検索結果として決定する決定工程と、をコンピュータに実行させることを特徴とする。   The document search program according to the present invention is a document search program for searching a hierarchically-structured document set or a node that matches a search condition input by a natural sentence, and acquiring the document set And a generation step of generating a node list from the document set acquired by the acquisition step, an input step of receiving input of the search condition, and for each node indicated in the node list generated by the generation step, Based on the search condition input in the input step, a calculation step for calculating a score indicating the degree of match of the search condition, and a predetermined match for each node indicated in the node list generated by the generation step A determination step for determining whether or not a condition is satisfied, and a no determination that the predetermined determination condition is satisfied by the determination step. Is generated by the generating step based on the addition step of adding the score of the parent node to the score of the parent node to which the node belongs, the score added by the adding step, and the score calculated by the calculating step A determination step of determining, as a search result, a node having a high degree of matching with the search condition from the node list is executed by a computer.

この発明によれば、文書検索処理において、テキストノードを持つノードが所定の適合条件を満たしている場合、このノードが属する親ノードを、検索条件の合致度が高いノードとしてコンピュータに扱わせることができる。   According to the present invention, in a document search process, when a node having a text node satisfies a predetermined matching condition, the parent node to which this node belongs can be handled by the computer as a node having a high matching degree of the search condition. it can.

本発明にかかる文書検索装置、文書検索方法および文書検索プログラムによれば、適切な単位および数の部分文書を検索したうえ、検索された部分文書を適切な順序で表示することによって、文書検索処理における検索精度およびユーザビリティの向上を図ることができるという効果を奏する。   According to the document search device, the document search method, and the document search program according to the present invention, the document search processing is performed by searching for the appropriate unit and number of partial documents and displaying the searched partial documents in an appropriate order. It is possible to improve search accuracy and usability.

以下に添付図面を参照して、この発明にかかる文書検索装置、文書検索方法および文書検索プログラムの好適な実施の形態を、階層構造化された文書セットの一例としてXML文書を用いて詳細に説明する。   Exemplary embodiments of a document search device, a document search method, and a document search program according to the present invention will be described below in detail with reference to the accompanying drawings using an XML document as an example of a hierarchically structured document set. To do.

(文書検索装置100のハードウェア構成)
まず、この実施の形態にかかる文書検索装置のハードウェア構成について説明する。図1は、この実施の形態にかかる文書検索装置のハードウェア構成の一例を示すブロック図である。
(Hardware configuration of document search apparatus 100)
First, the hardware configuration of the document search apparatus according to this embodiment will be described. FIG. 1 is a block diagram showing an example of a hardware configuration of the document search apparatus according to this embodiment.

図1において、文書検索装置100は、CPU(Central Processing Unit)101と、ROM(Read Only Memory)102と、RAM(Random Access Memory)103と、HDD(Hard Disc Drive)104と、HD(Hard Disc)105と、FDD(Flexible Disc Drive)106と、FD(Flexible Disc)107と、CD−RW(Compact Disc ReWritable)ドライブ108と、CD−RW109と、ディスプレイ110と、キーボード111と、マウス112と、ネットワークI/F(インタフェース)113と、通信ケーブル114と、バス120とを備えて構成されている。   In FIG. 1, a document search apparatus 100 includes a CPU (Central Processing Unit) 101, a ROM (Read Only Memory) 102, a RAM (Random Access Memory) 103, an HDD (Hard Disc Drive) 104, and an HD (Hard Disc). ) 105, FDD (Flexible Disc Drive) 106, FD (Flexible Disc) 107, CD-RW (Compact Disc ReWritable) drive 108, CD-RW 109, display 110, keyboard 111, mouse 112, A network I / F (interface) 113, a communication cable 114, and a bus 120 are provided.

CPU101は、文書検索装置100全体を制御する。ROM102は、各種制御プログラムなどを格納する。RAM103は、可変的なデータを書き換え自在に記憶し、CPU101のワークエリアとして機能する。HDD104は、CPU101の制御にしたがってHD105に対するデータのリード/ライトを制御する。HD105は、HDD104の制御にしたがって書き込まれたデータを記憶する。   The CPU 101 controls the entire document search apparatus 100. The ROM 102 stores various control programs and the like. The RAM 103 stores variable data in a rewritable manner and functions as a work area for the CPU 101. The HDD 104 controls reading / writing of data with respect to the HD 105 according to the control of the CPU 101. The HD 105 stores data written according to the control of the HDD 104.

FDD106は、CPU101の制御にしたがってFD107に対するデータのリード/ライトを制御する。FD107は、着脱自在であり、FDD106の制御にしたがって書き込まれたデータを記憶する。CD−RWドライブ108は、CPU101の制御にしたがってCD−RW(または、CD−R、CD−ROM)109に対するデータのリード/ライトを制御する。CD−RW109は、着脱自在であり、CD−RWドライブ108の制御にしたがって書き込まれたデータを記憶する。   The FDD 106 controls reading / writing of data with respect to the FD 107 according to the control of the CPU 101. The FD 107 is detachable and stores data written according to the control of the FDD 106. The CD-RW drive 108 controls reading / writing of data with respect to the CD-RW (or CD-R, CD-ROM) 109 according to the control of the CPU 101. The CD-RW 109 is detachable and stores data written according to the control of the CD-RW drive 108.

ディスプレイ110は、カーソル、メニュー、ウィンドウ、あるいは文字や画像などの各種データを表示する。キーボード111は、文字、数値、各種指示などの入力のための複数のキーを備える。マウス112は、各種指示の選択や実行、処理対象の選択、マウスポインタの移動などを行う。ネットワークI/F113は、通信ケーブル114を介してLAN、WAN、インターネットなどのネットワークに接続され、当該ネットワークとCPU101とのインタフェースとして機能する。バス120は上記各部を接続する。   The display 110 displays a cursor, a menu, a window, or various data such as characters and images. The keyboard 111 includes a plurality of keys for inputting characters, numerical values, various instructions, and the like. The mouse 112 selects and executes various instructions, selects a processing target, moves a mouse pointer, and the like. A network I / F 113 is connected to a network such as a LAN, WAN, or the Internet via a communication cable 114, and functions as an interface between the network and the CPU 101. A bus 120 connects the above-described units.

(文書検索装置100の機能的構成)
つぎに、この実施の形態にかかる文書検索装置100の機能的構成について説明する。図2は、この実施の形態にかかる文書検索装置100の機能的構成を示すブロック図である。
(Functional configuration of document search apparatus 100)
Next, a functional configuration of the document search apparatus 100 according to this embodiment will be described. FIG. 2 is a block diagram showing a functional configuration of the document search apparatus 100 according to this embodiment.

図2に示すように、文書検索装置100は、取得部201と、生成部202と、入力部203と、算出部204と、判断部205と、加算部206と、決定部207と、出力制御部208と、表示部209と、を備えて構成されている。   As shown in FIG. 2, the document search apparatus 100 includes an acquisition unit 201, a generation unit 202, an input unit 203, a calculation unit 204, a determination unit 205, an addition unit 206, a determination unit 207, and output control. A unit 208 and a display unit 209 are provided.

取得部201は、XML文書を取得する。たとえば取得部201は、ユーザによって指定されたXML文書ファイルを読み取ることによってXML文書を取得する。この場合、XML文書ファイルは、文書検索装置100内部に記憶されているものに限らず、たとえば、文書検索装置100と接続された他の装置に記憶されているものであってもよい。取得部201は、具体的には、たとえば図1に示したROM102、RAM103、HD105、FD107に記憶されたプログラムをCPU101が実行することによってその機能を実現する。   The acquisition unit 201 acquires an XML document. For example, the acquisition unit 201 acquires an XML document by reading an XML document file designated by the user. In this case, the XML document file is not limited to the one stored in the document search device 100, and may be stored in another device connected to the document search device 100, for example. Specifically, the acquisition unit 201 realizes its function by the CPU 101 executing a program stored in the ROM 102, RAM 103, HD 105, and FD 107 shown in FIG.

生成部202は、取得部201によって取得されたXML文書からノードリストを生成する。ここでいうノードリストとは、木構造にモデル化されたXML文書に基づいてXML文書内に存在する全ての要素ノードをリスト化したものであり、各要素ノードごとに、たとえば、インデックス、パスなどの情報を含む。また、要素ノードにテキストノードが属している場合は、そのテキストノードの、インデックス、テキストなどの情報が関連付けられる。生成部202によって生成されたノードリストは、たとえば各ノードのパスが示されたリスト形式でメモリ上に一時的に記憶される。   The generation unit 202 generates a node list from the XML document acquired by the acquisition unit 201. The node list here is a list of all element nodes existing in the XML document based on the XML document modeled in a tree structure. For example, for each element node, an index, a path, etc. Contains information. When a text node belongs to an element node, information such as an index and text of the text node is associated. The node list generated by the generation unit 202 is temporarily stored in the memory in a list format in which the path of each node is shown, for example.

なお、生成部202は、XML文書に存在する全てのノードに関するノードリストを生成するだけでなく、所定の範囲内のノードに関するノードリストや、ユーザによって指定された範囲内のノードに関するノードリストを生成するようにしてもよい。また、ノードリストの具体的な生成手順については、図4を用いて後述する。生成部202は、具体的には、たとえば図1に示したROM102、RAM103、HD105、FD107に記憶されたプログラムをCPU101が実行することによってその機能を実現する。   The generation unit 202 not only generates a node list for all nodes existing in the XML document, but also generates a node list for nodes within a predetermined range and a node list for nodes within a range specified by the user. You may make it do. A specific procedure for generating the node list will be described later with reference to FIG. Specifically, the generation unit 202 realizes its function by the CPU 101 executing programs stored in the ROM 102, RAM 103, HD 105, and FD 107 shown in FIG.

入力部203は、検索条件(検索クエリ文)の入力を受け付ける。たとえば、検索条件は「J社 I太郎」や「(J社 I太郎)」のように入力され、前者は、「J社」および「I太郎」の両方を含む、を意味し、後者は、「J社」または「I太郎」のいずれかを含む、を意味する。ここで、検索条件は、ユーザが文書検索装置100に直接入力したものに限らず、たとえば、文書検索装置100と接続された他の装置から送信されたものであってもよい。入力部203は、具体的には、たとえば図1に示したキーボード111、マウス112、ネットワークI/F113などによってその機能を実現する。   The input unit 203 receives an input of a search condition (search query sentence). For example, the search condition is input as “J company I Taro” or “(J company I Taro)”, the former means that both “J company” and “I Taro” are included, and the latter is It means that either “Company J” or “I Taro” is included. Here, the search conditions are not limited to those directly input to the document search apparatus 100 by the user, but may be those transmitted from other apparatuses connected to the document search apparatus 100, for example. Specifically, the input unit 203 realizes its function by, for example, the keyboard 111, the mouse 112, the network I / F 113, and the like shown in FIG.

算出部204は、生成部202によって生成されたノードリストに示されているノードごとに、入力部203によって入力された検索条件に基づいた、検索条件の合致度を示すスコアを算出する。スコア(TF−IDF)は、以下算出式(1)により求めることができる。   The calculation unit 204 calculates a score indicating the matching degree of the search condition based on the search condition input by the input unit 203 for each node indicated in the node list generated by the generation unit 202. The score (TF-IDF) can be obtained by the following calculation formula (1).

TFIDF=TF×log(N/DF)・・・(1)   TFIDF = TF × log (N / DF) (1)

上記算出式(1)において、TFは、テキストノード内における検索文字列の出現数を示す。また、Nは、全テキストノード数を示す。そして、DFは、検索文字列を含むテキストノード数を示す。   In the calculation formula (1), TF indicates the number of appearances of the search character string in the text node. N indicates the total number of text nodes. DF indicates the number of text nodes including the search character string.

なお、本実施の形態においては、TF−IDF法を用いてスコアを算出しているが、これに限らず、他の方法を用いて、スコアを算出するようにしてもよい。算出部204は、具体的には、たとえば図1に示したROM102、RAM103、HD105、FD107に記憶されたプログラムをCPU101が実行することによってその機能を実現する。   In the present embodiment, the score is calculated using the TF-IDF method. However, the present invention is not limited to this, and the score may be calculated using another method. Specifically, the calculation unit 204 realizes its function when the CPU 101 executes programs stored in the ROM 102, the RAM 103, the HD 105, and the FD 107 shown in FIG.

判断部205は、生成部202によって生成されたノードリストに示されているノードごとに、算出部204によって算出されたスコアに基づいて、所定の適合条件を満たすか否かを判断する。適合条件としては、たとえば、「スコアが所定以上または所定値未満の場合であるか否か」、「他の同位ノードのスコアとの合計スコアは所定値以上となるか否か」、「他の同位ノードとの合計ノード数が所定値以下か否か」、などが挙げられるが、これに限らず、他の適合条件を用いてもよい。また、適合条件は、あらかじめ設定されているものであってもよく、ユーザによって指定されたものであってもよい。判断部205は、具体的には、たとえば図1に示したROM102、RAM103、HD105、FD107に記憶されたプログラムをCPU101が実行することによってその機能を実現する。   The determination unit 205 determines whether a predetermined matching condition is satisfied based on the score calculated by the calculation unit 204 for each node indicated in the node list generated by the generation unit 202. Examples of the matching conditions include “whether the score is greater than or equal to a predetermined value or less than a predetermined value”, “whether the total score with the scores of other peer nodes is equal to or greater than a predetermined value”, “other Whether or not the total number of nodes with the peer node is equal to or less than a predetermined value ”is not limited to this, but other matching conditions may be used. In addition, the matching condition may be set in advance or may be specified by the user. Specifically, the determination unit 205 realizes its function when the CPU 101 executes a program stored in the ROM 102, the RAM 103, the HD 105, and the FD 107 shown in FIG.

加算部206は、判断部205によって所定の適合条件を満たすと判断されたノードのスコアを、このノードが属する親ノードのスコアに加算する。たとえば、所定の適合条件を満たすと判断されたノード「A/B/D」のスコアが「5」であり、このノードが属する親ノード「A/B」のスコアが「5」であった場合、加算部206による加算処理によって、ノード「A/B」のスコアのスコアは「10」となる。加算部206は、上記加算処理を、根ノード(すなわち、階層の深いノード)からルートノードに向かって、順に、生成部202によって生成されたノードリストに示されている全てのノードについておこなう。加算部206は、具体的には、たとえば図1に示したROM102、RAM103、HD105、FD107に記憶されたプログラムをCPU101が実行することによってその機能を実現する。   The adding unit 206 adds the score of the node determined by the determining unit 205 as satisfying a predetermined matching condition to the score of the parent node to which this node belongs. For example, when the score of the node “A / B / D” determined to satisfy the predetermined conformity condition is “5” and the score of the parent node “A / B” to which this node belongs is “5” The score of the node “A / B” becomes “10” by the addition processing by the adding unit 206. The addition unit 206 performs the above addition processing on all the nodes indicated in the node list generated by the generation unit 202 in order from the root node (that is, a deep node) to the root node. Specifically, the adding unit 206 realizes its function by the CPU 101 executing a program stored in the ROM 102, the RAM 103, the HD 105, and the FD 107 shown in FIG.

決定部207は、加算部206によって加算されたスコアと、算出部204によって算出されたスコアと、に基づいて、生成部202によって生成されたノードリストを検索条件の合致度が高い順にソートし、ソートされたノードリストの中から、上位から所定数のノードを検索結果として決定する。   The determination unit 207 sorts the node list generated by the generation unit 202 based on the score added by the addition unit 206 and the score calculated by the calculation unit 204 in descending order of matching degree of the search condition, A predetermined number of nodes from the top of the sorted node list are determined as search results.

なお、決定部207によって検索結果として決定されるノードの検索数は、あらかじめ設定されているものに限らず、たとえば、ユーザによって指定されたものであってもよい。決定部207は、具体的には、たとえば図1に示したROM102、RAM103、HD105、FD107に記憶されたプログラムをCPU101が実行することによってその機能を実現する。   Note that the number of node searches determined as a search result by the determination unit 207 is not limited to that set in advance, and may be specified by the user, for example. Specifically, the determination unit 207 realizes its function by the CPU 101 executing a program stored in the ROM 102, RAM 103, HD 105, and FD 107 shown in FIG.

出力制御部208は、決定部207によって検索結果として決定されたノードが、検索条件の合致度が高い順に表示部209に表示されるよう出力を制御する。なお、出力制御部208は、決定部207によって検索結果として決定されたノードを表示するように制御するだけでなく、たとえば、ファイルに出力するように制御したり、文書検索装置100と接続された他の装置へ送信するように制御してもよい。出力制御部208は、具体的には、たとえば図1に示したROM102、RAM103、HD105、FD107に記憶されたプログラムをCPU101が実行することによってその機能を実現する。   The output control unit 208 controls the output so that the nodes determined as the search results by the determination unit 207 are displayed on the display unit 209 in descending order of matching degree of the search conditions. Note that the output control unit 208 not only controls to display the node determined as the search result by the determination unit 207, but also controls to output to a file or connected to the document search device 100, for example. You may control to transmit to another apparatus. Specifically, the output control unit 208 realizes its function when the CPU 101 executes a program stored in the ROM 102, RAM 103, HD 105, and FD 107 shown in FIG.

表示部209は、出力制御部208の制御によって、決定部207によって検索結果として決定されたノードを、検索条件の合致度が高い順に表示する。表示部209は、具体的には、たとえば図1に示したディスプレイ110によってその機能を実現する。   The display unit 209 displays the nodes determined as the search results by the determination unit 207 under the control of the output control unit 208 in descending order of the matching degree of the search conditions. Specifically, the display unit 209 realizes its function by the display 110 shown in FIG. 1, for example.

(XML文書の一例)
つぎに、この発明の実施の形態にかかる文書検索装置100に用いられるXML文書の一例について説明する。図3は、この発明の実施の形態にかかる文書検索装置100に用いられるXML文書の一例を示す説明図である。
(Example of XML document)
Next, an example of an XML document used in the document search apparatus 100 according to the embodiment of the present invention will be described. FIG. 3 is an explanatory diagram showing an example of an XML document used in the document search apparatus 100 according to the embodiment of the present invention.

図3は、木構造にモデル化されたXML文書「c:¥documents¥0123.xml」を示したものである。図3において、ノード1〜ノード11は、要素ノードを示し、各数字「1」〜「11」はインデックスを示す。また、ノードA〜Eは、テキストノードを示し、各英字「A」〜「E」はインデックスを示す。   FIG. 3 shows an XML document “c: ¥ documents ¥ 0123.xml” modeled in a tree structure. In FIG. 3, nodes 1 to 11 indicate element nodes, and numerals “1” to “11” indicate indexes. Nodes A to E indicate text nodes, and the letters “A” to “E” indicate indexes.

図3において、たとえば、要素ノード4にはテキストノードAが属している。また、テキストノードAは、テキスト「XML,scheme」を持つ。たとえば、このテキストノードAをタグを用いて示した場合、「<article><body><sec><p1>XML,scheme</p1></sec></body></article>」と示すことができる。   In FIG. 3, for example, the text node A belongs to the element node 4. The text node A has the text “XML, scheme”. For example, when this text node A is indicated using a tag, it is indicated as “<article> <body> <sec> <p1> XML, scheme </ p1> </ sec> </ body> </ article>”. be able to.

(生成部202によるノードリストの生成手順)
つぎに、生成部202によるノードリストの生成手順について説明する。図4は、生成部202によるノードリストの生成手順の一例を示すフローチャートである。
(Node list generation procedure by the generation unit 202)
Next, a node list generation procedure by the generation unit 202 will be described. FIG. 4 is a flowchart illustrating an example of a node list generation procedure by the generation unit 202.

まず、木構造にモデル化されたXML文書の中から、要素ノードを一つ選択する(ステップS401)。最初は、最上位の要素ノードを選択する。たとえば、図3に示したXML文書の場合、要素ノード1が選択される。   First, one element node is selected from an XML document modeled in a tree structure (step S401). First, the highest element node is selected. For example, in the case of the XML document shown in FIG. 3, element node 1 is selected.

つぎに、ステップS401で選択された要素ノードをノードリストに追加する(ステップS402)。ここで、ノードリストに追加される情報は、要素ノードのインデックスやパスなどである。たとえば、図3に示したXML文書における要素ノード1の場合は、インデックス「1」やパス「/article」などである。   Next, the element node selected in step S401 is added to the node list (step S402). Here, the information added to the node list includes the index and path of the element node. For example, in the case of the element node 1 in the XML document shown in FIG. 3, the index is “1”, the path is “/ article”, and the like.

つぎに、ステップS401で選択された要素ノードにテキストノードが属しているか否かを判断する(ステップS403)。たとえば、図3に示したXML文書における要素ノード1の場合は、テキストノードが属していないと判断され、要素ノード4の場合は、テキストノードが属していると判断される。   Next, it is determined whether or not a text node belongs to the element node selected in step S401 (step S403). For example, in the case of element node 1 in the XML document shown in FIG. 3, it is determined that the text node does not belong, and in the case of element node 4, it is determined that the text node belongs.

ステップS403において、テキストノードが属していると判断した場合(ステップS403:Yes)は、ステップS401で選択された要素ノードと、この要素ノードに属しているテキストノードとの関連付けをおこなって(ステップS404)、ステップS405へ進む。   If it is determined in step S403 that the text node belongs (step S403: Yes), the element node selected in step S401 is associated with the text node belonging to this element node (step S404). ), The process proceeds to step S405.

ここで、要素ノードに関連付けられる情報は、テキストノードのインデックスやテキストなどである。たとえば、図3に示したXML文書におけるテキストノードAの場合は、インデックス「A」やテキスト「XML,scheme」などである。一方、ステップS403において、テキストノードが属していないと判断した場合(ステップS403:No)は、ステップS404を飛ばして、ステップS405へ進む。   Here, the information associated with the element node is a text node index or text. For example, in the case of the text node A in the XML document shown in FIG. 3, the index “A”, the text “XML, scheme”, and the like. On the other hand, if it is determined in step S403 that the text node does not belong (step S403: No), step S404 is skipped and the process proceeds to step S405.

つぎに、XML文書に含まれる全ての要素ノードが選択されたか否かを判断する(ステップS405)。ステップS405において、全ての要素ノードが選択されたと判断した場合(ステップS405:Yes)は、一連の処理を終了する。一方、ステップS405において、全ての要素ノードが選択されていないと判断した場合(ステップS405:No)は、XML文書において、ステップS401で選択された要素ノードを基準に、次の要素ノードを選択する(ステップS406)。このとき、下位ノードと同位ノードが存在する場合は下位ノードを優先して選択する。たとえば、図3に示したXML文書において、要素ノードが選択される順番は、インデックス番号の順番とおりとなる。   Next, it is determined whether or not all element nodes included in the XML document have been selected (step S405). If it is determined in step S405 that all element nodes have been selected (step S405: Yes), the series of processing ends. On the other hand, if it is determined in step S405 that all element nodes have not been selected (step S405: No), the next element node is selected based on the element node selected in step S401 in the XML document. (Step S406). At this time, if a lower node and a peer node exist, the lower node is selected with priority. For example, in the XML document shown in FIG. 3, the order in which element nodes are selected is the order of the index numbers.

そして、ステップS402に戻り、ステップS405で全てのノードが選択されたと判断されるまで、ステップS402〜ステップS406を繰り返しおこなう。これにより、XML文書に含まれる全ての要素ノードをノードリストに追加することができる。また、XML文書に含まれる全てのテキストノードを、それぞれ、ノードリストに示された要素ノードのいずれかと関連付けることができる。   Then, the process returns to step S402, and steps S402 to S406 are repeated until it is determined in step S405 that all nodes have been selected. Thereby, all the element nodes included in the XML document can be added to the node list. Further, all text nodes included in the XML document can be associated with any one of the element nodes shown in the node list.

(生成部202によって生成されたノードリストの一例)
つぎに、生成部202によって生成されたノードリストの一例について説明する。図5は、生成部202によって生成されたノードリストの一例を示す説明図である。
(Example of node list generated by the generation unit 202)
Next, an example of the node list generated by the generation unit 202 will be described. FIG. 5 is an explanatory diagram illustrating an example of a node list generated by the generation unit 202.

図5に示すノードリストは、図4を用いて上述した手順によって、図3に示したXML文書から生成されたノードリストであり、列「index1」,「pass」,「index2」,「text」によって構成されている。   The node list shown in FIG. 5 is a node list generated from the XML document shown in FIG. 3 by the procedure described above with reference to FIG. 4, and columns “index1”, “pass”, “index2”, “text”. It is constituted by.

このうち、列「index1」には、要素ノードのインデックスが設定されている。また、列「pass」には、要素ノードのパスが設定されている。そして、列「index2」には、要素ノードと関連付けられているテキストノードのインデックスが設定されている。さらに、列「text」には、要素ノードと関連付けられているテキストノードのテキストが設定されている。   Among these, the index of the element node is set in the column “index1”. In the column “pass”, an element node path is set. In the column “index2”, the index of the text node associated with the element node is set. Further, the text of the text node associated with the element node is set in the column “text”.

たとえば、図5に示すノードリストから、インデックス「4」が付与されたパス「/article/body/sec/p1」によって示される要素ノードには、インデックス「A」が付与され、かつテキスト「XML,scheme」を含むテキストノードが関連付けられていると判断することができる。   For example, from the node list shown in FIG. 5, the element node indicated by the path “/ article / body / sec / p1” to which the index “4” is assigned is assigned the index “A” and the text “XML, It can be determined that a text node including “scheme” is associated.

(文書検索装置100による文書検索処理の手順)
つぎに、この発明の実施の形態にかかる文書検索装置100による文書検索処理の手順について説明する。図6は、この発明の実施の形態にかかる文書検索装置100による文書検索処理の手順の一例を示すフローチャートである。
(Procedure for document search processing by the document search apparatus 100)
Next, a procedure for document search processing by the document search apparatus 100 according to the embodiment of the present invention will be described. FIG. 6 is a flowchart showing an example of a procedure of document search processing by the document search apparatus 100 according to the embodiment of the present invention.

まず、取得部201によって、XML文書を取得して(ステップS601)、生成部202によって、ステップS601で取得されたXML文書からノードリストを生成する(ステップS602)。ノードリストの具体的な生成手順については図4を用いて上述したとおりである。   First, the acquisition unit 201 acquires an XML document (step S601), and the generation unit 202 generates a node list from the XML document acquired in step S601 (step S602). The specific procedure for generating the node list is as described above with reference to FIG.

つぎに、入力部203によって、検索条件の入力を受け付けて(ステップS603)、算出部204によって、ステップS602で生成されたノードリストに示されているノードごとに、ステップS603で入力された検索条件に基づいた、検索条件の合致度を示すスコアを算出する(ステップS604)。   Next, input of a search condition is accepted by the input unit 203 (step S603), and the search condition input in step S603 for each node indicated in the node list generated in step S602 by the calculation unit 204. Based on the above, a score indicating the degree of match of the search condition is calculated (step S604).

続いて、判断部205によって、ステップS602で生成されたノードリストに示されているノードを一つ選択して(ステップS605)、ステップS605で選択されたノードについて、ステップS604で算出されたスコアに基づいて、所定の適合条件を満たすか否かを判断する(ステップS606)。   Subsequently, the determination unit 205 selects one node shown in the node list generated in step S602 (step S605), and the node selected in step S605 has the score calculated in step S604. Based on this, it is determined whether or not a predetermined conformity condition is satisfied (step S606).

ステップS606において、所定の適合条件を満たすと判断した場合(ステップS606:Yes)は、加算部206によって、ステップS605で選択されたノードのスコアを、このノードが属する親ノードのスコアに加算して(ステップS607)、ステップS608へ進む。一方、ステップS606において、所定の適合条件を満たさないと判断した場合(ステップS606:No)は、ステップS607を飛ばして、ステップS608へ進む。   If it is determined in step S606 that the predetermined conformity condition is satisfied (step S606: Yes), the adder 206 adds the score of the node selected in step S605 to the score of the parent node to which this node belongs. (Step S607), the process proceeds to Step S608. On the other hand, if it is determined in step S606 that the predetermined matching condition is not satisfied (step S606: No), step S607 is skipped and the process proceeds to step S608.

続いて、判断部205によって、ステップS602で生成されたノードリストに示されているノードが全て選択されたか否かを判断する(ステップS608)。ステップS608において、ノードが全て選択されていないと判断した場合(ステップS608:No)は、ステップS608においてノードが全て選択されたと判断されるまで、ステップS605〜ステップS608を繰り返しおこなう。   Subsequently, the determination unit 205 determines whether or not all the nodes shown in the node list generated in step S602 have been selected (step S608). If it is determined in step S608 that all nodes have not been selected (step S608: No), steps S605 to S608 are repeated until it is determined in step S608 that all nodes have been selected.

一方、ステップS608において、ノードが全て選択されたと判断した場合(ステップS608:Yes)は、決定部207によって、ステップS607で加算されたスコアと、ステップS604で算出されたスコアと、に基づいて、ステップS602で生成されたノードリストを検索条件の合致度が高い順にソートして(ステップS609)、ソートされたノードリストの中から、上位から所定数のノードを検索結果として決定する(ステップS610)。   On the other hand, if it is determined in step S608 that all the nodes have been selected (step S608: Yes), based on the score added in step S607 by the determination unit 207 and the score calculated in step S604, The node list generated in step S602 is sorted in descending order of matching degree of the search condition (step S609), and a predetermined number of nodes are determined as search results from the sorted node list (step S610). .

そして、出力制御部208の制御によって、ステップS610で検索結果として決定されたノードを、検索条件の合致度が高い順に表示部209に表示して(ステップS611)、一連の処理を終了する。   Then, under the control of the output control unit 208, the nodes determined as the search results in step S610 are displayed on the display unit 209 in descending order of the degree of match of the search conditions (step S611), and the series of processing ends.

(算出部204によって算出されたスコアの一例)
つぎに、算出部204によって算出されたスコアの一例について説明する。図7は、算出部204によって算出されたスコアの一例を示す説明図である。
(Example of score calculated by calculation unit 204)
Next, an example of the score calculated by the calculation unit 204 will be described. FIG. 7 is an explanatory diagram illustrating an example of a score calculated by the calculation unit 204.

図7は、図5に示したノードリストと、算出部204によって算出された各要素ノードのスコアと、の関連付けを示したものである。図7において、列「score1」には、算出部204によって算出されたスコアが設定されている。このときの、算出処理に用いられた検索文字列は「XML,tag,scheme」である。   FIG. 7 shows the association between the node list shown in FIG. 5 and the score of each element node calculated by the calculation unit 204. In FIG. 7, the score calculated by the calculation unit 204 is set in a column “score1”. The search character string used in the calculation process at this time is “XML, tag, scheme”.

たとえば、図7から、インデックス「4」が付与されたパス「/article/body/sec/p1」によって示される要素ノードには、算出部204によって算出されたスコア「38」が関連付けられていると判断することができる。ここで、このスコア「38」は以下のTF−IDF算出式(2)によって算出されたものである。   For example, from FIG. 7, it is assumed that the score “38” calculated by the calculation unit 204 is associated with the element node indicated by the path “/ article / body / sec / p1” to which the index “4” is assigned. Judgment can be made. Here, this score “38” is calculated by the following TF-IDF calculation formula (2).

38(TFIDF:スコア)=1(TF:テキストノード内における検索文字列「XML」の出現数)×20(IDF:log(全テキストノード数/検索文字列「XML」を含むテキストノード数))+1(TF:テキストノード内における検索文字列「scheme」の出現数)×18(IDF:log(全テキストノード数/検索文字列「scheme」を含むテキストノード数))・・・(2)   38 (TFIDF: score) = 1 (TF: number of occurrences of the search character string “XML” in the text node) × 20 (IDF: log (total number of text nodes / number of text nodes including the search character string “XML”)) +1 (TF: appearance number of search character string “scheme” in text node) × 18 (IDF: log (total number of text nodes / number of text nodes including search character string “scheme”)) (2)

また、インデックス「5」が付与されたパス「/article/body/sec/p2」によって示される要素ノードには、算出部204によって算出されたスコア「80」が関連付けられていると判断することができる。こで、このスコア「80」は以下のTF−IDF算出式(3)によって算出されたものである。   Further, it may be determined that the score “80” calculated by the calculation unit 204 is associated with the element node indicated by the path “/ article / body / sec / p2” to which the index “5” is assigned. it can. The score “80” is calculated by the following TF-IDF calculation formula (3).

80(TFIDF:スコア)=2(TF:テキストノード内における検索文字列「tag」の出現数)×40(IDF:log(全テキストノード数/検索文字列「tag」を含むテキストノード数))・・・(3)   80 (TFIDF: score) = 2 (TF: number of occurrences of the search character string “tag” in the text node) × 40 (IDF: log (total number of text nodes / number of text nodes including the search character string “tag”)) ... (3)

なお、算出部204によって算出されたスコアは、ノードリストに持たせてもよく、ノードリストとは別のテーブルなどに持たせてもよい。   Note that the score calculated by the calculation unit 204 may be included in the node list, or may be included in a table different from the node list.

(加算部206によって加算されたスコアの一例)
つぎに、加算部206によって加算されたスコアの一例について説明する。図8は、加算部206によって加算されたスコアの一例を示す説明図である。
(Example of score added by adding unit 206)
Next, an example of the score added by the adding unit 206 will be described. FIG. 8 is an explanatory diagram illustrating an example of scores added by the adding unit 206.

図8は、図5に示したノードリストと、算出部204によって算出された各要素ノードのスコアと、加算部206によって加算されたスコアと、の関連付けを示したものである。図8において、列「score2」には、加算部206によって加算されたスコアが設定されている。   FIG. 8 shows the association between the node list shown in FIG. 5, the score of each element node calculated by the calculation unit 204, and the score added by the addition unit 206. In FIG. 8, the score added by the adding unit 206 is set in a column “score2”.

たとえば、図8から、インデックス「3」が付与されたパス「/article/body/sec」によって示される要素ノードには、加算部204によって加算されたスコア「118」が関連付けられていると判断することができる。ここで、このスコア「118」は、この要素ノードに属する、インデックス「4」が付与された要素ノードのスコア「38」と、インデックス「5」が付与された要素ノードのスコア「80」とが加算されたものである。   For example, from FIG. 8, it is determined that the score “118” added by the adding unit 204 is associated with the element node indicated by the path “/ article / body / sec” to which the index “3” is assigned. be able to. Here, the score “118” includes the score “38” of the element node to which the index “4” is assigned and the score “80” of the element node to which the index “5” is assigned. It is an addition.

上記加算処理に先立っては、判断部205によって、インデックス「4」および「5」についての、インデックス「3」に加算するか否かの判断処理がおこなわれている。このときの、判断処理に用いられた判断条件は「合計スコア50以上となる場合は加算する」と、「連結ノード数が100以下の場合は加算する」である。そして、インデックス「4」および「5」については、上記条件を満たしているため、ともにスコアをインデックス「3」のスコアに加算すると判断されている。   Prior to the addition process, the determination unit 205 determines whether or not the indexes “4” and “5” are added to the index “3”. The determination conditions used in the determination process at this time are “add when the total score is 50 or more” and “add when the number of connected nodes is 100 or less”. Since the indexes “4” and “5” satisfy the above condition, it is determined that the scores are added to the score of the index “3”.

また、図8に示すように、インデックス「4」および「5」のスコアは、加算部204によって「0」とされている。これは、インデックス「3」と、インデックス「4」および「5」とが、重複して検索結果として決定されることを避けるためである。   Further, as shown in FIG. 8, the scores of the indexes “4” and “5” are set to “0” by the adding unit 204. This is to prevent the index “3” and the indexes “4” and “5” from being determined as search results in duplicate.

同様に、図8から、インデックス「9」が付与されたパス「/article/body/sec/title/name」によって示される要素ノードには、加算部204によって加算されたスコア「66」が関連付けられていると判断することができる。ここで、このスコア「66」は、この要素ノードに属する、インデックス「10」が付与された要素ノードのスコア「22」と、インデックス「11」が付与された要素ノードのスコア「44」とが加算されたものである。そして、インデックス「10」および「11」のスコアは、加算部204によって「0」とされている。   Similarly, from FIG. 8, the score “66” added by the adding unit 204 is associated with the element node indicated by the path “/ article / body / sec / title / name” to which the index “9” is assigned. Can be determined. Here, the score “66” includes the score “22” of the element node to which the index “10” is assigned and the score “44” of the element node to which the index “11” is assigned. It is an addition. The scores of indexes “10” and “11” are set to “0” by the adding unit 204.

(決定部207によってソートされたノードリストの一例)
つぎに、決定部207によってソートされたノードリストの一例について説明する。図9は、決定部207によってソートされたノードリストの一例を示す説明図である。
(Example of node list sorted by determination unit 207)
Next, an example of the node list sorted by the determination unit 207 will be described. FIG. 9 is an explanatory diagram illustrating an example of a node list sorted by the determination unit 207.

図9は、決定部207によって、図8に示したように加算部206によって加算されたスコアと、図7に示したように算出部204によって算出されたスコアと、に基づいて、図5に示したノードリストを検索条件の合致度が高い順にソートしたものである。このようにソートされたノードリストから、決定部207は、上位から所定数のノードを検索結果として決定する。   9 is based on the score added by the adding unit 206 as shown in FIG. 8 by the determining unit 207 and the score calculated by the calculating unit 204 as shown in FIG. The node list shown is sorted in descending order of matching degree of search conditions. From the node list thus sorted, the determination unit 207 determines a predetermined number of nodes as search results from the top.

たとえば、検索数が3件と指定されている場合、決定部207は、図9に示したノードリストの中から、インデックス「3」が付与された要素ノードと、インデックス「8」が付与された要素ノードと、インデックス「9」が付与された要素ノードと、の3件の要素ノードを検索結果として決定する。   For example, when the number of searches is specified as three, the determination unit 207 receives the element node to which the index “3” is assigned and the index “8” from the node list illustrated in FIG. Three element nodes, that is, the element node and the element node to which the index “9” is assigned, are determined as search results.

(表示部209に表示された検索結果の一例)
つぎに、表示部209に表示された検索結果の一例について説明する。図10は、表示部209に表示された検索結果の一例を示す説明図である。
(Example of search result displayed on display unit 209)
Next, an example of the search result displayed on the display unit 209 will be described. FIG. 10 is an explanatory diagram illustrating an example of a search result displayed on the display unit 209.

図10は、図3に示したXML文書に対して、図6を用いて上述した手順による文書検索処理がおこなわれた結果、表示部209に表示された検索結果を示すものである。図10に示すように、文書検索処理をおこなうにあたり、検索対象文書「c:¥documents¥0123.xml」、検索条件「XML,tag,scheme」、検索数「3(件)」がユーザによって指定されている。   FIG. 10 shows a search result displayed on the display unit 209 as a result of performing the document search process according to the procedure described above with reference to FIG. 6 on the XML document shown in FIG. As shown in FIG. 10, in performing the document search process, the search target document “c: ¥ documents ¥ 0123.xml”, the search condition “XML, tag, scheme”, and the number of searches “3 (cases)” are designated by the user. Has been.

そして、「検索」ボタンが押下されたことにより、検索対象文書「c:¥documents¥0123.xml」に対する文書検索処理がおこなわれ、その結果として、検索対象文書「c:¥documents¥0123.xml」の中から決定された、上位3件のノードが検索結果として表示されている。   When the “search” button is pressed, a document search process is performed on the search target document “c: \ documents \ 0123.xml”. As a result, the search target document “c: \ documents \ 0123.xml” is executed. The top three nodes determined from "are displayed as search results.

以上説明したように、本実施の形態にかかる文書検索装置100によれば、XML文書を取得し、取得されたXML文書からノードリストを生成し、検索条件の入力を受け付け、生成されたノードリストに示されているノードごとに、入力された検索条件に基づいた、検索条件の合致度を示すスコアを算出し、生成されたノードリストに示されているノードごとに、所定の適合条件を満たすか否かを判断し、所定の適合条件を満たすと判断されたノードのスコアを、当該ノードが属する親ノードのスコアに加算し、加算されたスコアと、算出されたスコアと、に基づいて、生成されたノードリストを、検索条件の合致度が高い順にソートし、ソートされたノードリストの中から、上位から所定数のノードを検索結果として決定し、決定されたノードを、検索条件の合致度が高い順に表示する構成とした。   As described above, according to the document search apparatus 100 according to the present embodiment, an XML document is acquired, a node list is generated from the acquired XML document, an input of a search condition is received, and the generated node list For each node indicated in, a score indicating the degree of match of the search condition is calculated based on the input search condition, and a predetermined matching condition is satisfied for each node indicated in the generated node list Whether or not, and the score of the node determined to satisfy the predetermined matching condition is added to the score of the parent node to which the node belongs, and based on the added score and the calculated score, The generated node list is sorted in descending order of matching degree of search conditions, and a predetermined number of nodes are determined as search results from the sorted node list. The over-de, has a structure in which the matching degree of the search condition displayed in descending order.

これにより、文書検索処理において、テキストノードを持つノードが所定の適合条件を満たしている場合、このノードが属する親ノードを、検索条件の合致度が高いノードとして扱うことができる。そのうえで、検索条件の合致度がより高いノードを、必要な数だけXML文書の中から検索することができる。さらに、検索されたノードを、適切な順序で表示することができる。このため、適切な単位および数の部分文書を検索することができるうえ、検索された部分文書を適切な順序で表示することができ、結果的に、文書検索処理における検索精度およびユーザビリティの向上を図ることができる。   Thereby, in a document search process, when a node having a text node satisfies a predetermined matching condition, a parent node to which this node belongs can be handled as a node having a high matching degree of the search condition. In addition, a required number of nodes having a higher matching degree of the search condition can be searched from the XML document. Furthermore, the retrieved nodes can be displayed in an appropriate order. Therefore, it is possible to search for an appropriate unit and number of partial documents, and to display the searched partial documents in an appropriate order. As a result, the search accuracy and usability in the document search process can be improved. Can be planned.

なお、この発明にかかる文書検索装置、文書検索方法および文書検索プログラムは、階層構造化された文書セットであれば、XML文書以外の文書に対する文書検索にも適用することができる。また、ファイル化された文書に限らず、たとえば、データベース化された文書に対する文書検索にも適用することができる。さらに、単独のファイルにファイル化された文書や単独のデータベースにデータベース化された文書に限らず、複数のファイルにファイル化された文書や、複数のデータベースにデータベース化された文書に対する文書検索にも適用することができる。   Note that the document search apparatus, document search method, and document search program according to the present invention can be applied to document search for documents other than XML documents as long as the document set has a hierarchical structure. Further, the present invention is not limited to a filed document, and can be applied to a document search for a databased document, for example. Furthermore, not only documents filed in a single file or documents databased in a single database, but also document searches for documents filed in multiple files and documents databased in multiple databases. Can be applied.

なお、本実施の形態で説明した文書検索方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。このプログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。またこのプログラムは、インターネット等のネットワークを介して配布することが可能な伝送媒体であってもよい。   The document search method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. This program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer. The program may be a transmission medium that can be distributed via a network such as the Internet.

以上のように、本発明にかかる文書検索装置、文書検索方法および文書検索プログラムは、階層構造化された文書セットから、自然文により入力された検索条件に合致するノードを検索するパーソナル・コンピュータ、ドキュメントサーバ、文書検索ソフトウェアなどへの利用に適している。   As described above, the document search apparatus, the document search method, and the document search program according to the present invention are a personal computer that searches a hierarchically-structured document set for a node that matches a search condition input by a natural sentence, Suitable for use in document servers, document search software, etc.

この実施の形態にかかる文書検索装置のハードウェア構成の一例を示すブロック図である。It is a block diagram which shows an example of the hardware constitutions of the document search device concerning this embodiment. この実施の形態にかかる文書検索装置の機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of the document search device concerning this embodiment. この発明の実施の形態にかかる文書検索装置に用いられるXML文書の一例を示す説明図である。It is explanatory drawing which shows an example of the XML document used for the document search apparatus concerning embodiment of this invention. 生成部によるノードリストの生成手順の一例を示すフローチャートである。It is a flowchart which shows an example of the production | generation procedure of the node list by a production | generation part. 生成部によって生成されたノードリストの一例を示す説明図である。It is explanatory drawing which shows an example of the node list produced | generated by the production | generation part. この発明の実施の形態にかかる文書検索装置による文書検索処理の手順の一例を示すフローチャートである。It is a flowchart which shows an example of the procedure of the document search process by the document search apparatus concerning embodiment of this invention. 算出部によって算出されたスコアの一例を示す説明図である。It is explanatory drawing which shows an example of the score calculated by the calculation part. 加算部によって加算されたスコアの一例を示す説明図である。It is explanatory drawing which shows an example of the score added by the addition part. 決定部によってソートされたノードリストの一例を示す説明図である。It is explanatory drawing which shows an example of the node list sorted by the determination part. 表示部に表示された検索結果の一例を示す説明図である。It is explanatory drawing which shows an example of the search result displayed on the display part.

符号の説明Explanation of symbols

100 文書検索装置
101 CPU
102 ROM
103 RAM
104 HDD
105 HD
106 FDD
107 FD
108 CD−RWドライブ
109 CD−RW
110 ディスプレイ
111 キーボード
112 マウス
113 ネットワークI/F
114 通信ケーブル
120 バス
201 取得部
202 生成部
203 入力部
204 算出部
205 判断部
206 加算部
207 決定部
208 出力制御部
209 表示部
100 Document Retrieval Device 101 CPU
102 ROM
103 RAM
104 HDD
105 HD
106 FDD
107 FD
108 CD-RW drive 109 CD-RW
110 Display 111 Keyboard 112 Mouse 113 Network I / F
114 communication cable 120 bus 201 acquisition unit 202 generation unit 203 input unit 204 calculation unit 205 determination unit 206 addition unit 207 determination unit 208 output control unit 209 display unit

Claims (6)

階層構造化された文書セットから、自然文により入力された検索条件に合致するノードを検索する文書検索装置であって、
前記文書セットを取得する取得手段と、
前記取得手段によって取得された文書セットからノードリストを生成する生成手段と、
前記検索条件の入力を受け付ける入力手段と、
前記生成手段によって生成されたノードリストに示されているノードごとに、前記入力手段によって入力された検索条件に基づいた、前記検索条件の合致度を示すスコアを算出する算出手段と、
前記生成手段によって生成されたノードリストに示されているノードごとに、前記算出手段によって算出されたスコアに基づいて、所定の適合条件を満たすか否かを判断する判断手段と、
前記判断手段によって所定の適合条件を満たすと判断されたノードのスコアを、当該ノードが属する親ノードのスコアに加算する加算手段と、
前記加算手段によって加算されたスコアと、前記算出手段によって算出されたスコアと、に基づいて、前記生成手段によって生成されたノードリストの中から、前記検索条件の合致度が高いノードを検索結果として決定する決定手段と、
を備えたことを特徴とする文書検索装置。
A document search device that searches for a node that matches a search condition input by a natural sentence from a hierarchically structured document set,
Obtaining means for obtaining the document set;
Generating means for generating a node list from the document set acquired by the acquiring means;
Input means for receiving input of the search condition;
Calculation means for calculating a score indicating the degree of match of the search condition based on the search condition input by the input means for each node indicated in the node list generated by the generation means;
Determination means for determining whether or not a predetermined conformity condition is satisfied based on the score calculated by the calculation means for each node indicated in the node list generated by the generation means;
Adding means for adding a score of a node determined to satisfy a predetermined matching condition by the determining means to a score of a parent node to which the node belongs;
Based on the score added by the adding means and the score calculated by the calculating means, a node having a high degree of match of the search condition is selected as a search result from the node list generated by the generating means. A decision means to decide;
A document retrieval apparatus comprising:
前記決定手段によって決定されたノードを、前記検索条件の合致度が高い順に表示されるよう出力を制御する出力制御手段をさらに備えたことを特長とする請求項1に記載の文書検索装置。   2. The document search apparatus according to claim 1, further comprising output control means for controlling output so that nodes determined by the determination means are displayed in descending order of matching degree of the search conditions. 前記決定手段は、前記加算手段によって加算されたスコアと、前記算出手段によって算出されたスコアと、に基づいて、前記生成手段によって生成されたノードリストを、前記検索条件の合致度が高い順にソートし、ソートされたノードリストの中から、上位から所定数のノードを検索結果として決定することを特徴とする請求項1または2に記載の文書検索装置。   The determination unit sorts the node list generated by the generation unit in descending order of matching degree of the search condition based on the score added by the addition unit and the score calculated by the calculation unit. 3. The document search apparatus according to claim 1, wherein a predetermined number of nodes are determined as search results from the top of the sorted node list. 前記算出手段は、TF−IDF法を用いて、前記生成手段によって生成されたノードリストに示されているノードごとに、前記入力手段によって入力された検索条件に基づいた、検索条件の合致度を示すスコアを算出することを特徴とする請求項1〜3のいずれか一つに記載の文書検索装置。   The calculation means uses the TF-IDF method to calculate the degree of match of the search conditions based on the search conditions input by the input means for each node indicated in the node list generated by the generation means. The document search apparatus according to claim 1, wherein a score to be calculated is calculated. 階層構造化された文書セットから、自然文により入力された検索条件に合致するノードを検索する文書検索方法であって、
前記文書セットを取得する取得工程と、
前記取得工程によって取得された文書セットからノードリストを生成する生成工程と、
前記検索条件の入力を受け付ける入力工程と、
前記生成工程によって生成されたノードリストに示されているノードごとに、前記入力工程によって入力された検索条件に基づいた、前記検索条件の合致度を示すスコアを算出する算出工程と、
前記生成工程によって生成されたノードリストに示されているノードごとに、前記算出工程によって算出されたスコアに基づいて、所定の適合条件を満たすか否かを判断する判断工程と、
前記判断工程によって所定の適合条件を満たすと判断されたノードのスコアを、当該ノードが属する親ノードのスコアに加算する加算工程と、
前記加算工程によって加算されたスコアと、前記算出工程によって算出されたスコアと、に基づいて、前記生成工程によって生成されたノードリストの中から、前記検索条件の合致度が高いノードを検索結果として決定する決定工程と、
をコンピュータに実行させることを特徴とする文書検索方法。
A document search method for searching a node that matches a search condition input by a natural sentence from a hierarchically structured document set,
An acquisition step of acquiring the document set;
A generation step of generating a node list from the document set acquired by the acquisition step;
An input step for receiving an input of the search condition;
A calculation step of calculating a score indicating a degree of match of the search condition based on the search condition input by the input step for each node indicated in the node list generated by the generation step;
A determination step for determining whether or not a predetermined matching condition is satisfied based on the score calculated by the calculation step for each node indicated in the node list generated by the generation step;
An adding step of adding the score of the node determined to satisfy the predetermined matching condition by the determining step to the score of the parent node to which the node belongs;
Based on the score added by the adding step and the score calculated by the calculating step, a node having a high degree of match of the search condition is selected as a search result from the node list generated by the generating step. A decision process to decide;
A document retrieval method characterized by causing a computer to execute.
階層構造化された文書セットから、自然文により入力された検索条件に合致するノードを検索する文書検索プログラムであって、
前記文書セットを取得する取得工程と、
前記取得工程によって取得された文書セットからノードリストを生成する生成工程と、
前記検索条件の入力を受け付ける入力工程と、
前記生成工程によって生成されたノードリストに示されているノードごとに、前記入力工程によって入力された検索条件に基づいた、前記検索条件の合致度を示すスコアを算出する算出工程と、
前記生成工程によって生成されたノードリストに示されているノードごとに、前記算出工程によって算出されたスコアに基づいて、所定の適合条件を満たすか否かを判断する判断工程と、
前記判断工程によって所定の適合条件を満たすと判断されたノードのスコアを、当該ノードが属する親ノードのスコアに加算する加算工程と、
前記加算工程によって加算されたスコアと、前記算出工程によって算出されたスコアと、に基づいて、前記生成工程によって生成されたノードリストの中から、前記検索条件の合致度が高いノードを検索結果として決定する決定工程と、
をコンピュータに実行させることを特徴とする文書検索プログラム。
A document search program for searching a node that matches a search condition input by a natural sentence from a hierarchically structured document set,
An acquisition step of acquiring the document set;
A generation step of generating a node list from the document set acquired by the acquisition step;
An input step for receiving an input of the search condition;
A calculation step of calculating a score indicating a degree of match of the search condition based on the search condition input by the input step for each node indicated in the node list generated by the generation step;
A determination step for determining whether or not a predetermined matching condition is satisfied based on the score calculated by the calculation step for each node indicated in the node list generated by the generation step;
An adding step of adding the score of the node determined to satisfy the predetermined matching condition by the determining step to the score of the parent node to which the node belongs;
Based on the score added by the adding step and the score calculated by the calculating step, a node having a high degree of match of the search condition is selected as a search result from the node list generated by the generating step. A decision process to decide;
Document search program characterized by causing a computer to execute.
JP2006330571A 2006-12-07 2006-12-07 Document retrieval device, document retrieval method and document retrieval program Pending JP2008146209A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006330571A JP2008146209A (en) 2006-12-07 2006-12-07 Document retrieval device, document retrieval method and document retrieval program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006330571A JP2008146209A (en) 2006-12-07 2006-12-07 Document retrieval device, document retrieval method and document retrieval program

Publications (1)

Publication Number Publication Date
JP2008146209A true JP2008146209A (en) 2008-06-26

Family

ID=39606347

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006330571A Pending JP2008146209A (en) 2006-12-07 2006-12-07 Document retrieval device, document retrieval method and document retrieval program

Country Status (1)

Country Link
JP (1) JP2008146209A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013136545A1 (en) * 2012-03-14 2013-09-19 株式会社東芝 Structured document management device, structured document search method
WO2016031055A1 (en) * 2014-08-29 2016-03-03 株式会社日立製作所 Information retrieval apparatus, information retrieval method, and information retrieval program
CN105630831A (en) * 2014-11-06 2016-06-01 科大讯飞股份有限公司 Humming retrieval method and system
CN116451200A (en) * 2023-06-14 2023-07-18 浙江星汉信息技术股份有限公司 Cloud storage-based retrieval method for encrypted archive data

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06301725A (en) * 1993-04-13 1994-10-28 Nippon Steel Corp Retrieval device for character-string of hierarchized document
US20060074907A1 (en) * 2004-09-27 2006-04-06 Singhal Amitabh K Presentation of search results based on document structure

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06301725A (en) * 1993-04-13 1994-10-28 Nippon Steel Corp Retrieval device for character-string of hierarchized document
US20060074907A1 (en) * 2004-09-27 2006-04-06 Singhal Amitabh K Presentation of search results based on document structure
JP2008515049A (en) * 2004-09-27 2008-05-08 グーグル インコーポレイテッド Displaying search results based on document structure

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013136545A1 (en) * 2012-03-14 2013-09-19 株式会社東芝 Structured document management device, structured document search method
JP2013191046A (en) * 2012-03-14 2013-09-26 Toshiba Corp Structured document management device, structured document retrieval method
WO2016031055A1 (en) * 2014-08-29 2016-03-03 株式会社日立製作所 Information retrieval apparatus, information retrieval method, and information retrieval program
CN105630831A (en) * 2014-11-06 2016-06-01 科大讯飞股份有限公司 Humming retrieval method and system
CN105630831B (en) * 2014-11-06 2019-11-15 科大讯飞股份有限公司 Singing search method and system
CN116451200A (en) * 2023-06-14 2023-07-18 浙江星汉信息技术股份有限公司 Cloud storage-based retrieval method for encrypted archive data
CN116451200B (en) * 2023-06-14 2023-09-05 浙江星汉信息技术股份有限公司 Cloud storage-based retrieval method for encrypted archive data

Similar Documents

Publication Publication Date Title
JP5492187B2 (en) Search result ranking using edit distance and document information
CN110362727B (en) Third party search application for search system
JP5550669B2 (en) SEARCH DEVICE, SEARCH METHOD, AND PROGRAM
JP5187313B2 (en) Document importance calculation system, document importance calculation method, and program
US20080172380A1 (en) Information retrieval based on information location in the information space.
JP6529761B2 (en) Topic providing system and conversation control terminal device
JP2007219722A (en) Document retrieval server and document retrieval method
CN104199954A (en) Recommendation system and method for search input
JP2008146209A (en) Document retrieval device, document retrieval method and document retrieval program
JP3178421B2 (en) Text search device and computer-readable recording medium storing text search program
JP2009122807A (en) Associative retrieval system
JP2008102736A (en) Retrieval apparatus and retrieval method
Nuttall et al. A computational exploration of melodic patterns in Arab-Andalusian music
JP2011100191A (en) Device, method, and program for retrieving document
JP5127553B2 (en) Information processing apparatus, information processing method, program, and recording medium
JP5416552B2 (en) Ranking function generation device, ranking function generation method, ranking function generation program
JP5408658B2 (en) Information consistency determination device, method and program thereof
JP2006318509A (en) Solution data editing processing device and processing method
JP4452527B2 (en) Document search device, document search method, and document search program
JP2009129013A (en) Method, device, and program for retrieving document
JP2009129280A (en) Method, device, and program for retrieving document
JP2007193500A (en) Document or diagram production support apparatus
JP2010003266A (en) Query generation device, method, program and computer-readable recording medium
JP2006163645A (en) Method, device and program for retrieving information, computer readable recording medium and device recorded with the program
JP3578045B2 (en) Full-text search method and apparatus, and storage medium storing full-text search program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091204

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111219

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111227

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120508