JP2009129013A - Method, device, and program for retrieving document - Google Patents
Method, device, and program for retrieving document Download PDFInfo
- Publication number
- JP2009129013A JP2009129013A JP2007300750A JP2007300750A JP2009129013A JP 2009129013 A JP2009129013 A JP 2009129013A JP 2007300750 A JP2007300750 A JP 2007300750A JP 2007300750 A JP2007300750 A JP 2007300750A JP 2009129013 A JP2009129013 A JP 2009129013A
- Authority
- JP
- Japan
- Prior art keywords
- node
- score
- list
- indicated
- document
- 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
Links
Images
Abstract
Description
この発明は、階層構造化された文書セットから、任意の検索条件に合致するノードを検索する文書検索方法、文書検索装置および文書検索プログラムに関する。 The present invention relates to a document search method, a document search apparatus, and a document search program for searching a node that matches an arbitrary search condition from a hierarchically structured document set.
従来より、一連の文書を、章や節などの適切な単位の部分文書に分割し、階層構造化することによって、出版の多様性、情報検索の的確性、分割/結合の容易性など、多くのメリットを得ることができるものとされている。たとえば、階層構造化された文書の代表的なものとしては、XML文書が挙げられる。XML文書は、タグによって文書要素や文書テキストがマークアップされているため、部分文書の検索を容易におこなうことができるものとされている(たとえば、下記特許文献1参照。)。
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. An XML document has a document element or document text marked up with a tag, so that a partial document can be easily searched (for example, see
しかしながら、上記特許文献1に記載の従来技術にあっては、検索条件に合致する最小単位の要素が断片的に複数検索されてしまうといった問題が生じていた。たとえば、検索条件に合致する複数の要素が、上位の要素によって包括されている場合、ユーザにとっては、この上位の要素が検索結果として検索されるほうが好ましい。
However, in the prior art described in
この発明は、上述した従来技術による問題点を解消するため、階層構造化された文書セットの中から、適切な要素を短時間で検索することができる文書検索方法、文書検索装置および文書検索プログラムを提供することを目的とする。 In order to solve the above-described problems caused by the prior art, the present invention provides a document search method, a document search apparatus, and a document search program capable of searching for appropriate elements in a hierarchically structured document set in a short time. The purpose is to provide.
上述した課題を解決し、目的を達成するため、この発明にかかる文書検索方法は、階層構造化された文書セットを取得する取得工程と、前記取得工程によって取得された文書セットから、当該文書セットに含まれたノードごとに当該ノードが属する親ノードの位置を示す位置情報を含む、ノードリストを生成する生成工程と、任意の検索条件の入力を受け付ける入力工程と、前記ノードリストに示されたノードごとに、前記検索条件の合致度を示すスコアを算出する算出工程と、前記ノードリストに示されたノードごとに、前記位置情報を参照して、前記ノードリストに示されているノードの中から、当該ノードが属する親ノードを特定する特定工程と、前記ノードリストに示されたノードごとに、当該ノードのスコアに基づく加算値を、前記特定工程によって特定された親ノードのスコアに加算する加算工程と、前記加算工程による加算後のスコアに基づいて、前記ノードリストに示されたノードの中から、検索結果として出力するノードを選択する選択工程と、前記選択工程によって選択されたノードを出力する出力工程と、を含んだことを特徴とする。 In order to solve the above-described problems and achieve the object, a document search method according to the present invention includes an acquisition step of acquiring a hierarchically structured document set, and the document set acquired from the acquisition step by the acquisition step. A generation process for generating a node list including position information indicating a position of a parent node to which the node belongs, an input process for receiving an input of an arbitrary search condition, and the node list For each node, a calculation step for calculating a score indicating the degree of match of the search condition, and for each node indicated in the node list, the position information is referred to and the node information indicated in the node list From the specific step of identifying the parent node to which the node belongs, and for each node indicated in the node list, an addition value based on the score of the node is A node to be output as a search result is selected from the nodes indicated in the node list based on the addition step of adding to the score of the parent node specified by the specifying step and the score after the addition by the addition step It includes a selection step and an output step for outputting the node selected by the selection step.
この発明によれば、検索条件の合致度が高いノードの親ノード、または検索条件に合致するノードを多く含む親ノードを、検索条件の合致度が高いノードとして扱うことができる。 According to the present invention, a parent node of a node having a high degree of match of the search condition or a parent node including many nodes that match the search condition can be handled as a node having a high degree of match of the search condition.
また、上記に記載の発明において、前記生成工程は、前記ノードリストに示されたノードごとに、当該ノードのインデックスと当該ノードが属する親ノードのインデックスとの差分値を、前記位置情報として前記ノードリストに含めることを特徴とする。 In the above-described invention, the generation step may use, for each node indicated in the node list, the difference value between the index of the node and the index of a parent node to which the node belongs as the position information as the node. It is characterized by being included in the list.
この発明によれば、少ない情報量で、親ノードの位置を表現できる。 According to the present invention, the position of the parent node can be expressed with a small amount of information.
また、上記に記載の発明において、前記加算工程は、前記ノードリストに示された下位のノードから順に、前記ノードのスコアに基づく加算値を、前記親ノードのスコアに加算することを特徴とする。 In the invention described above, the adding step is characterized in that an addition value based on a score of the node is added to a score of the parent node in order from a lower node shown in the node list. .
この発明によれば、それぞれのノードについての加算処理を1回で済ませることができる。 According to the present invention, the addition process for each node can be completed once.
また、上記に記載の発明において、前記算出工程は、TF−IDF法を用いて、前記ノードリストに示されたノードごとに、前記検索条件の合致度を示すスコアを算出することを特徴とする。 In the above-described invention, the calculating step calculates a score indicating a degree of match of the search condition for each node indicated in the node list using a TF-IDF method. .
この発明によれば、TF−IDF法を用いてスコアを算出することにより、単に検索条件に含まれるキーワードが多く出現するノードではなく、そのキーワードをノードの特徴的なものとするノードを、検索条件の合致度が高いノードとして扱うことができる。 According to the present invention, by calculating a score using the TF-IDF method, a node that makes the keyword characteristic of the node is searched, not just a node in which many keywords included in the search condition appear. It can be handled as a node with a high degree of matching of conditions.
また、上記に記載の発明において、前記加算工程は、前記ノードリストに示されたノードごとに、当該ノードのスコアを、前記親ノードのスコアに加算することを特徴とする。 In the invention described above, the adding step adds the score of the node to the score of the parent node for each node indicated in the node list.
この発明によれば、検索条件の合致度に応じたスコアを親ノードに加算することができる。 According to this invention, it is possible to add a score corresponding to the matching degree of the search condition to the parent node.
また、上記に記載の発明において、前記加算工程は、前記ノードリストに示されたノードごとに、当該ノードのスコアと当該ノードの位置情報とに基づく加算値を、前記親ノードのスコアに加算することを特徴とする。 In the invention described above, the adding step adds, for each node indicated in the node list, an added value based on the score of the node and the position information of the node to the score of the parent node. It is characterized by that.
この発明によれば、検索条件の合致度および親ノードとの距離を考慮したスコアを親ノードに加算することができる。 According to the present invention, it is possible to add to the parent node a score that considers the degree of match of the search condition and the distance to the parent node.
また、上記に記載の発明において、前記加算工程は、前記ノードリストに示されたノードごとに、当該ノードのスコアと当該ノードの大きさとに基づく加算値を、前記親ノードのスコアに加算することを特徴とする。 In the invention described above, the adding step adds, for each node indicated in the node list, an added value based on the score of the node and the size of the node to the score of the parent node. It is characterized by.
この発明によれば、検索条件の合致度およびノードの大きさを考慮したスコアを親ノードに加算することができる。 According to the present invention, it is possible to add a score considering the degree of match of the search condition and the size of the node to the parent node.
また、上記に記載の発明において、前記加算工程は、前記ノードリストに示されたノードごとに、当該ノードのスコアと当該ノードの位置情報と当該ノードの大きさとに基づく加算値を、前記親ノードのスコアに加算することを特徴とする。 In the invention described above, for each node indicated in the node list, the adding step calculates an added value based on the score of the node, the position information of the node, and the size of the node. It adds to the score of.
この発明によれば、検索条件の合致度、親ノードとの距離、およびノードの大きさを考慮したスコアを親ノードに加算することができる。 According to the present invention, a score considering the degree of match of the search condition, the distance to the parent node, and the size of the node can be added to the parent node.
また、この発明にかかる文書検索装置は、階層構造化された文書セットを取得する取得手段と、前記取得手段によって取得された文書セットから、当該文書セットに含まれたノードごとに当該ノードが属する親ノードの位置を示す位置情報を含む、ノードリストを生成する生成手段と、任意の検索条件の入力を受け付ける入力手段と、前記ノードリストに示されたノードごとに、前記検索条件の合致度を示すスコアを算出する算出手段と、前記ノードリストに示されたノードごとに、前記位置情報を参照して、前記ノードリストに示されているノードの中から、当該ノードが属する親ノードを特定する特定手段と、前記ノードリストに示されたノードごとに、当該ノードのスコアに基づく加算値を、前記特定手段によって特定された親ノードのスコアに加算する加算手段と、前記加算手段による加算後のスコアに基づいて、前記ノードリストに示されたノードの中から、検索結果として出力するノードを選択する選択手段と、前記選択手段によって選択されたノードを出力する出力手段と、を備えたことを特徴とする。 The document search apparatus according to the present invention includes an acquisition unit that acquires a hierarchically structured document set, and the node belongs to each node included in the document set from the document set acquired by the acquisition unit. A generation means for generating a node list including position information indicating a position of a parent node, an input means for receiving an input of an arbitrary search condition, and a degree of match of the search condition for each node indicated in the node list For each node indicated in the node list, a calculation means for calculating the score to be indicated is referred to, and the parent node to which the node belongs is identified from the nodes indicated in the node list with reference to the position information For each node indicated in the node list, the adding means based on the score of the node is determined as the parent node specified by the specifying means. An adding means for adding to the score, a selecting means for selecting a node to be output as a search result from the nodes indicated in the node list based on the score after the addition by the adding means, and a selection by the selecting means Output means for outputting the selected node.
この発明によれば、検索条件の合致度が高いノードの親ノード、または検索条件に合致するノードを多く含む親ノードを、検索条件の合致度が高いノードとして扱うことができる。 According to the present invention, a parent node of a node having a high degree of match of the search condition or a parent node including many nodes that match the search condition can be handled as a node having a high degree of match of the search condition.
また、この発明にかかる文書検索プログラムは、階層構造化された文書セットを取得する取得工程と、前記取得工程によって取得された文書セットから、当該文書セットに含まれたノードごとに当該ノードが属する親ノードの位置を示す位置情報を含む、ノードリストを生成する生成工程と、任意の検索条件の入力を受け付ける入力工程と、前記ノードリストに示されたノードごとに、前記検索条件の合致度を示すスコアを算出する算出工程と、前記ノードリストに示されたノードごとに、前記位置情報を参照して、前記ノードリストに示されているノードの中から、当該ノードが属する親ノードを特定する特定工程と、前記ノードリストに示されたノードごとに、当該ノードのスコアに基づく加算値を、前記特定工程によって特定された親ノードのスコアに加算する加算工程と、前記加算工程による加算後のスコアに基づいて、前記ノードリストに示されたノードの中から、検索結果として出力するノードを選択する選択工程と、前記選択工程によって選択されたノードを出力する出力工程と、をコンピュータに実行させることを特徴とする。 The document search program according to the present invention includes an acquisition step of acquiring a hierarchically structured document set, and the node belongs to each node included in the document set from the document set acquired by the acquisition step. A generation process for generating a node list including position information indicating a position of a parent node, an input process for receiving an input of an arbitrary search condition, and a degree of match of the search condition for each node indicated in the node list For each node shown in the node list, a calculation step for calculating a score to be shown is referred to, and the parent node to which the node belongs is identified from among the nodes shown in the node list with reference to the position information For each node indicated in the node list in the specifying step, an added value based on the score of the node is determined as the parent specified in the specifying step. An addition step of adding to the score of the node, a selection step of selecting a node to be output as a search result from the nodes indicated in the node list based on the score after the addition in the addition step, and the selection An output step of outputting a node selected by the step is executed by a computer.
この発明によれば、検索条件の合致度が高いノードの親ノード、または検索条件に合致するノードを多く含む親ノードを、検索条件の合致度が高いノードとしてコンピュータに扱わせることができる。 According to the present invention, it is possible to cause a computer to treat a parent node of a node having a high matching degree of the search condition or a parent node including many nodes matching the search condition as a node having a high matching degree of the search condition.
本発明にかかる文書検索方法、文書検索装置および文書検索プログラムによれば、階層構造化された文書セットの中から、適切な要素を短時間で検索することができるという効果を奏する。 According to the document search method, document search apparatus, and document search program of the present invention, there is an effect that an appropriate element can be searched in a short time from a hierarchically structured document set.
以下に添付図面を参照して、この発明にかかる文書検索方法、文書検索装置および文書検索プログラムの好適な実施の形態を、階層構造化された文書セットの一例としてXML文書を用いて詳細に説明する。 Exemplary embodiments of a document search method, a document search apparatus, and a document search program according to the present invention will be described below in detail using an XML document as an example of a hierarchically structured document set with reference to the accompanying drawings. 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
CPU101は、文書検索装置100全体を制御する。ROM102は、各種制御プログラムなどを格納する。RAM103は、可変的なデータを書き換え自在に記憶し、CPU101のワークエリアとして機能する。HDD104は、CPU101の制御にしたがってHD105に対するデータのリード/ライトを制御する。HD105は、HDD104の制御にしたがって書き込まれたデータを記憶する。
The
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
ディスプレイ110は、カーソル、メニュー、ウィンドウ、あるいは文字や画像などの各種データを表示する。キーボード111は、文字、数値、各種指示などの入力のための複数のキーを備える。マウス112は、各種指示の選択や実行、処理対象の選択、マウスポインタの移動などを行う。ネットワークI/F113は、通信ケーブル114を介してLAN、WAN、インターネットなどのネットワークに接続され、当該ネットワークとCPU101とのインタフェースとして機能する。バス120は上記各部を接続する。
The
(文書検索装置100の機能的構成)
つぎに、この実施の形態にかかる文書検索装置100の機能的構成について説明する。図2は、この実施の形態にかかる文書検索装置100の機能的構成を示すブロック図である。
(Functional configuration of document search apparatus 100)
Next, a functional configuration of the
図2に示すように、文書検索装置100は、取得部201と、生成部202と、入力部203と、算出部204と、特定部205と、加算部206と、選択部207と、出力部208と、を備えて構成されている。
As shown in FIG. 2, the
取得部201は、XML文書を取得する。たとえば取得部201は、ユーザによって指定されたXML文書ファイルを読み取ることによってXML文書を取得する。この場合、XML文書ファイルは、文書検索装置100内部に記憶されているものに限らず、たとえば、文書検索装置100と接続された他の装置に記憶されているものであってもよい。また、取得部201は、複数のXML文書を取得してもよい。この場合、たとえば、所定の格納場所から、複数のXML文書を取得してもよい。また、ユーザによって指定された格納場所から、複数のXML文書を取得してもよい。取得部201は、具体的には、たとえば図1に示したネットワークI/F113によってその機能を実現する。
The
生成部202は、取得部201によって取得されたXML文書から、当該文書セットに含まれたノードごとに当該ノードが属する親ノードの位置を示す位置情報を含む、ノードリストを生成する。ここでいうノードリストとは、木構造にモデル化されたXML文書に基づいてXML文書内に存在する全ての要素ノードをリスト化したものである。ノードリストでは、要素ノードごとに、インデックス、パスなどの情報を含む。要素ノードにテキストノードが属している場合は、そのテキストノードの、インデックス、テキストなどの情報が関連付けられる。
The
生成部202は、ノードリストに示されたノードごとに、当該ノードのインデックスと当該ノードが属する親ノードとの相対位置を示す位置情報をノードリストに含めてもよい。たとえば、生成部202は、ノードリストに示されたノードごとに、当該ノードのインデックスと当該ノードが属する親ノードのインデックスとの差分値を、位置情報としてノードリストに含めてもよい。具体的に説明すると、インデックス「1006」が付与されたノードの親ノードのインデックスが「1002」である場合、生成部202は、インデックス「1006」が付与されたノードの位置情報を「4」とする。生成部202は、生成したノードリストを、メモリ上に一時的に記憶させる。
For each node indicated in the node list, the
生成部202は、XML文書に存在する全てのノードに関するノードリストを生成するだけでなく、所定の範囲内のノードに関するノードリストや、ユーザによって指定された範囲内のノードに関するノードリストを生成するようにしてもよい。また、生成部202は、ノードリストに示されたノードごとに、当該ノードのインデックスと当該ノードが属する親ノードの絶対位置を示す位置情報(たとえば、親ノードのインデックス)をノードリストに含めてもよい。なお、ノードリストの具体的な生成手順については、図4を用いて後述する。生成部202は、具体的には、たとえば図1に示したROM102、RAM103、HD105、FD107に記憶されたプログラムをCPU101が実行することによってその機能を実現する。
The
入力部203は、任意の検索条件の入力を受け付ける。ここで、検索条件とは、任意の自然文(検索クエリ文)、任意のデータなどである。たとえば、検索条件は「J社 I太郎」や「(J社 I太郎)」のように入力され、前者は、「J社」および「I太郎」の両方を含む、を意味し、後者は、「J社」または「I太郎」のいずれかを含む、を意味する。ここで、検索条件は、ユーザが文書検索装置100に直接入力したものに限らず、たとえば、文書検索装置100と接続された他の装置から送信されたものであってもよい。入力部203は、具体的には、たとえば図1に示したキーボード111、マウス112、ネットワークI/F113によってその機能を実現する。
The
算出部204は、ノードリストに示されているノードごとに、入力部203によって入力された検索条件の合致度を示すスコアを算出する。たとえば、スコア(TF−IDF)は、以下算出式(1)により求めることができる。
The
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
特定部205は、ノードリストに示されたノードごとに、位置情報を参照して、ノードリストに示されているノードの中から、当該ノードが属する親ノードを特定する。たとえば、ノードのインデックスと親ノードのインデックスとの差分値が位置情報とされた場合、ノードのインデックスと位置情報とから、親ノードのインデックスを特定する。たとえば、インデックス「1006」が付与されたノードの位置情報が「4」である場合、特定部205は、インデックス「1002」が付与されたノードを、インデックス「1006」が付与されたノードの親ノードとして特定する。特定部205は、具体的には、たとえば図1に示したROM102、RAM103、HD105、FD107に記憶されたプログラムをCPU101が実行することによってその機能を実現する。
The identifying
加算部206は、ノードリストに示されたノードごとに、当該ノードのスコアに基づく加算値を、特定部205によって特定された親ノードのスコアに加算する。加算部206は、ノードリストに示された下位のノードから順に、すなわち、インデックス値の逆順に、ノードのスコアに基づく加算値を、親ノードのスコアに加算する。特に、加算部206は、ノードリストの最後尾(XML構造の最右端)から、順に親ノードに向かってスコアまたは加算値を加算することが好ましい。この処理はワンパスで走査が可能であり、メモリ領域に収まるサイズならば、非常に高速に処理できる。
For each node indicated in the node list, the adding
たとえば、パス「A/B/D」によって特定されるノードのスコアが「5」であり、このノードが属する親ノード「A/B」のスコアが「5」であった場合、加算部206による加算処理によって、ノード「A/B」のスコアは「10」となる。
For example, when the score of the node specified by the path “A / B / D” is “5” and the score of the parent node “A / B” to which this node belongs is “5”, the
なお、加算部206は、ノードリストに示されたノードごとに、当該ノードのスコアと当該ノードの位置情報とを用いて加算値を算出し、算出した加算値を特定部205によって特定された親ノードのスコアに加算してもよい。たとえば、加算値(ADD)は、以下算出式(2)により求めるようにしてもよい。
The adding
ADD=SCORE/log(OFFSET+1.1)・・・(2) ADD = SCORE / log (OFFSET + 1.1) (2)
上記算出式(2)において、SCOREは、ノードのスコアを示す。また、OFFSETは、位置情報を示す。上記算出式(2)によって算出された値を加算値とすることにより、親ノードとの距離が離れたノードほど、親ノードとの関連度が低いノードとして扱い、スコアを減じることができる。 In the calculation formula (2), SCORE indicates a score of a node. OFFSET indicates position information. By using the value calculated by the calculation formula (2) as an added value, a node that is farther from the parent node can be treated as a node having a lower degree of association with the parent node, and the score can be reduced.
なお、加算部206は、上記以外の算出式を用いて加算値を算出してもよい。たとえば、加算部206は、ノードのスコアとノードの大きさとを用いて加算値を算出し、算出した加算値を特定部205によって特定された親ノードのスコアに加算してもよい。また、加算部206は、ノードのスコアとノードの大きさとノードの位置情報とを用いて加算値を算出し、算出した加算値を特定部205によって特定された親ノードのスコアに加算してもよい。
The adding
加算部206は、具体的には、たとえば図1に示したROM102、RAM103、HD105、FD107に記憶されたプログラムをCPU101が実行することによってその機能を実現する。
Specifically, the adding
選択部207は、加算部206による加算後のスコアに基づいて、ノードリストに示されたノードの中から、検索結果として出力するノードを選択する。たとえば、選択部207は、加算部206による加算後のスコアに基づいて、ノードリストに示されたノードを検索条件の合致度順にソートする。そして、選択部207は、スコアの高いノードから順に、ソート後のノードリストの中から、合致度の高いノードを所定数選択する。
The
なお、選択部207によって選択されるノードの数は、あらかじめ設定されていてもよく、ユーザによって指定されたものであってもよい。選択部207は、具体的には、たとえば図1に示したROM102、RAM103、HD105、FD107に記憶されたプログラムをCPU101が実行することによってその機能を実現する。
Note that the number of nodes selected by the
出力部208は、選択部207によって選択されたノードを出力する。たとえば、出力部208は、選択部207によって選択されたノードを、検索条件の合致度が高い順に表示する。なお、出力部208は、選択部207によって選択されたノードを表示するだけでなく、たとえば、ファイルに出力したり、文書検索装置100と接続された他の装置へ送信してもよい。たとえば、検索条件が他の装置から送信された場合、検索条件の送信元の装置へ送信してもよい。出力部208は、具体的には、たとえば図1に示したディスプレイ110、ネットワークI/F113によってその機能を実現する。
The
(XML文書の一例)
つぎに、この発明の実施の形態にかかる文書検索装置100に用いられるXML文書の一例について説明する。図3は、この発明の実施の形態にかかる文書検索装置100に用いられるXML文書の一例を示す説明図である。
(Example of XML document)
Next, an example of an XML document used in the
図3は、木構造にモデル化されたXML文書「c:¥documents¥0123.xml」を示したものである。図3において、「1001」〜「1013」は要素ノードを示し、各数字はそのインデックスを示す。また、「A」〜「E」はテキストノードを示し、各英字はそのインデックスを示す。 FIG. 3 shows an XML document “c: ¥ documents ¥ 0123.xml” modeled in a tree structure. In FIG. 3, “1001” to “1013” indicate element nodes, and each numeral indicates an index thereof. “A” to “E” indicate text nodes, and each alphabetic character indicates its index.
図3において、たとえば、インデックス「1004」が付与された要素ノードには、インデックス「A」が付与されたテキストノードが属している。また、インデックス「A」が付与されたテキストノードは、テキスト「XML,scheme」を持つ。たとえば、このテキストノードをタグを用いて示した場合、「<article><body><sec><p1>XML,scheme</p1></sec></body></article>」と示すことができる。 In FIG. 3, for example, a text node with index “A” belongs to an element node with index “1004”. The text node to which the index “A” is assigned has the text “XML, scheme”. For example, when this text node is indicated by using a tag, it is indicated as “<article> <body> <sec> <p1> XML, scheme </ p1> </ sec> </ body> </ article>”. Can do.
(ノードリストの生成手順)
つぎに、生成部202によるノードリストの生成手順について説明する。図4は、生成部202によるノードリストの生成手順の一例を示すフローチャートである。
(Node list generation procedure)
Next, a node list generation procedure by the
まず、木構造にモデル化されたXML文書の中から、ルートの要素ノードを選択する(ステップS401)。たとえば、図3に示したXML文書の場合、インデックス「1001」が付与された要素ノードが選択される。 First, a root element node is selected from an XML document modeled in a tree structure (step S401). For example, in the case of the XML document shown in FIG. 3, the element node assigned with the index “1001” is selected.
つぎに、ステップS401で選択された要素ノードをノードリストに追加する(ステップS402)。ここで、ノードリストに追加される情報は、要素ノードのインデックスやパスなどである。たとえば、図3に示したXML文書におけるインデックス「1001」が付与された要素ノードの場合は、インデックス「1001」やパス「/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 to which the index “1001” in the XML document shown in FIG. 3 is assigned, the index “1001”, the path “/ article”, and the like are added to the node list.
つぎに、位置情報をノードリストに追加する(ステップS403)。たとえば、位置情報は、選択されたノードのインデックスから親ノードのインデックスを減算することによって求めることができる。たとえば、図3に示したXML文書におけるインデックス「1001」が付与された要素ノードの場合は、親ノードが存在しないことから、位置情報として「0」が求められる。また、図3に示したXML文書におけるインデックス「1006」が付与された要素ノードの場合は、親ノードのインデックスが「1002」であることから、位置情報として「4」が求められる。 Next, position information is added to the node list (step S403). For example, the location information can be determined by subtracting the index of the parent node from the index of the selected node. For example, in the case of an element node to which the index “1001” in the XML document shown in FIG. 3 is assigned, “0” is obtained as position information because there is no parent node. In the case of the element node to which the index “1006” in the XML document shown in FIG. 3 is assigned, “4” is obtained as the position information because the index of the parent node is “1002”.
つぎに、選択された要素ノードにテキストノードが属しているか否かを判断する(ステップS404)。たとえば、図3に示したXML文書におけるインデックス「1001」が付与された要素ノードの場合は、テキストノードが属していないと判断され、インデックス「1004」が付与された要素ノードの場合は、テキストノードが属していると判断される。 Next, it is determined whether or not a text node belongs to the selected element node (step S404). For example, in the case of an element node to which the index “1001” in the XML document shown in FIG. 3 is assigned, it is determined that the text node does not belong, and in the case of an element node to which the index “1004” is assigned, the text node Is determined to belong.
ステップS404において、テキストノードが属していると判断した場合(ステップS404:Yes)は、選択された要素ノードと、この要素ノードに属しているテキストノードとの関連付けをおこなって(ステップS405)、ステップS406へ進む。 If it is determined in step S404 that the text node belongs (step S404: Yes), the selected element node is associated with the text node belonging to this element node (step S405). The process proceeds to S406.
ここで、要素ノードに関連付けられる情報は、テキストノードのインデックスやテキストなどである。たとえば、図3に示したXML文書におけるインデックス「1004」が付与された要素ノードには、テキストノードのインデックス「A」やテキスト「XML,scheme」などが関連付けられる。ステップS404において、テキストノードが属していないと判断した場合(ステップS404:No)は、ステップS405を飛ばして、ステップS406へ進む。 Here, the information associated with the element node is a text node index or text. For example, the element node to which the index “1004” in the XML document shown in FIG. 3 is assigned is associated with the text node index “A”, the text “XML, scheme”, and the like. If it is determined in step S404 that the text node does not belong (step S404: No), step S405 is skipped and the process proceeds to step S406.
つぎに、XML文書に含まれる全ての要素ノードが選択されたか否かを判断する(ステップS406)。ステップS406において、全ての要素ノードが選択されたと判断した場合(ステップS406:Yes)は、一連の処理を終了する。一方、ステップS406において、全ての要素ノードが選択されていないと判断した場合(ステップS406:No)は、XML文書の中から、次の要素ノードを選択する(ステップS407)。このとき、より上位ノードを優先する。たとえば、図3に示したXML文書において、要素ノードが選択される順番は、インデックス値の順番とおりとなる。 Next, it is determined whether or not all element nodes included in the XML document have been selected (step S406). If it is determined in step S406 that all element nodes have been selected (step S406: Yes), the series of processing ends. On the other hand, if it is determined in step S406 that all element nodes have not been selected (step S406: No), the next element node is selected from the XML document (step S407). At this time, the higher order node is prioritized. For example, in the XML document shown in FIG. 3, the order in which element nodes are selected is the order of the index values.
そして、ステップS402に戻り、ステップS406で全てのノードが選択されたと判断されるまで、ステップS402〜ステップS407を繰り返しおこなう。これにより、XML文書に含まれる全ての要素ノードを、上位のノードから順に、ノードリストに追加することができる。また、XML文書に含まれる全てのテキストノードを、それぞれ、ノードリストに示された要素ノードのいずれかと関連付けることができる。また、XML文書に含まれる全ての要素ノードについての親ノードの位置情報を、ノードリストに追加することができる。 Then, the process returns to step S402, and steps S402 to S407 are repeated until it is determined in step S406 that all nodes have been selected. Accordingly, all element nodes included in the XML document can be added to the node list in order from the upper node. Further, all text nodes included in the XML document can be associated with any one of the element nodes shown in the node list. Further, the position information of the parent node for all the element nodes included in the XML document can be added to the node list.
(ノードリストの一例)
つぎに、ノードリストの一例について説明する。図5は、ノードリストの一例を示す説明図である。
(Example of node list)
Next, an example of the node list will be described. FIG. 5 is an explanatory diagram illustrating an example of a node list.
図5に示すノードリスト500は、図4を用いて上述した手順によって、図3に示したXML文書から生成されたノードリストであり、列「index1」,「path」,「index2」,「text」,「parent」によって構成されている。
A
このうち、列「index1」には、要素ノードのインデックスが設定される。また、列「path」には、要素ノードのパスが設定される。そして、列「index2」には、要素ノードと関連付けられているテキストノードのインデックスが設定される。さらに、列「text」には、要素ノードと関連付けられているテキストノードのテキストが設定される。また、列「parent」には、要素ノードが属する親ノードの位置情報が設定される。 Among these, the index of the element node is set in the column “index1”. In the column “path”, a path of an element node 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”. In the column “parent”, position information of a parent node to which the element node belongs is set.
たとえば、図5に示すノードリスト500から、インデックス「1004」が付与されたパス「/article/body/sec/p1」によって示される要素ノードには、インデックス「A」が付与され、かつテキスト「XML,scheme」を含むテキストノードが関連付けられていると判断することができる。また、インデックス「1006」が付与されたパス「/article/body/footer」によって示される要素ノードについての親ノードの位置情報は、「4」であると判断することができる。
For example, from the
このように、ノードリスト500は、要素ノードのインデックス順でソートされているため、元のXML構造を再構成でき、親ノードの情報に容易にアクセスすることが可能である。また、ノードリスト500を参照することにより、各ノードの持つ情報を、親子関係や祖先子孫関係、兄弟関係などを考慮しながら高速に処理を行うことができる。
As described above, since the
(文書検索装置100による文書検索処理の手順)
つぎに、この発明の実施の形態にかかる文書検索装置100による文書検索処理の手順について説明する。図6は、この発明の実施の形態にかかる文書検索装置100による文書検索処理の手順の一例を示すフローチャートである。
(Procedure for document search processing by the document search apparatus 100)
Next, a procedure for document search processing by the
まず、取得部201によって、XML文書を取得して(ステップS601)、生成部202によって、ステップS601で取得されたXML文書からノードリスト(ノード数N)を生成する(ステップS602)。ノードリストの具体的な生成手順については図4を用いて上述したとおりである。
First, the
つぎに、入力部203によって、検索条件の入力を受け付けて(ステップS603)、算出部204によって、ステップS602で生成されたノードリストに示されている全てのノードに対し、ステップS603で入力された検索条件に基づいた、検索条件の合致度を示すスコアを算出する(ステップS604)。
Next, input of the search condition is accepted by the input unit 203 (step S603), and the
続いて、特定部205によって、ステップS602で生成されたノードリストに示されている上位からi番目(i=N...1)のノードを選択して(ステップS605)、ステップS605で選択されたノードについて、親ノードを特定する(ステップS606)。
Subsequently, the
そして、加算部206によって、ステップS605で選択されたノードのスコアを、ステップS606で特定された親ノードのスコアに加算して(ステップS607)、ステップS608へ進む。
Then, the
続いて、ステップS602で生成されたノードリストに示されているノードが全て選択されたか否かを判断する(ステップS608)。ステップS608において、ノードが全て選択されていないと判断した場合(ステップS608:No)は、ステップS608においてノードが全て選択されたと判断されるまで、ステップS605〜ステップS608を繰り返しおこなう。 Subsequently, it is determined whether 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による加算後のスコアに基づいて、ノードリストに示されたノードを検索条件の合致度順にソートして(ステップS609)、ソートされたノードの中から、合致度の高いノードを所定のノード数選択する(ステップS610)。
On the other hand, if it is determined in step S608 that all the nodes have been selected (step S608: Yes), the
そして、出力部208によって、ステップS610で選択されたノードを出力して(ステップS611)、一連の処理を終了する。
Then, the
(算出部204によって算出されたスコアの一例)
つぎに、算出部204によって算出されたスコアの一例について説明する。図7は、算出部204によって算出されたスコアの一例を示す説明図である。
(Example of score calculated by calculation unit 204)
Next, an example of the score calculated by the
図7は、図5に示したノードリスト500と、算出部204によって算出された各要素ノードのスコアを示すスコアリスト700との関連付けを示したものである。図7に示すスコアリスト700において、列「score1」には、算出部204によって算出されたスコアが設定されている。このときの、算出処理に用いられた検索文字列は「XML,tag,scheme」である。
FIG. 7 shows the association between the
たとえば、ノードリスト500およびスコアリスト700から、インデックス「1004」が付与されたパス「/article/body/sec/p1」によって示される要素ノードには、算出部204によって算出されたスコア「38」が関連付けられていると判断することができる。ここで、このスコア「38」は以下のTF−IDF算出式(3)によって算出されたものである。
For example, from the
38(TFIDF:スコア)=1(TF:テキストノード内における検索文字列「XML」の出現数)×20(IDF:log(全テキストノード数/検索文字列「XML」を含むテキストノード数))+1(TF:テキストノード内における検索文字列「scheme」の出現数)×18(IDF:log(全テキストノード数/検索文字列「scheme」を含むテキストノード数))・・・(3) 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: number of occurrences of the search character string “scheme” in the text node) × 18 (IDF: log (total number of text nodes / number of text nodes including the search character string “scheme”)) (3)
また、ノードリスト500、スコアリスト700から、インデックス「1005」が付与されたパス「/article/body/sec/p2」によって示される要素ノードには、算出部204によって算出されたスコア「80」が関連付けられていると判断することができる。ここで、このスコア「80」は以下のTF−IDF算出式(4)によって算出されたものである。
Further, from the
80(TFIDF:スコア)=2(TF:テキストノード内における検索文字列「tag」の出現数)×40(IDF:log(全テキストノード数/検索文字列「tag」を含むテキストノード数))・・・(4) 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”)) ... (4)
(加算部206によって加算されたスコアの一例)
つぎに、加算部206によって加算されたスコアの一例について説明する。図8は、加算部206によって加算されたスコアの一例を示す説明図である。
(Example of score added by adding unit 206)
Next, an example of the score added by the adding
図8は、図5に示したノードリスト500と、図7に示したスコアリスト700と、加算部206による加算後のスコアを示すスコアリスト800と、の関連付けを示したものである。図8に示すスコアリスト800において、列「score2」には、加算部206によって加算されたスコアが設定されている。
FIG. 8 shows the association between the
たとえば、スコアリスト800から、インデックス「1011」が付与されたパス「/article/body/sec/title/name」によって示される要素ノードには、加算部206によって加算されたスコア「66」が関連付けられていると判断することができる。ここで、このスコア「66」は、この要素ノードに属する、インデックス「1012」が付与された要素ノードのスコア「22」と、インデックス「1013」が付与された要素ノードのスコア「44」とが加算されたものである。
For example, the score “66” added by the adding
(加算部206によって加算されたスコアの他の一例)
つぎに、加算部206によって加算されたスコアの他の一例について説明する。図9は、加算部206によって加算されたスコアの他の一例を示す説明図である。
(Another example of the score added by the adding unit 206)
Next, another example of the score added by the adding
図9は、図5に示したノードリスト500と、図7に示したスコアリスト700と、加算部206による加算後のスコアを示すスコアリスト900と、の関連付けを示したものである。図9に示すスコアリスト900において、列「score2」には、加算部206によって加算されたスコアが設定されている。
FIG. 9 shows the association between the
たとえば、スコアリスト900から、インデックス「1011」が付与されたパス「/article/body/sec/title/name」によって示される要素ノードには、加算部204によって加算されたスコア「44」が関連付けられていると判断することができる。ここで、このスコア「44」は、この要素ノードに属する、インデックス「1012」が付与された要素ノードのスコア「22」から図2を用いて説明した算出式(2)により算出された加算値「20」と、インデックス「1013」が付与された要素ノードのスコア「44」から上記算出式(2)により差出された加算値「24」とが加算されたものである。
For example, the score “44” added by the adding
(出力部208によって出力された検索結果の一例)
つぎに、出力部208によって出力された検索結果の一例について説明する。図10は、出力部208によって出力された検索結果の一例を示す説明図である。
(Example of search result output by output unit 208)
Next, an example of the search result output by the
図10は、図3に示したXML文書に対して、図6を用いて上述した手順による文書検索処理がおこなわれた結果、出力部208によって出力された検索結果を示すものである。図10に示すように、文書検索処理をおこなうにあたり、検索対象文書「c:¥documents¥0123.xml」、検索条件「XML,tag,scheme」、検索数「3(件)」がユーザによって指定されている。
FIG. 10 shows the search result output by the
そして、「検索」ボタンが押下されたことにより、検索対象文書「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 that are selected from “” and have the highest matching degree of the search conditions are output as the search results.
以上説明したように、本実施の形態にかかる文書検索装置100によれば、ノードリストに示されたノードごとに、当該ノードのスコアに基づく加算値を、親ノードのスコアに加算し、加算後のスコアに基づいて、ノードリストに示されたノードの中から、検索結果として出力するノードを選択する構成とした。このため、階層構造化された文書セットの中から、適切な要素を検索することができる。
As described above, according to the
また、本実施の形態にかかる文書検索装置100によれば、ノードリストに示された下位のノードから順に、ノードのスコアに基づく加算値を、親ノードのスコアに加算する構成とした。特に、位置情報を参照して、親ノードを特定する構成とした。このため、階層構造化された文書セットの中から、適切な要素を短時間で検索することができる。
In addition, according to the
なお、この発明にかかる文書検索方法、文書検索装置および文書検索プログラムは、階層構造化された文書セットであれば、XML文書以外の文書に対する文書検索にも適用することができる。また、ファイル化された文書に限らず、たとえば、データベース化された文書に対する文書検索にも適用することができる。さらに、単独のファイルにファイル化された文書や単独のデータベースにデータベース化された文書に限らず、複数のファイルにファイル化された文書や、複数のデータベースにデータベース化された文書に対する文書検索にも適用することができる。 Note that the document search method, document search apparatus, 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 storage 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 storage medium by the computer. Further, this program may be a transmission medium that can be distributed via a network such as the Internet.
以上のように、本発明にかかる文書検索方法、文書検索装置および文書検索プログラムは、階層構造化された文書セットから、任意の検索条件に合致するノードを検索するパーソナル・コンピュータ、ドキュメントサーバ、文書検索ソフトウェアなどへの利用に適している。 As described above, the document search method, document search apparatus, and document search program according to the present invention are a personal computer, a document server, and a document that search for a node that matches an arbitrary search condition from a hierarchically structured document set. Suitable for use in search software.
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 出力部
500 ノードリスト
700 スコアリスト
800 スコアリスト
900 スコアリスト
100
102 ROM
103 RAM
104 HDD
105 HD
106 FDD
107 FD
108 CD-
110
114
Claims (10)
前記取得工程によって取得された文書セットから、当該文書セットに含まれたノードごとに当該ノードが属する親ノードの位置を示す位置情報を含む、ノードリストを生成する生成工程と、
任意の検索条件の入力を受け付ける入力工程と、
前記ノードリストに示されたノードごとに、前記検索条件の合致度を示すスコアを算出する算出工程と、
前記ノードリストに示されたノードごとに、前記位置情報を参照して、前記ノードリストに示されているノードの中から、当該ノードが属する親ノードを特定する特定工程と、
前記ノードリストに示されたノードごとに、当該ノードのスコアに基づく加算値を、前記特定工程によって特定された親ノードのスコアに加算する加算工程と、
前記加算工程による加算後のスコアに基づいて、前記ノードリストに示されたノードの中から、検索結果として出力するノードを選択する選択工程と、
前記選択工程によって選択されたノードを出力する出力工程と、
を含んだことを特徴とする文書検索方法。 An acquisition process for acquiring a hierarchically structured document set;
A generation step of generating a node list including position information indicating a position of a parent node to which the node belongs for each node included in the document set from the document set acquired by the acquisition step;
An input process for receiving input of an arbitrary search condition;
A calculation step of calculating a score indicating the degree of match of the search condition for each node indicated in the node list;
For each node indicated in the node list, referring to the location information, a specifying step for specifying a parent node to which the node belongs from among the nodes indicated in the node list;
For each node indicated in the node list, an addition step of adding an addition value based on the score of the node to the score of the parent node identified by the identification step;
A selection step of selecting a node to be output as a search result from the nodes indicated in the node list based on the score after the addition in the addition step;
An output step of outputting the node selected by the selection step;
A document retrieval method characterized by including
前記ノードリストに示されたノードごとに、当該ノードのインデックスと当該ノードが属する親ノードのインデックスとの差分値を、前記位置情報として前記ノードリストに含めることを特徴とする請求項1に記載の文書検索方法。 The generation step includes
The difference value between the index of the node and the index of a parent node to which the node belongs is included in the node list as the position information for each node indicated in the node list. Document search method.
前記ノードリストに示された下位のノードから順に、前記ノードのスコアに基づく加算値を、前記親ノードのスコアに加算することを特徴とする請求項1または2に記載の文書検索方法。 The adding step includes
The document search method according to claim 1, wherein an addition value based on a score of the node is added to a score of the parent node in order from a lower node shown in the node list.
前記取得手段によって取得された文書セットから、当該文書セットに含まれたノードごとに当該ノードが属する親ノードの位置を示す位置情報を含む、ノードリストを生成する生成手段と、
任意の検索条件の入力を受け付ける入力手段と、
前記ノードリストに示されたノードごとに、前記検索条件の合致度を示すスコアを算出する算出手段と、
前記ノードリストに示されたノードごとに、前記位置情報を参照して、前記ノードリストに示されているノードの中から、当該ノードが属する親ノードを特定する特定手段と、
前記ノードリストに示されたノードごとに、当該ノードのスコアに基づく加算値を、前記特定手段によって特定された親ノードのスコアに加算する加算手段と、
前記加算手段による加算後のスコアに基づいて、前記ノードリストに示されたノードの中から、検索結果として出力するノードを選択する選択手段と、
前記選択手段によって選択されたノードを出力する出力手段と、
を備えたことを特徴とする文書検索装置。 An acquisition means for acquiring a hierarchically structured document set;
Generating means for generating a node list including position information indicating a position of a parent node to which the node belongs, for each node included in the document set, from the document set acquired by the acquiring means;
An input means for receiving input of an arbitrary search condition;
Calculating means for calculating a score indicating the degree of match of the search condition for each node indicated in the node list;
For each node shown in the node list, referring to the position information, a specifying unit for specifying a parent node to which the node belongs from among the nodes shown in the node list;
For each node indicated in the node list, an adding means for adding an added value based on the score of the node to the score of the parent node specified by the specifying means;
Selection means for selecting a node to be output as a search result from the nodes indicated in the node list based on the score after addition by the addition means;
Output means for outputting the node selected by the selection means;
A document retrieval apparatus comprising:
前記取得工程によって取得された文書セットから、当該文書セットに含まれたノードごとに当該ノードが属する親ノードの位置を示す位置情報を含む、ノードリストを生成する生成工程と、
任意の検索条件の入力を受け付ける入力工程と、
前記ノードリストに示されたノードごとに、前記検索条件の合致度を示すスコアを算出する算出工程と、
前記ノードリストに示されたノードごとに、前記位置情報を参照して、前記ノードリストに示されているノードの中から、当該ノードが属する親ノードを特定する特定工程と、
前記ノードリストに示されたノードごとに、当該ノードのスコアに基づく加算値を、前記特定工程によって特定された親ノードのスコアに加算する加算工程と、
前記加算工程による加算後のスコアに基づいて、前記ノードリストに示されたノードの中から、検索結果として出力するノードを選択する選択工程と、
前記選択工程によって選択されたノードを出力する出力工程と、
をコンピュータに実行させることを特徴とする文書検索プログラム。 An acquisition process for acquiring a hierarchically structured document set;
A generation step of generating a node list including position information indicating a position of a parent node to which the node belongs for each node included in the document set from the document set acquired by the acquisition step;
An input process for receiving input of an arbitrary search condition;
A calculation step of calculating a score indicating the degree of match of the search condition for each node indicated in the node list;
For each node indicated in the node list, referring to the location information, a specifying step for specifying a parent node to which the node belongs from among the nodes indicated in the node list;
For each node indicated in the node list, an addition step of adding an addition value based on the score of the node to the score of the parent node identified by the identification step;
A selection step of selecting a node to be output as a search result from the nodes indicated in the node list based on the score after the addition in the addition step;
An output step of outputting the node selected by the selection step;
Document search program characterized by causing a computer to execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007300750A JP2009129013A (en) | 2007-11-20 | 2007-11-20 | Method, device, and program for retrieving document |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007300750A JP2009129013A (en) | 2007-11-20 | 2007-11-20 | Method, device, and program for retrieving document |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009129013A true JP2009129013A (en) | 2009-06-11 |
Family
ID=40819906
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007300750A Pending JP2009129013A (en) | 2007-11-20 | 2007-11-20 | Method, device, and program for retrieving document |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009129013A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017037352A (en) * | 2015-08-06 | 2017-02-16 | 富士ゼロックス株式会社 | Information processing apparatus and program |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0484271A (en) * | 1990-07-26 | 1992-03-17 | Nippon Telegr & Teleph Corp <Ntt> | Intra-information retrieval device |
WO2006036376A1 (en) * | 2004-09-27 | 2006-04-06 | Google Inc. | Presentation of search results based on document structure |
-
2007
- 2007-11-20 JP JP2007300750A patent/JP2009129013A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0484271A (en) * | 1990-07-26 | 1992-03-17 | Nippon Telegr & Teleph Corp <Ntt> | Intra-information retrieval device |
WO2006036376A1 (en) * | 2004-09-27 | 2006-04-06 | Google Inc. | Presentation of search results based on document structure |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017037352A (en) * | 2015-08-06 | 2017-02-16 | 富士ゼロックス株式会社 | Information processing apparatus and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5492187B2 (en) | Search result ranking using edit distance and document information | |
US9454599B2 (en) | Automatic definition of entity collections | |
US8745039B2 (en) | Method and system for user guided search navigation | |
JP5187313B2 (en) | Document importance calculation system, document importance calculation method, and program | |
JP5550669B2 (en) | SEARCH DEVICE, SEARCH METHOD, AND PROGRAM | |
US20080172380A1 (en) | Information retrieval based on information location in the information space. | |
JP7252914B2 (en) | Method, apparatus, apparatus and medium for providing search suggestions | |
EP2394228A1 (en) | Method and apparatus for real time text analysis and text navigation | |
CN103838876B (en) | Use the document retrieval method and system of phonetic retrieval file | |
US20150100605A1 (en) | Determining collection membership in a data graph | |
JP2007219722A (en) | Document retrieval server and document retrieval method | |
US20120179709A1 (en) | Apparatus, method and program product for searching document | |
US20100082594A1 (en) | Building a topic based webpage based on algorithmic and community interactions | |
KR20110133909A (en) | Semantic dictionary manager, semantic text editor, semantic term annotator, semantic search engine and semantic information system builder based on the method defining semantic term instantly to identify the exact meanings of each word | |
Diewald et al. | Krill: KorAP search and analysis engine | |
JP2008146209A (en) | Document retrieval device, document retrieval method and document retrieval program | |
JP2012141681A (en) | Query segment position determining device | |
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 | |
JP2009129013A (en) | Method, device, and program for retrieving document | |
JP2019003406A (en) | Information collecting device, information collecting method, and information collecting program | |
JP2009129280A (en) | Method, device, and program for retrieving document | |
JP2009223679A (en) | Electronic document search device and electronic document search program | |
JP2011022624A (en) | System, method, server and program for retrieving web page | |
JP2006163645A (en) | Method, device and program for retrieving information, computer readable recording medium and device recorded with the program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20101116 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120906 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120911 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20130122 |