JP4489034B2 - Structured document processing apparatus, structured document processing method, and structured document processing program - Google Patents
Structured document processing apparatus, structured document processing method, and structured document processing program Download PDFInfo
- Publication number
- JP4489034B2 JP4489034B2 JP2006045808A JP2006045808A JP4489034B2 JP 4489034 B2 JP4489034 B2 JP 4489034B2 JP 2006045808 A JP2006045808 A JP 2006045808A JP 2006045808 A JP2006045808 A JP 2006045808A JP 4489034 B2 JP4489034 B2 JP 4489034B2
- Authority
- JP
- Japan
- Prior art keywords
- character string
- structured document
- frequency
- holding
- frequent
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、構造化された文書を処理する構造化文書処理装置、構造化文書処理方法および構造化文書処理プログラムに関するものである。 The present invention relates to a structured document processing apparatus, a structured document processing method, and a structured document processing program for processing a structured document.
近年、コンピュータでの文書データの管理や処理を容易にするために、地の文書中に文書の構造を示す「タグ」が付加された文書(構造化文書)が広く用いられている。そして、この構造化文書を記述するための規約として、SGML(Standard Generalized Markup Language)やXML(eXtensible Markup Language)などの構造化文書規約の標準化が進められている。 In recent years, in order to facilitate the management and processing of document data on a computer, a document (structured document) in which a “tag” indicating a document structure is added to a local document has been widely used. Then, standardization of structured document conventions such as SGML (Standard Generalized Markup Language) and XML (extensible Markup Language) is being promoted as a convention for describing this structured document.
このような構造化文書規約に基づいて記述された構造化文書では、タグにより区分されたテキストを検索の単位として、例えば、文書データ中の「見出し」というタグが付加されたテキストに特定のキーワードが含まれている文書データを検出するなど文書データの構造を利用した検索が可能になる(例えば、「特許文献1」参照)。
In a structured document described based on such a structured document convention, for example, a specific keyword is added to text with a tag “headline” in document data, using the text divided by the tag as a search unit. Can be retrieved using the structure of the document data, for example, by detecting document data that includes the text (see, for example, “
このため、このような構造化文書規約を利用すれば、複数の構造化文書を含むデータベースから、文書内の指定した構造にユーザ所望のキーワードを含む文書データを検索することができ、より目的に適切な文書の検索が可能になる。 For this reason, if such structured document rules are used, it is possible to search document data including a keyword desired by a user in a specified structure in a document from a database including a plurality of structured documents. Search for appropriate documents.
また、大量文書データからのキーワードを含む文書データの検索において、転置ファイル方式が利用されている(例えば、「特許文献2」参照)。転置ファイル方式は、検索処理の高速化を図るものである。しかし欠点もあり、検索キーワードによっては全文書内での出現頻度が大量の場合があり、その際の検索処理コストは頻度に応じて高くなる。中でも、索引情報を外部記憶装置から読み出すコストが顕著に高く現れてしまう。
In addition, a transposition file method is used in searching document data including a keyword from a large amount of document data (see, for example, “
構造を指定した検索処理を行う際に、キーワードが高頻度の場合には、転置ファイル方式を含む従来の方式においては索引情報の読込みのコストが高くなる。このため、実際の該当件数が少なくとも処理コストが高くなるという問題があった。 When performing a search process designating a structure, if keywords are frequently used, the cost of reading index information is high in the conventional method including the inverted file method. For this reason, there has been a problem that the actual number of hits at least increases the processing cost.
索引をさらに構造で細分化して管理することにより、構造を指定した検索処理の処理件数を押さえ処理コスト低減を行うことも考えられる。しかし、構造の複雑さだけ索引の管理コストが高くなること、索引の格納効率も低下すること、効果に対するリソースの消費が著しい事などが予想されるため現実的ではない。また、構造による細分化によって、構造を指定しない場合または複数の構造を指定した場合の性能劣化も予想される。 It is also conceivable to further reduce the processing cost by controlling the index by further subdividing the index into the structure, thereby suppressing the number of search processes that specify the structure. However, it is not realistic because it is expected that the management cost of the index will increase due to the complexity of the structure, the storage efficiency of the index will decrease, and the consumption of resources for the effect will be significant. Further, due to segmentation by structure, performance degradation is expected when the structure is not designated or when a plurality of structures are designated.
本発明は、上記に鑑みてなされたものであって、検索処理コストを抑えつつ、目的に適合した文書を検索することのできる構造化文書処理装置、構造化文書処理方法および構造化文書処理プログラムを提供することを目的とする。 The present invention has been made in view of the above, and provides a structured document processing apparatus, a structured document processing method, and a structured document processing program capable of searching for a document suitable for a purpose while suppressing search processing costs. The purpose is to provide.
本発明の一側面は、構造化文書処理装置に係り、木構造で表現される複数の構造化文書を保持する構造化文書保持手段と、前記構造化文書保持手段が保持する前記構造化文書に含まれる文字列と、当該文字列の前記複数の構造化文書における出現頻度である文字列頻度とを対応付けて保持する文字列頻度保持手段と、前記文字列頻度保持手段に保持されている前記文字列のうち、前記文字列頻度が予め設定された閾値以上の頻出文字列に対し、当該頻出文字列と、前記構造化文書の木構造において当該頻出文字列が現れる位置を示す構造IDとを索引キーとし、当該索引キーに対応付けて、当該索引キーにより特定されるべき文字列を識別するための索引情報を保持する索引情報保持手段と、前記文字列頻度保持手段が保持する前記文字列うち、前記文字列頻度が予め定められた閾値以上である頻出文字列を抽出する頻出文字列抽出手段と、前記頻出文字列抽出手段が抽出した前記頻出文字列の前記構造IDを特定する構造ID特定手段とを備え、前記構造ID特定手段は、前記頻出文字列のうち、予め定められた条件に適合する複数の構造IDに対し、当該複数の構造IDを含むグループを識別するグループ識別情報を付与し、前記索引情報保持手段は、前記構造ID特定手段により特定された前記構造IDを前記索引キーとして保持し、前記グループに含まれる前記頻出文字列については、前記索引キーの前記構造IDとして前記グループ識別情報を保持することを特徴とする。One aspect of the present invention relates to a structured document processing apparatus, comprising: a structured document holding unit that holds a plurality of structured documents expressed in a tree structure; and the structured document held by the structured document holding unit. A character string frequency holding unit that holds a character string included in association with a character string frequency that is an appearance frequency of the character string in the plurality of structured documents, and the character string frequency holding unit holds the character string frequency Among the character strings, for a frequent character string having the character string frequency equal to or higher than a preset threshold, the frequent character string and a structure ID indicating a position where the frequent character string appears in the tree structure of the structured document. An index information holding unit that holds index information for identifying a character string that is to be specified by the index key in association with the index key, and the character string that the character string frequency holding unit holds U , A frequent character string extracting means for extracting a frequent character string having a character string frequency equal to or higher than a predetermined threshold, and a structure ID specifying for identifying the structure ID of the frequent character string extracted by the frequent character string extracting means The structure ID specifying means assigns group identification information for identifying a group including the plurality of structure IDs to a plurality of structure IDs that meet a predetermined condition in the frequent character string. The index information holding means holds the structure ID specified by the structure ID specifying means as the index key, and the frequent character string included in the group is used as the structure ID of the index key. It holds group identification information.
本発明によれば、頻出文字列についても、検索処理コストを抑えつつ、適合した文書を検索することができるという効果を奏する。 According to the present invention , it is possible to search for a suitable document while reducing the search processing cost even with respect to a frequent character string.
以下に、本発明にかかる構造化文書処理装置、構造化文書処理方法および構造化文書処理プログラムの実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。 Embodiments of a structured document processing apparatus, a structured document processing method, and a structured document processing program according to the present invention will be described below in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.
図1は、実施の形態にかかる構造化文書処理装置10の全体構成を示すブロック図である。構造化文書処理装置10は、構造化文書取得部102と、文字列抽出部104と、文字列頻度算出部106と、頻出文字列抽出部108と、構造ID特定部110と、構造ID頻度算出部112と、索引登録部114と、構造化文書データベース(DB)120と、文字列頻度DB122と、構造ID頻度DB124と、索引DB126と、検索条件取得部130と、キーワード文字列抽出部132と、検索部134と、構造化文書抽出部136と、構造化文書出力部138とを備えている。
FIG. 1 is a block diagram illustrating an overall configuration of a structured
構造化文書取得部102は、外部から構造化文書を取得する。ここで、構造化文書について説明する。図2は、構造化文書を説明するための図である。ここでは、XMLを構造化文書規約として記述された構造化文書の例を示す。なお、構造化文書は、XMLを構造化文書規約とするものに限定されるものではなく、例えば、SGMLなどの他の構造化文書であってもよい。
The structured
図2に示すように、XMLにおいては、地の文に「タグ」が付加されている。図2に示す例では、「<doc>」、「</doc>」、「<title>」および「<p>」などがタグである。この「タグ」により、文書データが構造化されている。XMLにおいては、タグは、タグの内容を表す名称を「<」と「>」で囲むことによって表現される。 As shown in FIG. 2, in XML, a “tag” is added to a sentence in the ground. In the example illustrated in FIG. 2, “<doc>”, “</ doc>”, “<title>”, “<p>”, and the like are tags. The document data is structured by the “tag”. In XML, a tag is expressed by enclosing a name representing the contents of the tag with “<” and “>”.
「<」と「>」に挟まれるタグは開始タグ、「</」と「>」の間に挟まれるタグは終了タグである。テキストを開始タグと終了タグで挟むことにより、そのテキストが構造化される。開始タグと終了タグにより挟まれたテキストをテキスト要素と称する。 A tag sandwiched between “<” and “>” is a start tag, and a tag sandwiched between “</” and “>” is an end tag. By sandwiching the text between a start tag and an end tag, the text is structured. Text between the start tag and the end tag is referred to as a text element.
図2に示す例では、「<title>」と「</title>」とで、「XMLデータベース」というテキストが囲まれている。これにより、このテキストに対して「タイトル」という構造が付与されている。
In the example shown in FIG. 2, the text “XML database” is surrounded by “<title>” and “</ title>”. Thereby, a structure of “title” is given to this text.
図3は、図2に示す構造化文書の構造を概念的に示す図である。このように、図2に示す構造化文書は木構造により表現される。タグによって区分された各テキスト要素が木構造のノードとして表されている。さらに、各タグもノードとして表されている。そして、各ノードには、各ノードを識別する要素IDが付与されている。 FIG. 3 is a diagram conceptually showing the structure of the structured document shown in FIG. In this way, the structured document shown in FIG. 2 is represented by a tree structure. Each text element divided by the tag is represented as a tree-structured node. Furthermore, each tag is also represented as a node. Each node is given an element ID for identifying each node.
例えば、タグ「doc」には、要素ID「1」が付与され、「title」には、要素ID「2」が付与されている。また、テキスト要素「XMLデータベース」には、要素ID「3」が付与されている。このように、要素IDは、構造化文書中の各要素を識別するためのIDである。 For example, an element ID “1” is assigned to the tag “doc”, and an element ID “2” is assigned to “title”. The element ID “3” is assigned to the text element “XML database”. Thus, the element ID is an ID for identifying each element in the structured document.
図4は、構造化文書における構造IDを説明するための図である。各タグ要素および各テキスト要素は、木構造のいずれかの位置に配置されている。この配置位置を識別するのが構造IDである。すなわち、構造IDは「root」からの経路を識別する情報である。 FIG. 4 is a diagram for explaining the structure ID in the structured document. Each tag element and each text element are arranged at any position in the tree structure. The structure ID identifies this arrangement position. That is, the structure ID is information for identifying a route from “root”.
例えば、タグ「doc」には、構造ID「1」が付与され、「title」には、構造ID「2」が付与される。また、「chapter」に含まれる3つの「p(パラグラフ)」はいずれも、「root」からの経路が等しい。そこで、これら3つの「p」には同一の構造ID「5」が付与される。 For example, the structure ID “1” is assigned to the tag “doc”, and the structure ID “2” is assigned to “title”. In addition, the three “p (paragraph)” included in “chapter” have the same route from “root”. Therefore, the same structure ID “5” is assigned to these three “p”.
また、図4に示す構造文書以外の構造文書においても図4に示す構造文書と同様に「root」の枝として「doc」が存在し、さらに「doc」の枝として「title」が存在するとする。この場合には、この「title」に対しても、図4に示す構造文書内の「title」と同一の構造ID、即ち構造ID「2」が付与される。このように、構造IDは、構造化文書によらず、構造化文書内における構造的な位置が同一であれば同一の値となる。 Also, in the structure document other than the structure document shown in FIG. 4, it is assumed that “doc” exists as a branch of “root” and “title” exists as a branch of “doc” similarly to the structure document shown in FIG. . In this case, the same structure ID as the “title” in the structure document shown in FIG. 4, that is, the structure ID “2” is given to this “title”. As described above, the structure ID is the same value if the structural position in the structured document is the same regardless of the structured document.
図5は、構造化文書DB120のデータ構成を模式的に示す図である。このように、構造化文書DB120は、構造化文書と、構造化文書を識別する文書IDとを対応付けて保持している。
FIG. 5 is a diagram schematically showing the data structure of the
図1の文字列抽出部104は、構造化文書DB120に登録されている構造化文書から予め設定されている条件にしたがい文字列を抽出する。そして、抽出した文字列の数を文字列頻度DB122に登録する。
The character
図6は、文字列抽出部104が抽出する文字列を説明するための図である。図6は、1つのテキスト要素を示している。文字列は、このテキスト要素内に含まれる一部の文字列である。例えば、「データ」、「ベース」などが文字列として抽出される。予め設定されている条件とは、例えば、英数文字およびカタカナは3文字単位で抽出し、ひらがなは2文字単位で抽出するなどの条件である。
FIG. 6 is a diagram for explaining a character string extracted by the character
図7は、文字列抽出の処理を説明するための図である。このように、条件に従い所定の文字単位で文字列を抽出する際に、1文字ずつずらして抽出してもよい。これにより文字列の抽出漏れを防止することができる。なお、文字列抽出の方法は、本実施の形態に限定されるものではなく、例えば日本語形態素解析を利用した単語単位で文字列を抽出してもよい。 FIG. 7 is a diagram for explaining the character string extraction process. As described above, when extracting a character string in a predetermined character unit according to the condition, it may be extracted by shifting one character at a time. Thereby, omission of extraction of a character string can be prevented. Note that the method of extracting a character string is not limited to the present embodiment, and for example, a character string may be extracted in units of words using Japanese morphological analysis.
図1に示す文字列頻度算出部106は、文字列抽出部104が特定した各文字列の出現頻度、すなわち文字列頻度を算出する。ここで、文字列頻度とは、構造化文書DB120に登録されている構造化文書において、対象とする文字列が出現する回数である。例えば、構造化文書DB120に複数の構造化文書が登録されている場合には、複数の構造化文書すべてにおいて、対象とする文字列が出現する回数である。
The character string
例えば、図2に示す構造化文書には、「データ」という文字列が4個含まれている。この場合には、文字列頻度は4となる。文字列頻度算出部106はさらに、他の構造化文書に含まれる「データ」という文字列の文字列頻度を加算して、構造化文書DB120に登録されている構造化文書における「データ」という文字列の文字列頻度を算出する。
For example, the structured document shown in FIG. 2 includes four character strings “data”. In this case, the character string frequency is 4. The character string
文字列頻度算出部106は、各文字列の文字列頻度を、文字列に対応付けて文字列頻度DB122に登録する。
The character string
図8は、文字列頻度DB122のデータ構成を模式的に示す図である。文字列抽出部104により抽出された文字列と、各文字列に対し文字列抽出部104が算出した文字列頻度とが対応付けて保持されている。
FIG. 8 is a diagram schematically showing the data configuration of the character
図1に示す頻出文字列抽出部108は、文字列頻度DB122に登録されている文字列頻度に基づいて、頻出文字列を抽出する。ここで、頻出文字列とは、文字列頻度が予め設定された閾値よりも大きい値となる文字列のことである。閾値は例えば、「10000」と設定する。このように閾値は絶対値で設定する。
The frequent character
また、他の例としては、構造化文書DB120に登録されているすべての構造化文書に含まれる文字列の数を基準とした相対的な値を閾値として設定してもよい。例えば、すべての構造化文書に含まれる文字列の数を1とした場合の所定の文字列の数の割合「0.8」を相対的な閾値として設定してもよい。
As another example, a relative value based on the number of character strings included in all structured documents registered in the structured
構造ID特定部110は、構造化文書DB120に保持されている構造化文書に含まれる各頻出文字列の、構造化文書における配置位置、すなわち構造IDを特定する。そして、構造IDを頻出文字列に対応付けて構造ID頻度DB124に登録する。
The structure
構造ID頻度算出部112は、構造ID特定部110が特定した構造IDの出現頻度、すなわち構造ID頻度を算出する。ここで、構造ID頻度とは、構造化文書DB120に登録されている構造文書において、所定の構造IDに配置された所定の頻出文字列の数である。
The structure ID
例えば、図4に示す木構造において「データ」が頻出文字であるとすると、構造ID「5」における「データ」という頻出文字列の構造ID頻度は「3」である。また、構造ID「3」における構造ID頻度は「1」である。さらに、他の構造化文書における同一の構造IDに対する構造ID頻度を加算し、構造ID頻度が算出される。 For example, if “data” is a frequent character in the tree structure shown in FIG. 4, the structure ID frequency of the frequent character string “data” in the structure ID “5” is “3”. The structure ID frequency in the structure ID “3” is “1”. Furthermore, the structure ID frequency is calculated by adding the structure ID frequencies for the same structure ID in other structured documents.
図9は、構造ID頻度DB124のデータ構成を模式的に示す図である。頻出文字列抽出部108により抽出された頻出文字列と、当該頻出文字列が出現する構造IDとが対応付けられている。さらに構造IDには、構造ID頻度が対応付けられている。
FIG. 9 is a diagram schematically illustrating the data configuration of the structure
図1に示す索引登録部114は、文字列頻度DB122および構造ID頻度DB124に登録されている情報に基づいて、索引キーと索引情報を索引DB126に登録する。具体的には、文字列抽出部104が抽出した文字列を索引キーとして登録する。索引情報には、索引キーである文字列を含む構造化文書の文書ID、文字列を含むテキスト要素の要素IDおよびオフセットが含まれる。ここで、オフセットとは、テキスト要素内における文字列の位置を示す情報である。オフセットは、要素内位置情報に相当する。なお、頻出文字列については、文字列と構造IDを索引キーとして登録し、各索引キーに索引情報を対応付けて登録する。
The
このように、索引情報は文字列を特定するための情報なので、索引情報を利用することにより、各文字列を含むテキスト要素、テキスト要素における文字列の位置、文字列を含む構造化文書を特定することができる。さらに、頻出文字列については、文字列と構造IDを検索キーとすることにより、頻出文字列における検索処理コストを抑えることができる。 In this way, the index information is information for specifying a character string. By using the index information, the text element including each character string, the position of the character string in the text element, and the structured document including the character string are specified. can do. Furthermore, for a frequent character string, the search processing cost in the frequent character string can be suppressed by using the character string and the structure ID as a search key.
図10は、オフセットを説明するための図である。図10に示すようにテキスト要素「データベース・・・」においては、先頭文字「デ」をオフセット位置「1」として、順にオフセット位置が定められている。したがって、例えば、文字列「データ」は、テキスト要素中先頭文字から始まる3文字なので、オフセット「1」となる。文字列「ータベ」の先頭文字「ー」は、先頭から2番目の文字なので、文字列「ータベ」のオフセットは「2」となる。 FIG. 10 is a diagram for explaining the offset. As shown in FIG. 10, in the text element “database...”, The offset position is set in order with the first character “de” as the offset position “1”. Therefore, for example, since the character string “data” is three characters starting from the first character in the text element, the offset is “1”. Since the first character “-” of the character string “Tabe” is the second character from the beginning, the offset of the character string “Tabe” is “2”.
索引DB126は、索引テーブルを保持している。より具体的には、文書IDごとのテーブルからなる文書単位索引テーブルと、構造化文書によらずすべての文字列を含む文字列単位索引テーブルとを保持している。
The
図11は、索引DB126が保持する文書IDごとの文書単位索引テーブル127のデータ構成を模式的に示す図である。文書単位索引テーブルは、索引キーとしての文字列と索引情報とを対応付けて保持している。さらに、索引情報には、文書ID、要素IDおよびオフセットが含まれている。なお、文書単位索引テーブルにおいては、同一の索引キーのとしての文字列であっても、文書IDが異なる場合には、それぞれの文字列が索引キーとして登録される。
FIG. 11 is a diagram schematically showing the data configuration of the document unit index table 127 for each document ID held in the
図12は、索引DB126が保持する文字列ごとの文字列単位索引テーブル128のデータ構成を模式的に示す図である。文字列単位索引テーブル128は、図11を参照しつつ説明した文書単位索引テーブル127と同様に、索引キーとしての文字列と、索引情報とを対応付けて保持している。文書単位索引テーブル127は、文書単位のテーブルであるが、文字列単位索引テーブル128においては、同一の文字列が複数の構造化文書に存在する場合には、これらいずれの文字列の検索条件も、索引キーとしての所定の1つの文字列に対応付けられている。したがって、複数の構造化文書を検索対象とすることができ、特定の文字列を含む構造化文書やテキスト要素を容易に検出することができる。
FIG. 12 is a diagram schematically showing the data configuration of the character string unit index table 128 for each character string held in the
文字列単位索引テーブル128においては、頻出文字列は、構造ID単位でさらに分割されており、文字列に加えて構造IDが索引キーとして登録されている。そして、構造IDに対応付けて各索引情報が登録されている。 In the character string unit index table 128, the frequent character strings are further divided in units of structure IDs, and the structure IDs are registered as index keys in addition to the character strings. Each index information is registered in association with the structure ID.
さらに、索引登録部114は、頻出文字列の構造IDのうち構造ID頻度DB124において構造ID頻度が予め設定された閾値よりも小さいものについては、複数の構造IDを1つの構造IDグループとする。そして、この構造IDグループを識別するグループIDを構造IDとして文字列単位索引テーブル128に登録する。これにより、構造IDの種類が多い場合であっても、細分化による管理コストの増加を抑えることができる。
Further, the
図1に示す検索条件取得部130は、入出力装置などを介して検索条件を取得する。ここで、検索条件には、検索キーワードと検索範囲が含まれている。
The search
キーワード文字列抽出部132は、検索条件取得部130が取得した検索条件からキーワード文字列を抽出する。ここで、キーワード文字列とは、キーワードに含まれる文字列である。文字列を抽出する処理は、文字列抽出部104がテキスト要素から文字列を抽出する処理と同様である。
The keyword character
検索部134は、索引DB126において、キーワード文字列抽出部132により抽出されたキーワード文字列に一致する索引キーを検索する。構造化文書抽出部136は、索引DB126において検索部134が特定した索引キーに対応付けられている索引情報により特定される構造化文書を構造化文書DB120から抽出する。構造化文書出力部138は、構造化文書抽出部136により抽出された構造化文書を検索結果として出力する。
The
図13は、構造化文書処理装置10における索引登録処理を示すフローチャートである。まずユーザがマウスやキーボード、ディスプレイモニタなどの入出力装置を利用して構造化文書を入力する。構造化文書処理装置10の構造化文書取得部102は、こうしてユーザから入力された構造化文書を取得する(ステップS100)。
FIG. 13 is a flowchart showing index registration processing in the structured
次に、構造化文書取得部102が取得した構造化文書は、構造化文書IDと対応付けて構造化文書DB120に登録される(ステップS102)。次に、文字列抽出部104は、構造化文書DB120に登録されている各構造化文書から文字列を抽出する(ステップS104)。抽出された文字列は、索引キーとして、索引情報とともに文書単位索引テーブル127に登録される。次に、文字列頻度算出部106は、文字列抽出部104により抽出された各文字列の文字列頻度を算出する(ステップS106)。各文字列と文字列頻度とが対応付けられて文字列頻度DB122に登録される(ステップS108)。
Next, the structured document acquired by the structured
次に、頻出文字列抽出部108は、文字列頻度DB122に登録されている文字列の文字列頻度に基づいて、頻出文字列を抽出する(ステップS110)。次に、構造ID特定部110は、頻出文字列抽出部108により抽出された頻出文字列の構造IDを特定する(ステップS112)。次に、構造ID頻度算出部112は、構造ID特定部110により特定された構造IDごとの頻出文字列の出現頻度、すなわち構造ID頻度を算出する(ステップS114)。各頻出文字列が属する構造の構造IDと、構造IDとが対応付けられて構造ID頻度DB124に登録される(ステップS116)。次に、索引登録部114は、文字列頻度DB122および構造ID頻度DB124に登録されている情報に基づいて、索引キーと索引情報とを対応付けて索引DB126に登録する(ステップS118)。具体的には、頻出文字列および構造IDを索引キーとして、索引情報とともに文字列単位索引テーブル128に登録する。以上で、索引登録処理が完了する。
Next, the frequent character
ここで、索引登録処理についてより具体的に説明する。例えば、図8に示すような文字列と文字列頻度とが登録されたとする。そして、頻出文字列判定の際に利用する閾値が「10000」と設定されているとする。この場合には、頻出文字列として、「データ」が抽出される。さらに、構造化文書DB120に登録されているすべての構造化文書に含まれる頻出文字列「データ」の構造IDごとの構造ID頻度が構造ID頻度DB124に登録される。
Here, the index registration process will be described more specifically. For example, assume that a character string and a character string frequency as shown in FIG. 8 are registered. Then, it is assumed that the threshold used for frequent character string determination is set to “10000”. In this case, “data” is extracted as a frequent character string. Further, the structure ID frequency for each structure ID of the frequent character string “data” included in all structured documents registered in the structured
文字列単位索引テーブル128に索引キーとして構造IDを含めるべき構造ID頻度の閾値が「500」と設定されているとする。この場合には、図9に示す構造ID「6」および構造ID「19」に対する構造IDを同一の構造IDグループとして統合し、構造IDグループを識別するグループID「G1」を付与する。そして、図12に示すように文字列単位索引テーブル128には、構造ID「6」および構造ID「19」に対応付けられている頻出文字列「データ」に対する索引情報が、構造IDグループを識別する「G1」と文字列「データ」とを含む索引キーに対応付けて登録される。 Assume that the threshold value of the structure ID frequency that should include the structure ID as an index key is set to “500” in the character string unit index table 128. In this case, the structure IDs corresponding to the structure ID “6” and the structure ID “19” shown in FIG. 9 are integrated as the same structure ID group, and a group ID “G1” for identifying the structure ID group is given. As shown in FIG. 12, in the character string unit index table 128, the index information for the frequent character string “data” associated with the structure ID “6” and the structure ID “19” identifies the structure ID group. To be registered in association with an index key including “G1” and the character string “data”.
頻出文字列については、構造IDごとに索引キーを割り当てることにより頻出文字列を分散させることができる。これにより、構造を指定した検索処理コストを軽減することができる。 For frequent character strings, frequent character strings can be distributed by assigning an index key to each structure ID. As a result, the search processing cost for designating the structure can be reduced.
さらに、同一の文字列(頻出文字列)を構造IDごとに分割した場合には、索引キー数が著しく増加するなど、データ格納効率劣化やシステムリソース圧迫の原因になり得る問題が起こる可能性がある。そこで、上述のように、対応する索引情報が少ないものについては1つのグループにまとめることにより、上記のよう頻出文字列については検索処理コストを軽減しつつ索引キー数の増加を抑制することができる。 Furthermore, when the same character string (frequent character string) is divided for each structure ID, there is a possibility that problems such as a significant increase in the number of index keys may cause data storage efficiency degradation and system resource pressure. is there. Therefore, as described above, those with a small number of corresponding index information are collected into one group, so that it is possible to suppress an increase in the number of index keys while reducing the search processing cost for the frequent character strings as described above. .
なお、他の例としては、構造ID頻度が閾値以下のものをグループ化するのにかえて、構造化文書の木構造におけるパスが類似するものをグループ化することとしてもよい。また、他の例としては、「root」からの経路にかかわらず、同じタグ名を有する構造IDを統合し、統合した構造IDそれぞれの出現頻度の合計を構造ID頻度として記憶してもよい。このように、グループ化するための条件は実施の形態に限定されるものではない。 As another example, instead of grouping those whose structure ID frequency is less than or equal to the threshold value, those having similar paths in the tree structure of the structured document may be grouped. As another example, structure IDs having the same tag name may be integrated regardless of the route from “root”, and the total appearance frequency of each integrated structure ID may be stored as the structure ID frequency. Thus, the conditions for grouping are not limited to embodiment.
図14は、構造化文書処理装置10における検索処理を示すフローチャートである。まず、ユーザが入出力装置を利用して検索条件を入力する。構造化文書処理装置10の検索条件取得部130は、こうしてユーザから入力された検索条件を取得する(ステップS200)。次に、キーワード文字列抽出部132は、検索条件取得部130が取得した検索条件に含まれるキーワードからキーワード文字列を抽出する(ステップS202)。
FIG. 14 is a flowchart showing search processing in the structured
次に、検索部134は、キーワード文字列抽出部132により抽出されたキーワード文字列と一致する文字列を索引DB126において検索する(ステップS204)。このとき、検索条件取得部130が取得した検索条件において検索範囲が指定されている場合には、指定された検索範囲内において検索する。また、検索条件に構造IDの指定が含まれている場合には、この構造IDとキーワード文字列とに一致する索引キーを検索する。
Next, the
構造化文書抽出部136は、索引DB126において検索部134により検出された索引キーに対応付けられている索引情報に基づいて、構造化文書DB120から対応する構造化文書を抽出する(ステップS206)。なお、他の例としては、構造化文書のうち対応する部分のみを抽出してもよい。次に、構造化文書出力部138は、構造化文書抽出部136により抽出された構造化文書を検索結果として出力する(ステップS208)。以上で、検索処理が完了する。
The structured
図15は、実施の形態にかかる構造化文書処理装置10のハードウェア構成を示す図である。構造化文書処理装置10は、ハードウェア構成として、構造化文書処理装置10における索引登録処理および検索処理を実行する構造化文書処理プログラムなどが格納されているROM52と、ROM52内のプログラムに従って構造化文書処理装置10の各部を制御するCPU51と、構造化文書処理装置10の制御に必要な種々のデータを記憶するRAM53と、ネットワークに接続して通信を行う通信I/F57と、各部を接続するバス62とを備えている。
FIG. 15 is a diagram illustrating a hardware configuration of the structured
先に述べた構造化文書処理装置10における構造化文書処理プログラムは、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、フロッピー(R)ディスク(FD)、DVD等のコンピュータで読み取り可能な記録媒体に記録されて提供されてもよい。
The structured document processing program in the structured
この場合には、構造化文書処理プログラムは、構造化文書処理装置10において上記記録媒体から読み出して実行することにより主記憶装置上にロードされ、上記ソフトウェア構成で説明した各部が主記憶装置上に生成されるようになっている。
In this case, the structured document processing program is loaded on the main storage device by being read from the recording medium and executed by the structured
また、本実施の形態の構造化文書処理プログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。 Further, the structured document processing program of the present embodiment may be provided by being stored on a computer connected to a network such as the Internet and downloaded via the network.
以上、本発明を実施の形態を用いて説明したが、上記実施の形態に多様な変更または改良を加えることができる。 As described above, the present invention has been described using the embodiment, but various changes or improvements can be added to the above embodiment.
そうした第1の変更例としては、複数の構造IDを1つのグループに統合する処理を行わなくてもよい。この場合には、構造化文書処理装置10は、構造ID頻度算出部112は備えなくともよい。そして、構造ID頻度を算出し、構造ID頻度に基づいてグループに統合する処理を省略する。
As such a first modification, it is not necessary to perform processing for integrating a plurality of structure IDs into one group. In this case, the structured
また、第2の変更例としては、構造化文書処理装置10は、図11に示す文書単位索引テーブル127は保持しなくともよい。
As a second modification, the structured
10 構造化文書処理装置
51 CPU
52 ROM
53 RAM
57 通信I/F
62 バス
102 構造化文書取得部
104 文字列抽出部
106 文字列頻度算出部
108 頻出文字列抽出部
110 構造ID特定部
112 構造ID頻度算出部
114 索引登録部
120 構造化文書DB
122 文字列頻度DB
124 構造ID頻度DB
126 索引DB
127 文書単位索引テーブル
128 文字列単位索引テーブル
130 検索条件取得部
132 キーワード文字列抽出部
134 検索部
136 構造化文書抽出部
138 構造化文書出力部
10 Structured
52 ROM
53 RAM
57 Communication I / F
62
122 Character string frequency DB
124 Structure ID frequency DB
126 Index DB
127 Document Unit Index Table 128 Character String Unit Index Table 130 Search
Claims (4)
前記構造化文書保持手段が保持する前記構造化文書に含まれる文字列と、当該文字列の前記複数の構造化文書における出現頻度である文字列頻度とを対応付けて保持する文字列頻度保持手段と、
前記文字列頻度保持手段に保持されている前記文字列のうち、前記文字列頻度が予め設定された閾値以上の頻出文字列に対し、当該頻出文字列と、前記構造化文書の木構造において当該頻出文字列が現れる位置を示す構造IDとを索引キーとし、当該索引キーに対応付けて、当該索引キーにより特定されるべき文字列を識別するための索引情報を保持する索引情報保持手段と、
前記文字列頻度保持手段が保持する前記文字列うち、前記文字列頻度が予め定められた閾値以上である頻出文字列を抽出する頻出文字列抽出手段と、
前記頻出文字列抽出手段が抽出した前記頻出文字列の前記構造IDを特定する構造ID特定手段と
を備え、
前記構造ID特定手段は、前記頻出文字列のうち、予め定められた条件に適合する複数の構造IDに対し、当該複数の構造IDを含むグループを識別するグループ識別情報を付与し、
前記索引情報保持手段は、前記構造ID特定手段により特定された前記構造IDを前記索引キーとして保持し、前記グループに含まれる前記頻出文字列については、前記索引キーの前記構造IDとして前記グループ識別情報を保持することを特徴とする構造化文書処理装置。 Structured document holding means for holding a plurality of structured documents expressed in a tree structure ;
A character string frequency holding unit that holds a character string included in the structured document held by the structured document holding unit and a character string frequency that is an appearance frequency of the character string in the plurality of structured documents in association with each other. When,
Among the character strings held in the character string frequency holding means, for the frequent character strings having the character string frequency equal to or higher than a preset threshold, the frequent character string and the tree structure of the structured document Index information holding means for holding index information for identifying a character string to be specified by the index key in association with the index key using a structure ID indicating a position where a frequent character string appears as an index key ;
Of the character strings held by the character string frequency holding means, a frequent character string extracting means for extracting a frequent character string having the character string frequency equal to or higher than a predetermined threshold;
And Structure ID specifying means for specifying the structure ID of the frequently appearing character string the frequently appearing character string extraction unit and extracted
With
The structural ID identifying means, among the frequently appearing character string, the plurality of structures ID matches the predetermined condition, to grant group identification information identifying a group including the plurality of structures ID,
The index information holding unit holds the structure ID specified by the structural ID specifying unit as said index key, for the frequently appearing character string included in the group, the group identified as the structural ID of the index key A structured document processing apparatus characterized by holding information.
前記構造ID特定手段は、前記構造ID保持手段が保持する前記頻出文字列のうち対応付けられている前記構造ID頻度が予め定められた閾値以下となる複数の構造IDに対し、前記グループ識別情報を付与することを特徴とする請求項1に記載の構造化文書処理装置。 Of the character strings held by the character string frequency holding means, the structure ID of a frequent character string whose character string frequency is equal to or higher than a predetermined threshold, and the appearance frequency of the character string at the position indicated by the structure ID It further comprises a structure ID holding means for holding a certain structure ID frequency in association with each other,
The structure ID specifying means includes the group identification information for a plurality of structure IDs whose associated structure ID frequencies are equal to or less than a predetermined threshold among the frequent character strings held by the structure ID holding means. The structured document processing apparatus according to claim 1 , wherein:
構造化文書保持手段が、木構造で表現される複数の構造化文書を保持する構造化文書保持ステップと、
文字列頻度保持手段が、前記構造化文書保持手段が保持する前記構造化文書に含まれる文字列と、当該文字列の前記複数の構造化文書における出現頻度である文字列頻度とを対応付けて保持する文字列頻度保持ステップと、
索引情報保持手段が、前記文字列頻度保持手段に保持されている前記文字列のうち、前記文字列頻度が予め設定された閾値以上の頻出文字列に対し、当該頻出文字列と、前記構造化文書の木構造において当該頻出文字列が現れる位置を示す構造IDとを索引キーとし、当該索引キーに対応付けて、当該索引キーにより特定されるべき文字列を識別するための索引情報を登録する索引登録ステップと、
頻出文字列抽出手段が、前記文字列頻度保持手段が保持する前記文字列うち、前記文字列頻度が予め定められた閾値以上である頻出文字列を抽出する頻出文字列抽出ステップと、
構造ID特定手段が、前記頻出文字列抽出手段が抽出した前記頻出文字列の前記構造IDを特定する構造ID特定ステップと、
を実行し、
前記構造ID特定手段は、前記頻出文字列のうち、予め定められた条件に適合する複数の構造IDに対し、当該複数の構造IDを含むグループを識別するグループ識別情報を付与し、
前記索引情報保持手段は、前記構造ID特定手段により特定された前記構造IDを前記索引キーとして保持し、前記グループに含まれる前記頻出文字列については、前記索引キーの前記構造IDとして前記グループ識別情報を保持することを特徴とする構造化文書処理方法。 Computer
Structured document holding means, the structured document holding step of holding a plurality of structured documents represented in a tree structure,
String frequency holding unit, associates the character string which the structured document holding means is included in the structured document that holds, the string frequency is the appearance frequency in the plurality of structured documents of the string and string frequency holding step of holding,
Index information holding means, among the character strings stored in the character string frequency holding means, said character string frequency is preset threshold or more frequently appearing character string to a corresponding frequently appearing character string, the structured Index information for identifying a character string to be specified by the index key is registered in association with the index key using a structure ID indicating a position where the frequent character string appears in the tree structure of the document. An index creation step ;
A frequent character string extracting step, wherein the frequent character string extracting unit extracts a frequent character string having the character string frequency equal to or higher than a predetermined threshold among the character strings held by the character string frequency holding unit;
A structure ID specifying means for specifying the structure ID of the frequent character string extracted by the frequent character string extracting means;
Run
The structure ID specifying means assigns group identification information for identifying a group including the plurality of structure IDs to a plurality of structure IDs that meet a predetermined condition in the frequent character strings,
The index information holding unit holds the structure ID specified by the structure ID specifying unit as the index key, and the frequently identified character string included in the group has the group identification as the structure ID of the index key. A structured document processing method characterized by holding information .
構造化文書保持手段が、木構造で表現される複数の構造化文書を保持する構造化文書保持ステップと、
文字列頻度保持手段が、前記構造化文書保持手段が保持する前記構造化文書に含まれる文字列と、当該文字列の前記複数の構造化文書における出現頻度である文字列頻度とを対応付けて保持する文字列頻度保持ステップと、
索引情報保持手段が、前記文字列頻度保持手段に保持されている前記文字列のうち、前記文字列頻度が予め設定された閾値以上の頻出文字列に対し、当該頻出文字列と、前記構造化文書の木構造において当該頻出文字列が現れる位置を示す構造IDとを索引キーとし、当該索引キーに対応付けて、当該索引キーにより特定されるべき文字列を識別するための索引情報を登録する索引登録ステップと、
頻出文字列抽出手段が、前記文字列頻度保持手段が保持する前記文字列うち、前記文字列頻度が予め定められた閾値以上である頻出文字列を抽出する頻出文字列抽出ステップと、
構造ID特定手段が、前記頻出文字列抽出手段が抽出した前記頻出文字列の前記構造IDを特定する構造ID特定ステップと、
を実行させ、
前記構造ID特定手段は、前記頻出文字列のうち、予め定められた条件に適合する複数の構造IDに対し、当該複数の構造IDを含むグループを識別するグループ識別情報を付与し、
前記検索情報保持手段は、前記構造ID特定手段により特定された前記構造IDを前記索引キーとして保持し、前記グループに含まれる前記頻出文字列については、前記索引キーの前記構造IDとして前記グループ識別情報を保持するための構造化文書処理プログラム。 On the computer ,
Structured document holding means, the structured document holding step of holding a plurality of structured documents represented in a tree structure,
String frequency holding unit, associates the character string which the structured document holding means is included in the structured document that holds, the string frequency is the appearance frequency in the plurality of structured documents of the string and string frequency holding step of holding,
Index information holding means, among the character strings stored in the character string frequency holding means, said character string frequency is preset threshold or more frequently appearing character string to a corresponding frequently appearing character string, the structured Index information for identifying a character string to be specified by the index key is registered in association with the index key using a structure ID indicating a position where the frequent character string appears in the tree structure of the document. An index creation step;
A frequent character string extracting step, wherein the frequent character string extracting unit extracts a frequent character string having the character string frequency equal to or higher than a predetermined threshold among the character strings held by the character string frequency holding unit;
A structure ID specifying means for specifying the structure ID of the frequent character string extracted by the frequent character string extracting means;
And execute
The structure ID specifying unit assigns group identification information for identifying a group including the plurality of structure IDs to a plurality of structure IDs that meet a predetermined condition in the frequent character string,
The search information holding unit holds the structure ID specified by the structure ID specifying unit as the index key, and the frequently identified character string included in the group has the group identification as the structure ID of the index key. A structured document processing program for holding information .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006045808A JP4489034B2 (en) | 2006-02-22 | 2006-02-22 | Structured document processing apparatus, structured document processing method, and structured document processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006045808A JP4489034B2 (en) | 2006-02-22 | 2006-02-22 | Structured document processing apparatus, structured document processing method, and structured document processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007226453A JP2007226453A (en) | 2007-09-06 |
JP4489034B2 true JP4489034B2 (en) | 2010-06-23 |
Family
ID=38548226
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006045808A Expired - Fee Related JP4489034B2 (en) | 2006-02-22 | 2006-02-22 | Structured document processing apparatus, structured document processing method, and structured document processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4489034B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5971571B2 (en) * | 2012-05-22 | 2016-08-17 | 株式会社東芝 | Structural document management system, structural document management method, and program |
CN110688842B (en) * | 2019-10-14 | 2023-06-09 | 鼎富智能科技有限公司 | Analysis method, device and server for document title level |
-
2006
- 2006-02-22 JP JP2006045808A patent/JP4489034B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2007226453A (en) | 2007-09-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3918531B2 (en) | Similar document search method and system | |
JP5121146B2 (en) | Structured document management apparatus, structured document management program, and structured document management method | |
US20080120280A1 (en) | Method, system and program for creating an index | |
US7822788B2 (en) | Method, apparatus, and computer program product for searching structured document | |
SE524595C2 (en) | Procedure and computer program for normalization of style throws | |
US20090019015A1 (en) | Mathematical expression structured language object search system and search method | |
JP4860416B2 (en) | Document search apparatus, document search method, and document search program | |
JP2005352888A (en) | Notation shaking correspondence dictionary creation system | |
US20100257177A1 (en) | Document rating calculation system, document rating calculation method and program | |
JP4427500B2 (en) | Semantic analysis device, semantic analysis method, and semantic analysis program | |
JP4237813B2 (en) | Structured document management system | |
JP2007219620A (en) | Text retrieval device, program, and method | |
JP4489034B2 (en) | Structured document processing apparatus, structured document processing method, and structured document processing program | |
US11301441B2 (en) | Information processing system and information processing method | |
JP3784060B2 (en) | Database search system, search method and program thereof | |
KR101802051B1 (en) | Method and system for constructing schema on natural language processing and knowledge database thereof | |
JP4439496B2 (en) | Search processing apparatus and program | |
JP5162215B2 (en) | Data processing apparatus, data processing method, and program | |
JP4091586B2 (en) | Structured document management system, index construction method and program | |
JP4304226B2 (en) | Structured document management system, structured document management method and program | |
JP4160627B2 (en) | Structured document management system and program | |
JP2007011973A (en) | Information retrieval device and information retrieval program | |
JP5903372B2 (en) | Keyword relevance score calculation device, keyword relevance score calculation method, and program | |
JP5225022B2 (en) | XML data search method, apparatus and program | |
JP2008209996A (en) | Retrieval index preparation apparatus/retrieval index preparation method and retrieval index preparation program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070903 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090728 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090928 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100302 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100330 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130409 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130409 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140409 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |