JPH07225771A - Retrieval expression preparation support system - Google Patents

Retrieval expression preparation support system

Info

Publication number
JPH07225771A
JPH07225771A JP6133105A JP13310594A JPH07225771A JP H07225771 A JPH07225771 A JP H07225771A JP 6133105 A JP6133105 A JP 6133105A JP 13310594 A JP13310594 A JP 13310594A JP H07225771 A JPH07225771 A JP H07225771A
Authority
JP
Japan
Prior art keywords
search
expression
formula
retrieval
structured 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.)
Granted
Application number
JP6133105A
Other languages
Japanese (ja)
Other versions
JP3168829B2 (en
Inventor
Shoichi Hayashi
祥一 林
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP13310594A priority Critical patent/JP3168829B2/en
Priority to US08/490,249 priority patent/US5628008A/en
Publication of JPH07225771A publication Critical patent/JPH07225771A/en
Application granted granted Critical
Publication of JP3168829B2 publication Critical patent/JP3168829B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To provide a retrieval expression preparation support system which is capable of easily obtaining a right conditional expression for retrieval. CONSTITUTION:A structured document 9 to be used for the illustration of a retrieval result is analyzed in a structure analysis part 1 and the structure is extended in a memory 7. A retrieval expression structure extraction part 2 successively takes out the routine structure patterns stored in a knowledge base 6 and finds out the partial structure pattern including the partial structure of the structured document illustrated by a user. A retrieval condition extraction part 3 fixes the value of the field to be used for a retrieval expression for each of the record included in the partial structure extracted in the retrieval expression structure extraction part 2. A retrieval expression synthesis part 4 synthesizes the expression of a form which is possible to be recognized as the retrieval expression. The synthesized retrieval expression is possible to be deformed in accordance with the edition instruction of the user and under such a condition that the illustrated partial structure is possible to be retrieved in a retrieval expression edition part 5.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、構造化文書を処理する
構造化文書処理装置において、構造化文書に対して検索
処理を行なう際に、検索に用いる検索式の作成を支援す
る検索式作成支援システムに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a structured document processing apparatus for processing a structured document, and when a structured document is subjected to a retrieval process, a retrieval formula preparation for supporting a retrieval formula used for retrieval. It concerns support systems.

【0002】[0002]

【従来の技術】従来の構造化文書処理装置には、構造化
文書における文脈、すなわち、階層構造に関する情報を
含むパターンを検索条件として与え、検索を行なうこと
ができるものがある。また、このような検索式の作成を
支援する装置も考えられている。この装置を用いること
によって、ユーザは条件式をグラフ表現によって入力
し、それを編集することによって、検索条件を入力及び
変更することができる。しかし、従来の構造化文書処理
装置においては、ユーザ自身がはじめから検索条件を考
えて入力しなければならない。そのためには、構造化文
書の内部表現がどのようになっているかをユーザが正確
に知っている必要がある。
2. Description of the Related Art Some conventional structured document processing apparatuses are capable of performing a search by giving a context containing a context in a structured document, that is, a pattern including information about a hierarchical structure as a search condition. Also, an apparatus that supports the creation of such a search formula has been considered. By using this device, the user can input and change the search condition by inputting the conditional expression in the form of a graph and editing it. However, in the conventional structured document processing device, the user himself has to consider the search condition and input it from the beginning. To do this, the user needs to know exactly what the internal representation of the structured document is.

【0003】従来の検索式の作成をグラフ表現によって
支援する装置では、入力装置が認識可能な形式を分かり
やすく表現するもので、正確な文法に関する知識がない
ユーザにも文法的に正しい式を作成できるようにするも
のである。しかし、このような装置でも、構造化文書の
内部表現に関する正確な知識をユーザに要求する点に変
わりはない。
A conventional device for assisting the creation of a search expression by means of a graph expression expresses a format recognizable by an input device in an easy-to-understand manner, and creates a grammatically correct expression even for a user who has no knowledge of the correct grammar. It enables you to do it. However, even such a device still requires the user to have accurate knowledge about the internal representation of the structured document.

【0004】また、従来の構造化文書処理装置は、正し
い意味を持った式を作成することに関しては、何も支援
するものではない。このため、検索が非常に有用な機能
であるにもかかわらず、誰もが容易に利用できる機能と
なってはいない。
Further, the conventional structured document processing device does not support anything in creating an expression having a correct meaning. Therefore, although search is a very useful function, it is not a function that anyone can easily use.

【0005】[0005]

【発明が解決しようとする課題】本発明は、上述した事
情に鑑みてなされたもので、検索のための正しい条件式
を容易に得ることのできる検索式作成支援システムを提
供することを目的とするものである。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a search expression creation support system capable of easily obtaining a correct conditional expression for a search. To do.

【0006】[0006]

【課題を解決するための手段】本発明は、請求項1に記
載の発明においては、構造化文書に対して検索処理を行
なう際に用いる検索式の作成を支援する検索式作成支援
システムにおいて、前記構造化文書が記憶される記憶手
段と、検索結果の1つとしてユーザから例示された前記
構造化文書の部分構造に基づき前記例示された部分構造
を含む部分構造を抽出する構造抽出手段と、該構造抽出
手段により抽出された部分構造から検索式を合成する検
索式合成手段を有することを特徴とするものである。
According to a first aspect of the present invention, there is provided a search formula creation support system for supporting creation of a search formula used when a search process is performed on a structured document, Storage means for storing the structured document; structure extraction means for extracting a partial structure including the exemplified partial structure based on the partial structure of the structured document exemplified by the user as one of the search results; The present invention is characterized by having a search formula synthesizing unit that synthesizes a search formula from the partial structure extracted by the structure extracting unit.

【0007】また、請求項2に記載の発明においては、
ユーザからの編集操作指示に従い、前記検索式合成手段
により合成された検索式に対して変形を行なう際に、変
形された後の検索式が合成の際に用いた構造化文書の例
示された部分構造を含むことを条件に検索式の変形処理
を実行する検索式編集手段を有することを特徴とするも
のである。
Further, in the invention described in claim 2,
When the search formula synthesized by the search formula synthesis means is modified in accordance with an editing operation instruction from the user, the modified search formula is used as an example of the structured document used in the synthesis. The present invention is characterized by having a search formula editing means for executing a modification process of a search formula on condition that the structure is included.

【0008】請求項3に記載の発明においては、構造化
文書に対して検索処理を行なう際に用いる検索式の作成
を支援する検索式作成支援システムにおいて、検索式に
従い検索を行なう検索手段と、該検索手段による検索結
果に基づきユーザが検索結果に対する誤りの指摘を行な
う入力手段と、該入力手段から入力される誤りの指摘に
従い指摘された部分を含む部分構造と検索式の構造に基
づき検索式を修正する検索式修正処理手段を有すること
を特徴とするものである。
According to the third aspect of the present invention, in a search formula creation support system for supporting the creation of a search formula used when performing a search process on a structured document, search means for performing a search according to the search formula, An input means by which the user points out an error in the search result based on the search result by the search means, and a search formula based on the structure of the partial structure including the part pointed out according to the error point input by the input means and the structure of the search expression It is characterized by having a retrieval formula correction processing means for correcting.

【0009】請求項4に記載の発明においては、請求項
3に記載の検索式作成支援システムにおいて、誤りが指
摘された検索式の構造に含まれている各枝と、その枝の
組み合わせに関する情報を順次記憶するデータベースを
有し、前記検索式修正処理手段は、検索式を修正する際
に前記データベースを参照し、前記データベースに記憶
されている枝の組み合わせを含む検索式の修正候補以外
の修正候補に基づいて検索式の修正を行なうことを特徴
とするものである。
According to a fourth aspect of the invention, in the retrieval formula creation support system according to the third aspect, information about each branch included in the structure of the retrieval formula in which an error is pointed out and a combination of the branches is provided. And a search formula correction processing unit refers to the database when correcting the search formula, and corrects a correction formula other than a correction candidate of the search formula including a combination of branches stored in the database. It is characterized in that the search formula is modified based on the candidates.

【0010】[0010]

【作用】請求項1に記載の発明によれば、ユーザに検索
結果の1例を例示させ、例示によって得られた構造化文
書の部分構造を含むような部分構造を構造抽出手段で抽
出し、その抽出した構造から検索式合成手段により検索
式を自動合成することにより、文法的に正しい検索式を
例示という簡単な操作により得ることができる。
According to the first aspect of the present invention, the user is made to exemplify one example of the search result, and the partial structure including the partial structure of the structured document obtained by the example is extracted by the structure extracting means, By automatically synthesizing the search expression from the extracted structure by the search expression synthesizing means, a grammatically correct search expression can be obtained by a simple operation of exemplifying.

【0011】また、合成された検索式の条件を強め、あ
るいは、ゆるめて検索したい場合がある。そのため、請
求項2に記載の発明によれば、検索式編集手段によって
合成された検索式の変形を行なうことができる。しか
し、自由な変形を行なうと、例示した検索結果が含まれ
ないという不合理な検索式が作成されてしまう場合があ
る。検索式編集手段では、変形された後の検索式が、合
成の際に用いた部分構造を含むことを条件に、検索式の
変形処理を実行する。これにより、ユーザは、合成の際
に例示された部分構造を常に検索可能な、常に正しい検
索式を得ることができる。
In addition, there are cases where it is desired to strengthen or loosen the conditions of the synthesized search formula to perform the search. Therefore, according to the invention described in claim 2, it is possible to modify the search formula synthesized by the search formula editing means. However, free modification may create an unreasonable search expression that does not include the exemplified search results. The search expression editing unit executes the modification processing of the search expression on condition that the modified search expression includes the partial structure used in the composition. As a result, the user can always obtain a correct search formula that can always search the partial structure illustrated at the time of synthesis.

【0012】請求項3に記載の発明によれば、意図した
ものではない検索結果が得られた場合に、検索式側では
なく、検索結果の方の誤っている部分がどこであるのか
をユーザが入力手段から例示することにより、検索式修
正処理手段は、例示された部分を含む部分構造と検索式
の構造に基づき、指摘された誤りをただすように検索式
を自動修正する。検索式修正処理手段は、指摘される誤
りの情報が不完全、すなわち、全ての誤りが指摘される
のではなく、誤っている部分の一部の例示のみであって
も、順次検索式を修正して行くことができる。このと
き、誤りに関する指摘の数の増加に伴って、その全ての
誤りを解決するような、より正しい検索式が得られるよ
うに修正することが可能である。
According to the third aspect of the present invention, when an unintended search result is obtained, the user can determine where the erroneous part of the search result is, not the search expression side. By exemplifying from the input means, the search expression correction processing means automatically corrects the search expression so as to correct the indicated error based on the partial structure including the illustrated portion and the structure of the search expression. The search formula correction processing means sequentially corrects the search formula even if the information of the error pointed out is incomplete, that is, not all errors are pointed out but only a part of the erroneous part is illustrated. You can go. At this time, as the number of indications regarding errors increases, it is possible to correct so that a more correct search formula that solves all the errors can be obtained.

【0013】請求項4に記載の発明によれば、誤りが指
摘された検索式の構造に含まれている枝の組み合わせに
関する情報は、順次、データベースに記憶され、検索式
修正処理手段が検索式を修正する際には、データベース
に記憶されている情報、すなわち、誤りが指摘された検
索式への修正を行なわないようにすることができる。こ
れにより、過去の履歴を学習した一種の学習効果を得る
ことができ、その時点までに判明している同じ誤りを繰
り返さないで、検索式の修正を行なうことができる。
According to the fourth aspect of the present invention, the information on the combination of the branches included in the structure of the search expression in which the error is pointed out is sequentially stored in the database, and the search expression correction processing means is used by the search expression. When correcting, the information stored in the database, that is, the search expression in which the error is pointed out, can be prevented from being corrected. As a result, a kind of learning effect of learning the past history can be obtained, and the retrieval formula can be corrected without repeating the same error known up to that point.

【0014】[0014]

【実施例】図1は、本発明の検索式作成支援システムの
第1の実施例の構成図である。図中、1は構造解析部、
2は検索式構造抽出部、3は検索条件抽出部、4は検索
式合成部、5は検索式編集部、6は知識ベース、7はメ
モリ、8は検索式、9は構造化文書である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram of the first embodiment of the search expression creation support system of the present invention. In the figure, 1 is a structural analysis unit,
Reference numeral 2 is a retrieval formula structure extraction unit, 3 is a retrieval condition extraction unit, 4 is a retrieval formula synthesis unit, 5 is a retrieval formula editing unit, 6 is a knowledge base, 7 is a memory, 8 is a retrieval formula, and 9 is a structured document. .

【0015】構造解析部1は、検索結果の例示のために
用いられる構造化文書9を解析し、その構造をメモリ7
に展開する。このとき、メモリ7には、例示に用いられ
る構造化文書9の階層構造が、親子関係と兄弟関係にあ
るものの間の双方向にポインタを持つレコードの木構造
として記憶される。検索式構造抽出部2は、知識ベース
6の中に蓄積されている定型的な構造パターンを順次取
り出し、ユーザにより例示された構造化文書の部分構造
を含む部分構造に一致するものを見つけ出す。そして、
見つけ出した定型的な構造パターンに一致するレコード
全てに対して、マークを付与する。検索条件抽出部3
は、検索式構造抽出部2で抽出された部分構造に含まれ
るレコードの各々について、検索式のために用いるフィ
ールドの値を確定する。検索式合成部4は、マークが付
与された部分構造のレコードを順次取り出し、検索式と
して認識可能な形式の表現を合成する。検索式編集部5
は、ユーザからの編集指示に従い、検索式合成部4によ
り合成された検索式に対して変形を行ない、新たな検索
式を生成する。このとき、それまでに指示されている部
分構造を検索可能であるという正しさが失われない場合
に限り、検索式の変形を行なう。知識ベース6には、熟
練したユーザが検索のために用いる文脈(部分構造)を
定型化して格納しておく。
The structure analysis unit 1 analyzes the structured document 9 used for exemplifying the search result and stores the structure in the memory 7.
Expand to. At this time, the hierarchical structure of the structured document 9 used as an example is stored in the memory 7 as a tree structure of records having pointers bidirectionally between those having a parent-child relationship and those having a sibling relationship. The search expression structure extraction unit 2 sequentially takes out the typical structure patterns accumulated in the knowledge base 6 and finds one that matches the partial structure including the partial structure of the structured document exemplified by the user. And
A mark is given to all the records that match the found typical structure pattern. Search condition extraction unit 3
Determines the value of the field used for the search expression for each of the records included in the partial structure extracted by the search expression structure extraction unit 2. The search formula synthesis unit 4 sequentially takes out the records of the partial structures to which the marks have been added, and synthesizes the expression in a form recognizable as the search formula. Search formula editor 5
In accordance with a user's editing instruction, the search formula combining unit 4 modifies the search formula combined to generate a new search formula. At this time, the search formula is modified only when the correctness that the partial structure designated by that time can be searched is not lost. In the knowledge base 6, a context (partial structure) used by a skilled user for searching is stylized and stored.

【0016】図2は、本発明の検索式作成支援システム
の第1の実施例における検索式生成の動作を示すフロー
チャートである。S11において、ユーザは、例えば、
構造化文書エディタ等を用いて、検索したい部分を例示
する。例示は、例えば、構造化文書エディタに表示され
ているレコードを、例えば、ポインティングデバイス等
で指示入力すればよい。この例示により、指示されたレ
コードの識別子を得ることができる。その識別子が一致
するレコードを、メモリ7に展開されている例示のため
の構造化文書から見つけだし、メモリ7内の構造化文書
のレコードにマークを付与する。
FIG. 2 is a flow chart showing the operation of search expression generation in the first embodiment of the search expression creation support system of the present invention. In S11, the user
A structured document editor or the like is used to exemplify the portion to be searched. For example, for example, a record displayed in the structured document editor may be input by pointing with a pointing device or the like. With this example, the identifier of the designated record can be obtained. A record having the same identifier is found from the structured document for the purpose of illustration developed in the memory 7, and the record of the structured document in the memory 7 is marked.

【0017】次に、S12、S13において、ユーザか
ら例示された部分構造、すなわち、メモリ7内の構造化
文書のマークを付与されたレコードを包含する部分構造
を、知識ベース6を用いて抽出する。知識ベース6に
は、熟練したユーザが検索のために用いる文脈を部分構
造として格納してあり、ユーザから例示された部分構造
を検索するために、熟練したユーザが検索条件として用
いるであろう部分構造を蓄積してある。そのため、未熟
なユーザからの指示であっても、熟練したユーザが用い
るのと同程度の検索条件が得られる。抽出される部分構
造は、ユーザから例示された部分構造を含む知識ベース
6に格納されている構造の一つと同形の部分構造であ
る。抽出された定型的な部分構造パターンに一致する、
メモリ7内の構造化文書のレコード全てに対して、マー
クを付与する。マークを付与されたレコードは、メモリ
7に展開されている文書の構造の部分構造(部分木)と
なる。そして、この部分構造が検索式の持つべき構造と
なっている。
Next, in S12 and S13, the partial structure exemplified by the user, that is, the partial structure including the marked record of the structured document in the memory 7 is extracted using the knowledge base 6. . The knowledge base 6 stores a context used by a skilled user for a search as a substructure, and a part that a skilled user will use as a search condition for searching a substructure exemplified by the user. The structure is accumulated. Therefore, even with an instruction from an inexperienced user, a search condition similar to that used by a skilled user can be obtained. The extracted partial structure is a partial structure having the same shape as one of the structures stored in the knowledge base 6 including the partial structure exemplified by the user. Matches the extracted canonical substructure pattern,
A mark is given to all the records of the structured document in the memory 7. The marked record becomes a partial structure (partial tree) of the structure of the document developed in the memory 7. This partial structure is the structure that the search formula should have.

【0018】S14において、抽出された部分構造に対
応する検索式の条件を求める。S13までのステップで
検索式の持つべき構造が決定されるが、各レコードの属
性、例えば、図や表題、段落などの条件も検索の際に必
要となる。そのため、メモリ7内の構造化文書の抽出さ
れた部分構造、すなわち、マークの付与されたレコード
の属性を参照し、検索のための条件を求める。
In step S14, the conditions of the retrieval formula corresponding to the extracted partial structure are obtained. The structure that the search expression should have is determined in the steps up to S13, but the attributes of each record, for example, conditions such as figures, titles, paragraphs, etc. are also required in the search. Therefore, the extracted partial structure of the structured document in the memory 7, that is, the attribute of the marked record is referred to and the search condition is obtained.

【0019】S15において、検索のための部分構造及
び条件に基づき、検索式合成部4において、検索式を生
成し、S16において、生成した検索式を出力する。ユ
ーザは、出力された検索式を用いて検索処理を行なえば
よい。
In step S15, the search expression combining unit 4 generates a search expression based on the partial structure and conditions for the search, and in step S16, the generated search expression is output. The user may perform the search process using the output search formula.

【0020】上述の構成では、検索式構造抽出部2で定
型的な構造パターンを抽出する際に、知識ベース6に保
持しているルールを用いているが、知識ベース6内に保
持されているルールには、ユーザの例示した部分構造を
含むものがない場合には、デフォルトのルールにより対
応する部分構造を設定したり、あるいは、推論により、
類似の構造を抽出し、ユーザに提示するなどの手段を設
けることもできる。また、知識ベース6を用いず、ユー
ザの例示した部分構造に対応する部分構造を返す手続き
として、プログラムの中に組み込むような構成をとるこ
ともできる。
In the above-mentioned configuration, the rule stored in the knowledge base 6 is used when the standard structure pattern is extracted by the search expression structure extraction unit 2, but it is stored in the knowledge base 6. If there is no rule that contains the partial structure exemplified by the user, set the corresponding partial structure by the default rule, or by inference,
It is also possible to provide means for extracting a similar structure and presenting it to the user. Alternatively, the knowledge base 6 may be omitted, and the procedure for returning a partial structure corresponding to the partial structure exemplified by the user may be incorporated in the program.

【0021】図3は、構造化文書の一例の説明図、図4
は、構造化文書の構造化された内部表現の一例の説明図
である。図3に示した文書には、「序論」、「本論」等
の表題や、それぞれの本文、図などが記載されている。
このような文書は、図4に示すような木構造として表現
することができる。すなわち、図3の文書は、序論全
体、本論全体を示す2つの「節」が存在する。例えば、
序論を示す「節」には、「表題」と「本文段落」が存在
し、「表題」の内容として、「序論」という文字列が存
在する。また、例えば、図は、本論全体を示す「節」に
含まれ、さらに、「節」の中の「本文段落」に「図表領
域」として含まれる。図は、図のイメージ部分と、図の
表題により構成される。他の部分についても同様であ
る。このように、構造化文書では、文書の構造を木構造
で表わしている。
FIG. 3 is an explanatory view of an example of a structured document, FIG.
FIG. 3 is an explanatory diagram of an example of a structured internal representation of a structured document. The document shown in FIG. 3 includes titles such as “Introduction” and “Main Thesis”, as well as respective texts and figures.
Such a document can be expressed as a tree structure as shown in FIG. That is, the document of FIG. 3 has two “sections” that indicate the entire introduction and the entire main body. For example,
The "section" indicating the introduction includes a "title" and a "text paragraph", and the content of the "title" includes a character string "introduction". In addition, for example, the figure is included in a “section” indicating the whole of the present theory, and is further included as a “figure area” in a “text paragraph” in the “section”. The figure is composed of the image part of the figure and the title of the figure. The same applies to the other parts. As described above, in the structured document, the document structure is represented by a tree structure.

【0022】図5は、メモリ7に格納される構造化文書
の構造の一例の説明図である。例示のための構造化文書
9は、構造解析部1により文書の構造が解析され、例え
ば、図4に示す構造を有する構造化文書は、図5に示す
ようなデータ構造でメモリ7に格納される。すなわち、
構造化文書の階層構造が、親子関係と兄弟関係にあるも
のの間の双方向にポインタを持つ木構造として記憶され
る。
FIG. 5 is an explanatory diagram of an example of the structure of the structured document stored in the memory 7. The structure analysis unit 1 analyzes the structure of the structured document 9 for illustration, and for example, the structured document having the structure shown in FIG. 4 is stored in the memory 7 in the data structure shown in FIG. It That is,
The hierarchical structure of the structured document is stored as a tree structure having pointers bidirectionally between those having a parent-child relationship and those having a sibling relationship.

【0023】構造化文書の木構造のノードとなる部分
は、レコードで表現される。図5において、矩形で示し
ているそれぞれがレコードである。各レコードは、いく
つかのフィールドを有する。図5では、レコードのID
となる「No.」、レコードの種別を示す「属性」,テ
キストデータ等の実際に文書に現れる内容を示す
「値」、検索式のために用いる情報を格納する「部分
式」の各フィールドを示している。もちろん、このほか
のフィールドを有していてもよいし、例えば、フィール
ド「部分式」は、このレコードとは別の種類のレコード
で管理する構成であってもよい。
A portion of the structured document tree structure that serves as a node is represented by a record. In FIG. 5, each rectangle is a record. Each record has several fields. In Figure 5, the record ID
"No.", "Attribute" that indicates the type of record, "Value" that indicates the contents that actually appear in the document such as text data, and "Sub-expression" that stores the information used for the search expression. Shows. Of course, other fields may be provided, and for example, the field "subexpression" may be managed by a record of a different type from this record.

【0024】図4の「本論」という文字列を有する部分
あるいは構造は、図5のフィールド「No.」として
「1.1.1」を有するレコードに相当する。このレコ
ードは、フィールド「属性」として「テキスト」を、フ
ィールド「値」として文字列「本論」を有する。フィー
ルド「No.」は、階層構造を表現するように構成され
ており、この値が「1.1.1」の場合には、値が
「1」のレコードの子のレコード「1.1」のさらに子
であることを示している。上述のように、各レコード
は、親、子、兄弟に対するポインタも有する。
The part or structure having the character string "main theme" in FIG. 4 corresponds to the record having "1.1.1" as the field "No." in FIG. This record has "text" as a field "attribute" and a character string "main text" as a field "value". The field “No.” is configured to represent a hierarchical structure. When the value is “1.1.1”, the child record “1.1” of the record having the value “1”. It is shown that it is a child of. As mentioned above, each record also has pointers to parents, children and siblings.

【0025】図6は、知識ベース6に蓄積されている定
型的な構造パターンの一例の説明図である。知識ベース
6には、熟練したユーザが検索に用いるような、種々の
定型的な部分構造のパターンが格納されている。例え
ば、図6のパターン1は、フィールド「属性」の値が
「節」のレコードの子として、フィールド「属性」の値
が「表題」のレコードと、フィールド「属性」の値が
「本文段落」のレコードの2つのレコードを有し、「表
題」のレコードの子としてどのような部分構造が接続さ
れていてもかまわないという、部分構造を示している。
パターン2も同様に、フィールド「属性」の値が、
「節」のレコードの子として「本文段落」のレコードが
存在し、その子として「図表領域」のレコードが存在
し、さらにその子として属性が未確定のレコードと、も
う一つの子として「領域の表題」のレコードが存在し、
「領域の表題」のレコードは子となるレコードを有する
部分構造を示している。上述の属性が未確定のレコード
の属性の確定方法については後述するが、これは知識ベ
ースのルールとしては、どのような属性であっても良い
ことを表わしている。しかし、この属性は、検索式の合
成の前までには、具体的に例示された構造の持つ属性に
等しくなるように定められ、検索時には、その属性が条
件として用いられる。
FIG. 6 is an explanatory diagram of an example of a typical structural pattern stored in the knowledge base 6. The knowledge base 6 stores various typical partial structure patterns that a skilled user uses for searching. For example, in pattern 1 of FIG. 6, a record whose field “attribute” value is “section”, a record whose field “attribute” value is “title”, and a field “attribute” value is “text paragraph” 2 shows the partial structure in which any partial structure may be connected as a child of the “title” record.
Similarly for pattern 2, the value of the field "attribute" is
A "body paragraph" record exists as a child of a "section" record, a "chart area" record exists as a child, an attribute whose attribute is undetermined, and another "area title" Record exists,
The record of “area title” indicates a partial structure having a child record. A method of deciding the attribute of the above-mentioned undecided attribute will be described later, but this means that any attribute may be used as a knowledge base rule. However, this attribute is set to be equal to the attribute of the concretely exemplified structure before the search expression is synthesized, and the attribute is used as a condition at the time of search.

【0026】図4乃至図6を用いて、本発明の検索式作
成支援システムの第1の実施例の具体的な動作を説明す
る。例えば、図4に示すような例示のための構造化文書
9が構造解析部1で図5に示すような構造に展開されて
メモリ7に格納され、また、図6に示すような定型的な
パターンが知識ベース6に格納されているものとする。
The specific operation of the first embodiment of the retrieval formula creation support system of the present invention will be described with reference to FIGS. For example, the structured document 9 for illustration as shown in FIG. 4 is expanded by the structure analysis unit 1 into the structure as shown in FIG. 5 and stored in the memory 7, and the structured document 9 as shown in FIG. It is assumed that the pattern is stored in the knowledge base 6.

【0027】ここで、図4に示す構造化文書の検索結果
の例示として、ユーザが“領域の表題”を指示した場合
を考える。検索式構造抽出部2は、図6に示した知識ベ
ース6の内容を参照し、指示された“領域の表題”を含
む部分構造パターンとして、図6のパターン2を抽出す
る。このとき、複数の部分構造パターンが抽出されるこ
とがあるが、その場合には、抽出された複数の部分構造
パターンを含むような部分構造パターンを生成したり、
あるいは、ある基準に従って1つを選択するように構成
することができる。
Here, as an example of the search result of the structured document shown in FIG. 4, consider a case where the user has designated "area title". The search expression structure extraction unit 2 refers to the contents of the knowledge base 6 shown in FIG. 6 and extracts the pattern 2 shown in FIG. 6 as the partial structure pattern including the designated “area title”. At this time, a plurality of partial structure patterns may be extracted. In that case, a partial structure pattern including the plurality of extracted partial structure patterns may be generated,
Alternatively, it can be configured to select one according to some criteria.

【0028】パターン2が抽出されたとき、パターン2
と一致するレコードに対してマークが付与される。すな
わち、図5に示した例では、太線で示したレコードにマ
ークが付与される。マークを付与されたレコードは、メ
モリ7に展開されている構造の部分構造であり、検索式
の持つべき構造となっている。
When pattern 2 is extracted, pattern 2
A mark is added to the record that matches with. That is, in the example shown in FIG. 5, a mark is added to the record indicated by the thick line. The marked record is a partial structure of the structure developed in the memory 7, and is the structure that the search expression should have.

【0029】抽出されたパターン2には、“属性=?”
や、“?”といった未確定のレコードが存在する。検索
条件抽出部3では、知識ベース6から見つけ出した適用
可能な定型的な部分構造パターンを確定するため、対応
するレコードの内容を格納するフィールドから、必要な
情報を抽出し、フィールド「部分式」に格納する。図6
のパターン2の“属性=?”には、フィールド「N
o.」が「1.2.2.1」であるレコードが対応す
る。このことから、この知識ベース6に格納されていた
パターン2の構造に加え、“属性”の部分を条件として
用いるとよいということがわかる。そのため、フィール
ド「No.」が「1.2.2.1」のレコードのフィー
ルド「属性」の内容を、フィールド「部分式」に「属性
=図」として設定する。
In the extracted pattern 2, "attribute =?"
Or, there is an undetermined record such as "?". The search condition extraction unit 3 extracts the necessary information from the field storing the content of the corresponding record in order to determine the applicable standard partial structure pattern found from the knowledge base 6, and the field "subexpression" To store. Figure 6
In the pattern 2 of “attribute =?”, The field “N
o. "" Corresponds to the record having "1.2.2.1". From this, it can be understood that the "attribute" portion should be used as a condition in addition to the structure of the pattern 2 stored in the knowledge base 6. Therefore, the content of the field "attribute" of the record in which the field "No." is "1.2.2.1" is set in the field "subexpression" as "attribute = figure".

【0030】この例では存在しないが、マークが付与さ
れたレコードの間にマークが付与されていないレコード
が存在する場合には、そのレコードの数と、それに関す
る知識ベースの部分構造パターンとから、親子関係の構
造の深さに関する自由度と、兄弟関係の間に存在してよ
い他の構造の数に関する自由度を決定し、フィールド
「部分式」の一部として、これも格納する。
Although not present in this example, if there is a record that is not marked between the marks that are marked, from the number of records and the partial structure pattern of the knowledge base related thereto, The degree of freedom regarding the depth of the structure of the parent-child relationship and the degree of freedom regarding the number of other structures that may exist during the sibling relationship are determined and also stored as part of the field "subexpression".

【0031】最後に、検索式合成部4により、図5で太
線で示したマークが付与された部分構造のレコードを順
次取り出し、検索を行なう装置が検索式として認識可能
な形式の表現で検索式を合成する。図7は、生成された
検索式の一例の説明図である。図7に示すように、検索
式自体はわかりにくい表現であるが、本発明の検索式作
成支援システムを用いることにより、検索式の表現方法
を知らなくても、図7に示すような検索式が自動的に生
成される。生成された検索式は、実際に検索を行なう装
置が理解できる表現であればよい。ユーザは、合成され
た検索式を用いて実際に検索を行なう装置により検索を
行なう。
Finally, the retrieval formula synthesizing unit 4 sequentially retrieves the records of the partial structure marked with the bold line in FIG. 5, and the retrieval formula is expressed in a format that can be recognized by the device that conducts the retrieval as the retrieval formula. To synthesize. FIG. 7 is an explanatory diagram of an example of the generated search formula. As shown in FIG. 7, although the search expression itself is an incomprehensible expression, by using the search expression creation support system of the present invention, the search expression as shown in FIG. Is automatically generated. The generated search formula may be any expression that can be understood by the device that actually performs the search. The user conducts a search using a device that actually performs the search using the synthesized search formula.

【0032】図7を用いて具体的に示したように、一般
に、構造化文書における検索式は木構造の形式で表現さ
れるものであり、 1.検索対象となるノードの属性の条件と、 2.検索対象の周辺に現れるべきノードの属性の条件
と、 3.検索対象のノードと2.のノードの位置関係 を特定するのである。例えば、図7に示した検索式で
は、検索対象は「領域の表題」であるから、「(属性=
領域の表題)」という表現が検索対象となるノードの属
性の条件であり、その他の「(属性=…)」という表現
が検索対象の周辺に現われるべきノードの属性の条件で
あり、それらを結んでいる‘/’や‘#’等は位置関係
を特定する条件である。位置関係を特定する条件におい
ては、検索式中のノードとノードを結ぶ枝の、文書の木
構造で実際にとる長さ(対応するノードとノード間に現
れるノードの数)に関する制約条件が含まれる。
As shown concretely with reference to FIG. 7, a search expression in a structured document is generally expressed in a tree structure format. 1. The condition of the attribute of the node to be searched, and 2. The condition of the attribute of the node that should appear around the search target, and The node to be searched and 2. The positional relationship of the nodes of is specified. For example, in the search formula shown in FIG. 7, since the search target is “area title”, “(attribute =
The expression "area title)" is the condition of the attribute of the node to be searched, and the other expression "(attribute = ...)" is the condition of the attribute of the node that should appear in the vicinity of the search target. “/”, “#”, And the like that are output are conditions that specify the positional relationship. The condition for specifying the positional relationship includes a constraint condition regarding the actual length of the branch connecting the nodes in the search expression in the document tree structure (the number of nodes that appear between the corresponding nodes). .

【0033】検索結果は、検索式中に記述された1.の
属性の条件を満たす文書構造中のノードであって、2.
に示したノード属性の条件を満たす文書構造中のノード
が周辺に存在し、さらにそれが3.に記述された位置関
係を満たすように存在するものである。すなわち、検索
結果は、文書の木構造の中にある検索式と同形の部分構
造(部分木)の中の1つのノードとなる。
The search result is 1. 1. A node in the document structure that satisfies the attribute condition of 2.
The nodes in the document structure satisfying the conditions of the node attribute shown in 3) exist in the vicinity, and further, it is 3. It exists so as to satisfy the positional relationship described in. That is, the search result is one node in the partial structure (subtree) having the same shape as the search expression in the document tree structure.

【0034】次に、第1の実施例における検索式の編集
に関する動作を説明する。上述のように、検索条件は、
例示のために与えられた文書の構造の部分構造(部分
木)となっている。一般に、検索条件を修正すること
は、この部分木の変形を行なうことに相当する。例え
ば、条件を強めようとする場合は、木の枝を追加した
り、枝の長さを固定ししてしまえばよい。逆に、条件を
弱める場合には、木の枝を刈ってしまったり、枝の長さ
を自由に変えても良いようにすれば良い。
Next, the operation relating to the editing of the retrieval formula in the first embodiment will be described. As mentioned above, the search condition is
It is a partial structure (partial tree) of the structure of the document given for illustration. In general, modifying the search conditions is equivalent to transforming this subtree. For example, if the condition is to be strengthened, a tree branch may be added or the branch length may be fixed. On the contrary, when the condition is weakened, the branches of the tree may be cut off or the length of the branches may be freely changed.

【0035】ところが、このように、条件式の部分木へ
の枝の追加や枝刈りを自由に行なうと、例示した部分ま
でもが検索できなくなってしまう危険がある。図8は、
検索式の編集を行なう際の問題点の説明図である。図8
の実線で示した部分は、図5においてマークが付与され
て検索式となった部分木を抜き出した検索条件の木構造
を示している。例えば、この木構造に、図8の破線で示
した新たな枝(“属性=テキスト”の枝)を加えてしま
うと、図5に示した構造化文書の木構造に重ねることが
できなくなる。そのため、検索式を生成する際に例示し
た部分構造が検索不能になってしまう。
However, if the branches are added or pruned freely to the subtree of the conditional expression in this way, there is a risk that even the illustrated portion cannot be searched. Figure 8
It is explanatory drawing of the problem at the time of editing a search formula. Figure 8
The portion indicated by the solid line indicates the tree structure of the search condition in which the partial tree that is the search expression with the mark added in FIG. 5 is extracted. For example, if a new branch (branch of "attribute = text") shown by the broken line in FIG. 8 is added to this tree structure, it cannot be overlapped with the tree structure of the structured document shown in FIG. Therefore, the partial structure illustrated when the search formula is generated becomes unsearchable.

【0036】文法的に正しいことの検査だけを行なった
場合は、図8に破線で示す枝を追加した条件は正しいの
で、このような誤りを発見できない。そこで、本発明に
おいては、編集時にも図5に示した構造を参照し、木構
造への枝の追加や、長さの指定を行なうことに相当する
編集作業を行なった場合には、その結果が図5の構造に
重ねることができる場合のみを許すように構成してい
る。このように、検索式編集部5は、誤り防止機能を含
んでいる。
If only the grammatical correctness is checked, such an error cannot be found because the condition of adding the branch shown by the broken line in FIG. 8 is correct. Therefore, in the present invention, when the editing work corresponding to adding a branch to the tree structure and designating the length is performed by referring to the structure shown in FIG. Is allowed only when it can be overlapped with the structure of FIG. As described above, the search expression editing unit 5 includes an error prevention function.

【0037】図9は、検索式編集部5における編集操作
の一例の説明図である。編集操作で行なえる変形は、例
えば、図9に示したように、枝の追加、枝の削除、枝の
長さの自由度、2つの枝の間(あるいは最も外側の枝の
さらに外側)に存在して良い別の枝の数の自由度、及
び、部分式のパターンの変更の5つの操作とすることが
できる。これらの編集操作に際して、検索式構造抽出部
2、検索条件抽出部3等の機能を利用することもでき
る。
FIG. 9 is an explanatory diagram of an example of the editing operation in the search expression editing unit 5. The modification that can be performed by the editing operation is, for example, as shown in FIG. 9, adding a branch, deleting a branch, freedom of branch length, between two branches (or further outside of the outermost branch). There can be five operations: the degree of freedom of the number of other branches that may exist, and the change of the subexpression pattern. For these editing operations, the functions of the search formula structure extraction unit 2, the search condition extraction unit 3, and the like can be used.

【0038】これらの操作の各々について、あるノード
において編集を行なうおうとした場合に、その操作が正
しいか否かを次のようにして判定する。
When an attempt is made to edit each of these operations at a certain node, it is determined as follows whether or not the operation is correct.

【0039】まず、枝の追加の場合には、各ノードは図
5に示したレコードに対応し、構造の親子関係と兄弟の
関係はリンクされているので、枝の追加を指示された方
向にこのリンクをたどり、レコードが存在すれば、枝の
追加は正しいものと判定することができる。枝の削除の
場合には、判定する必要がなく、いつでも正しい。ただ
し、削除する枝の両側の枝の間に存在して良い枝の数に
関する自由度を無限大に設定する。
First, in the case of adding a branch, each node corresponds to the record shown in FIG. 5, and since the parent-child relationship and the sibling relationship of the structure are linked, in the direction instructed to add a branch. Following this link, if the record exists, it can be determined that the addition of the branch is correct. In the case of branch deletion, there is no need to make a decision and it is always correct. However, the degree of freedom regarding the number of branches that may exist between the branches on both sides of the branch to be deleted is set to infinity.

【0040】枝の長さの自由度の変更の場合、まず、自
由度を大きくすることは、常に正しい。自由度を小さく
するときは、図5の親子関係のリンクをたどり、その長
さを調べ、設定された自由度がこの長さを含んでいれば
正しいと判定する。
In the case of changing the degree of freedom of the branch length, it is always correct to increase the degree of freedom first. When the degree of freedom is reduced, the parent-child relationship link in FIG. 5 is followed, the length is checked, and if the set degree of freedom includes this length, it is determined to be correct.

【0041】枝の間(最も外側の枝のさらに外側)に存
在して良い枝の数の自由度の場合には、まず、自由度を
大きくすることは、常に正しい。自由度を小さくすると
きは、図5の兄弟関係のリンクをたどり、その間の枝の
数を調べ、指定された自由度がこの数を含んでいれば正
しいと判定する。
In the case of the degree of freedom of the number of branches that may exist between the branches (further outside the outermost branch), it is always correct to increase the degree of freedom. When the degree of freedom is reduced, the sibling links in FIG. 5 are followed, the number of branches between them is checked, and if the designated degree of freedom includes this number, it is determined to be correct.

【0042】部分式のパターンの変更の場合には、対応
するレコードのフィールドを参照し、変更したパターン
に整合するならば、正しいと判定する。
In the case of changing the pattern of the sub-expression, the field of the corresponding record is referred to, and if it matches the changed pattern, it is determined to be correct.

【0043】このように、検索式編集部5では、ユーザ
からの編集操作の指示に従い、検索式合成部4で生成さ
れた検索式に対して編集を行なうが、その際に、上述の
ような判定方法により正しいとされた操作のみを実行す
ることによって、文法的にのみならず、意味的にも正し
い式の変形のみを常に行なうことができる。
As described above, the retrieval formula editing unit 5 edits the retrieval formula generated by the retrieval formula combining unit 4 in accordance with the instruction of the editing operation from the user. By executing only the operation that is determined to be correct by the determination method, it is possible to always perform only the transformation of the expression that is not only grammatically correct but also semantically correct.

【0044】上述の第1の実施例に記載されている検索
式作成支援システムを用いることによって、ユーザは検
索結果の1つを例示するだけで検索式を作成することが
できる。これによって、構造化文書の内部構造や式の文
法を知らない一般ユーザでも、検索式を簡単に得ること
ができるようになっている。しかし、本質的に、例示さ
れたものを検索可能な検索式は唯一ではなく、多数考え
られる。このため、自動合成された検索式による検索結
果に、意図したものに対する過不足が発生することは大
いに有り得る。そのような場合には、検索式を修正をし
なければならない。
By using the search expression creation support system described in the first embodiment, the user can create a search expression by only exemplifying one of the search results. As a result, even a general user who does not know the internal structure of a structured document or the grammar of an expression can easily obtain the search expression. However, in essence, the search formulas that can search the exemplified ones are not the only ones, and there are many possible. For this reason, it is highly possible that the search results obtained by the automatically-synthesized search formulas are deficient or insufficient with respect to the intended one. In such cases, the search formula must be modified.

【0045】上述の第1の実施例では、検索式の修正に
は、検索式編集手段を用いる。これにより、常に検索条
件の正しさを保ちつつ、検索式の編集を行なうことがで
きる。しかし、上述の検索式編集手段の実施例では、自
動的に得られた検索式を修正したい場合に、検索式自体
をユーザが修正することになる。このとき、どのように
修正すれば良いかはユーザが自分で考えなければならな
い。すなわち、ユーザは、構造化文書の内部構造や式の
文法に関するある程度の知識を再びここで要求されるこ
とになる。このように、検索式の修正は容易ではない。
In the above-described first embodiment, the retrieval formula editing means is used to modify the retrieval formula. As a result, the search formula can be edited while always maintaining the correct search conditions. However, in the above-described embodiment of the search formula editing means, when the user wants to correct the automatically obtained search formula, the user modifies the search formula itself. At this time, the user has to think for himself how to modify. That is, the user will again be required some knowledge of the internal structure of the structured document and the grammar of the expression. As such, it is not easy to modify the search formula.

【0046】以下に説明する第2の実施例では、誤った
条件式によって意図したものではない検索結果が得られ
た場合に、検索式側ではなく、検索結果の方の誤ってい
る部分を指摘することにより、検索式を自動修正できる
検索式作成支援システムについて説明する。
In the second embodiment described below, when an unintended retrieval result is obtained due to an incorrect conditional expression, the erroneous portion of the retrieval result is pointed out rather than the retrieval expression side. By doing so, a search formula creation support system capable of automatically correcting a search formula will be described.

【0047】第1の実施例でも述べたように、一般に、
検索式は木構造で表現されており、検索条件を修正する
ことは、検索式の木構造の変形を行なうことに相当す
る。図9を用いて説明したように、例えば、図9の実線
で示した部分木をもとの検索条件であるとすると、これ
に図9の破線で示したような枝の状態に関する変化を加
えることにより、検索条件を修正することができる。条
件を強めようとする場合は、木の枝を追加したり、枝の
長さを固定してしまえばよい。すなわち、もとの文書の
検索結果の構造である木に重ねることができなくすれ
ば、この部分は検索結果には含まれないことになる。逆
に条件を弱める場合には、木の枝を刈ってしまったり、
枝の長さを自由に変えても良いようにすればよい。
As described in the first embodiment, in general,
The search expression is represented by a tree structure, and modifying the search condition is equivalent to modifying the tree structure of the search expression. As described with reference to FIG. 9, assuming that the subtree shown by the solid line in FIG. 9 is the original search condition, a change related to the state of the branch as shown by the broken line in FIG. 9 is added to this. By doing so, the search condition can be modified. If you want to strengthen the condition, you can add a tree branch or fix the branch length. That is, if the tree that is the structure of the search result of the original document cannot be overlapped, this part is not included in the search result. On the contrary, if you want to weaken the condition, cut the branches of the tree,
The length of the branches may be freely changed.

【0048】図10は、本発明の検索式作成支援システ
ムの第2の実施例を示すブロック図である。図中、21
は検索式修正処理部、22は推論部、23は構造解析
部、24はデータベース、25は構造化文書である。こ
のほかに、図示しない入力部と検索部が存在する。
FIG. 10 is a block diagram showing a second embodiment of the search expression creation support system of the present invention. 21 in the figure
Is a retrieval formula correction processing unit, 22 is an inference unit, 23 is a structure analysis unit, 24 is a database, and 25 is a structured document. In addition to this, there are an input unit and a search unit (not shown).

【0049】検索式修正処理部21は、ユーザからの誤
りの指摘を入力部から受け取り、推論部22、構造解析
部23を用いて、指摘された構造化文書の部分構造を検
索結果として含めるように、あるいは、検索結果から除
くように、検索式を修正する。
The retrieval formula correction processing unit 21 receives an error indication from the user from the input unit, and uses the inference unit 22 and the structure analysis unit 23 to include the indicated partial structure of the structured document as a retrieval result. Or modify the search expression so that it is excluded from the search results.

【0050】推論部22は、検索式修正処理部21から
の要求に従い、検索式の修正の是非の判断や、検索式の
修正案の提示、データベース24への登録と検索を行な
う。データベース24には、推論部22への問い合わせ
に含まれている構造の各枝についての情報を格納してい
る。各枝について、その枝が現在の検索式に含まれてい
るか否か、その枝の長さの自由度はどのようになってい
るかに関する情報がすべて仮説として登録される。ま
た、ユーザからの指摘等により正しくないとわかった仮
説の組み合わせについて、正しくない旨の情報と、正し
くないことの理由も登録される。正しくないことの理由
としては、ユーザが誤りとして指摘したノードを登録す
ることができる。データベース24には、さらに、検索
式の全体の木の大きさ、取り除く枝の数、木の形等か
ら、その枝に対する変更の是非を評価する評価関数が予
め登録されている。評価関数は入力パラメタとして木の
形を含んでいる。それゆえ、木の形と数式の対の形態で
定義されている。
According to the request from the search formula correction processing unit 21, the inference unit 22 determines whether or not to correct the search formula, presents a correction plan for the search formula, and registers and searches in the database 24. The database 24 stores information about each branch of the structure included in the inquiry to the inference unit 22. For each branch, all information about whether or not the branch is included in the current search formula and the degree of freedom of the length of the branch is registered as a hypothesis. In addition, regarding a combination of hypotheses that is found to be incorrect due to a user's indication or the like, information indicating that the combination is incorrect and the reason for the incorrectness are also registered. The reason for incorrectness can be to register the node that the user has pointed out to be incorrect. Further, the database 24 is pre-registered with an evaluation function for evaluating the suitability of a change to the branch based on the size of the entire tree of the search expression, the number of branches to be removed, the shape of the tree, and the like. The evaluation function includes a tree shape as an input parameter. Therefore, it is defined in the form of a pair of a tree and a mathematical formula.

【0051】構造解析部23は、検索式修正処理部1の
指示に従い、検索式の構造の解析を行なうとともに、構
造化文書25の部分構造と検索式の構造を比較し、その
比較結果を、あるいは、所定の部分構造を抽出する。例
えば、推論部22から提示された修正案が、ユーザから
指摘された枝を含むか否かを、構造化文書25の部分構
造と修正案とを比較し、結果を報告する。また、追加す
べきノードが存在する場合に、そのノードの周辺には存
在せず、検索式にのみ存在する枝を抽出したり、削除す
るノードが存在するとき、その削除すべきノードの周辺
には存在せず、正しいとわかっているノードの周辺には
存在する枝を抽出する。
The structure analysis unit 23 analyzes the structure of the search expression according to the instruction of the search expression correction processing unit 1, compares the partial structure of the structured document 25 with the structure of the search expression, and outputs the comparison result. Alternatively, a predetermined partial structure is extracted. For example, whether or not the correction proposal presented by the inference unit 22 includes the branch pointed out by the user is compared with the partial structure of the structured document 25 and the correction proposal, and the result is reported. In addition, when there is a node to be added, when there is a node that does not exist around that node but exists only in the search expression, or when there is a node to delete, there is a node around that node that should be deleted. Extracts branches that do not exist, but exist around nodes that are known to be correct.

【0052】図11は、本発明の検索式作成支援システ
ムの第2の実施例における動作の一例を説明するフロー
チャートである。検索式修正処理部21は、最初に、S
31において上述の第1の実施例で自動合成した検索
式、あるいは、ユーザが直接与えた検索式を現在の検索
式として得る。そして、この検索式について、S32で
検索式の木構造の各枝とその長さに関する状態を解析す
ることを構造解析部23に依頼する。
FIG. 11 is a flow chart for explaining an example of the operation in the second embodiment of the search expression creation support system of the present invention. First, the search formula correction processing unit 21 first executes S
At 31, the search formula automatically synthesized in the first embodiment or the search formula directly given by the user is obtained as the current search formula. Then, the structure analysis unit 23 is requested to analyze the state related to each branch and the length of the tree structure of the search expression in S32 for this search expression.

【0053】S33において、構造解析部22からの返
答に基づき、各枝の長さと、その枝が検索式に含まれる
ことが正しいことを仮説として、推論部22に通知す
る。推論部22では、この通知に基づき、検索式の各枝
についての情報をデータベース24へ登録する。
In S33, the inference unit 22 is notified based on the response from the structure analysis unit 22 as a hypothesis that the length of each branch and the fact that the branch is included in the search formula are correct. Based on this notification, the inference unit 22 registers information about each branch of the search expression in the database 24.

【0054】S34において、現在の検索式を用いて、
図示しない検索部により検索を行ない、検索結果をユー
ザに提示する。ユーザは、提示された検索結果を参照
し、S35において、ユーザが意図したものに対する過
不足があるか否かを判断する。過不足があった場合に
は、S36において、ユーザは誤っている部分を順次指
摘する。この指摘が検索結果の不足を指摘するものであ
る場合には、S37からS38へ進み、指摘されたノー
ドが検索結果に追加されるように、検索式を修正する処
理を行なう。また、ユーザの指摘が冗長な検索結果を指
摘するものである場合には、S37からS39へ進み、
指摘されたノードを除外して検索されるように、検索式
を修正する処理を行なう。そして、修正された検索式を
現在の検索式として、S34へ戻って、更なる修正を行
なうことが可能である。
At S34, using the current search formula,
A search unit (not shown) performs a search and presents the search result to the user. The user refers to the presented search result and determines in S35 whether or not there is an excess or deficiency with respect to what the user intended. If there is an excess or deficiency, the user sequentially points out the incorrect portion in S36. If this indication indicates that the search result is insufficient, the process proceeds from S37 to S38, and the process of modifying the search expression is performed so that the indicated node is added to the search result. If the user's indication indicates a redundant search result, the process proceeds from S37 to S39.
A process of correcting the search formula is performed so that the specified node is excluded from the search. Then, with the modified search expression as the current search expression, it is possible to return to S34 and make further modifications.

【0055】図12は、追加ノード指定による検索式の
修正処理の一例を示すフローチャートである。現在の検
索式によって得られた検索結果に不足しているノードが
存在する場合について説明する。この場合、検索結果と
して含まなければならないものの例を、ユーザが指摘す
ることになる。以下では、この指摘された部分を追加ノ
ードと呼ぶことにする。指摘する追加ノードは、1つに
限らず、複数指摘することが可能である。
FIG. 12 is a flow chart showing an example of the correction processing of the search expression by specifying the additional node. A case will be described in which there is a missing node in the search results obtained by the current search formula. In this case, the user points out an example of what must be included as a search result. Hereinafter, this pointed out portion will be referred to as an additional node. The number of additional nodes to be pointed out is not limited to one, but a plurality of points can be pointed out.

【0056】検索式修正処理部21は、S41におい
て、構造解析部23に対し、検索式の木構造と、構造化
文書25における追加ノードおよびその周辺の構造を比
較することにより、追加ノードの周辺には存在せず、検
索式の構造にのみ存在するような、検索式の枝を全て見
つけるように指示する。構造解析部23は、検索式の各
枝ごとに、追加ノードの周辺の枝に、対応するものが存
在するか否かを調べる。このとき、検索式の各枝は、枝
の長さを自由に変えて良いものとして調べ、検索式修正
処理部21に対して返答する。枝の長さを固定された状
態から自由に変えられる状態に変更して調べた場合に
は、枝の長さを自由に変えられる状態に変更した枝に関
する情報も、返答に含まれる。
In S41, the retrieval formula modification processing unit 21 compares the tree structure of the retrieval formula with the structure of the additional node and its surroundings in the structured document 25 to the structure analysis unit 23, thereby determining the periphery of the additional node. To find all branches of the search expression that do not exist in, but exist only in the structure of the search expression. The structure analysis unit 23 checks, for each branch of the search expression, whether or not there is a corresponding branch around the additional node. At this time, each branch of the search formula is examined as if the length of the branch can be freely changed, and a reply is sent to the search formula correction processing unit 21. When the length of the branch is changed from the fixed state to the freely changeable state and the check is performed, information about the branch whose length is freely changed is also included in the reply.

【0057】S42において、検索式修正処理部21
は、推論部22に対し、前述の構造解析部23からの返
答で得た、検索式の構造にのみ存在する枝を、全て検索
式から取り除いて良いかどうかを問い合わせる。推論部
22に問い合わせる際には、なぜそれらの枝を取り除き
たいかという理由として、追加ノードを通知する。推論
部22では、枝を取り除いてよいか否かを評価し、可否
を検索式修正処理部21に通知する。同様に、S43に
おいて、構造解析部23で枝の長さを自由に変えられる
状態に変更した枝に関しても、自由にして良いか否かを
推論部22に問い合わせ、推論部22からの返答を受け
取る。
In S42, the retrieval formula correction processing unit 21
Asks the inference unit 22 whether or not it is possible to remove from the search formula all the branches obtained only in the structure of the search formula, which are obtained in response from the structure analysis unit 23. When making an inquiry to the inference unit 22, the additional node is notified as the reason why those branches are to be removed. The inference unit 22 evaluates whether or not the branch may be removed, and notifies the search expression correction processing unit 21 of the possibility. Similarly, in S43, the inference unit 22 is inquired as to whether or not the branch whose free length is changed by the structure analysis unit 23 can be freely changed, and the reply from the inference unit 22 is received. .

【0058】S44において、推論部22から全ての許
可が出ると、検索式の修正は可能である。このとき、推
論部22は、許可を出すだけではなく、検索式への別の
枝の追加や枝の長さの指定に関する指示をも出すので、
これに従って、検索式修正処理部21は、検索式の木構
造をその状態に変化させる。すなわち、S45で推論部
22から許可の出た枝の削除を行ない、S46で推論部
22から指示された枝の追加を行ない、S47で推論部
22から指示された枝の長さの変更を行なう。これらの
処理によって、検索式修正処理部21における追加ノー
ドによる検索式の木構造の変更処理が完了する。
In S44, if all the inquiries are given from the inference unit 22, the retrieval formula can be modified. At this time, the inference unit 22 not only issues the permission, but also issues an instruction regarding addition of another branch to the search expression and designation of the branch length.
According to this, the search formula correction processing unit 21 changes the tree structure of the search formula to that state. That is, the branch permitted by the inference unit 22 is deleted in S45, the branch instructed by the inference unit 22 is added in S46, and the length of the branch instructed by the inference unit 22 is changed in S47. . With these processes, the process of changing the tree structure of the search formula by the additional node in the search formula modification processing unit 21 is completed.

【0059】S44において、推論部22から1つでも
許可が出なかった枝が存在する場合には、その部分は別
の式で検索するべきであると判断し、修正を諦める。そ
して、ユーザにその旨を知らせたり、その部分のための
検索式を自動合成する処理を呼び出すなどの措置を取
る。
In S44, if there is any branch for which the inference unit 22 has not given permission, it is judged that the branch should be searched by another formula, and the correction is given up. Then, measures such as notifying the user of that fact and calling a process for automatically synthesizing a search expression for the part are taken.

【0060】図13は、検索式の修正の具体例を説明す
るための構造化文書の部分構造の一例の説明図、図14
は、修正対象となる検索式の構造の一例を示す説明図で
ある。例えば、図13に示すような構造を持つ構造化文
書に対し、図14に示す破線部を含む構造を有する検索
式で検索を行なう場合を考える。図中の*印は抽出位置
を示している。この場合、検索結果は図13のノードa
「序論は面白くなかったと思うが……」である。ここ
で、ユーザが図13のノードb「はじめに……」も検索
結果として現れるべきであるという指摘を行なう。する
と、構造解析部23によって、図14に示した検索式の
構造と、図13のノードbを含む周囲の部分構造を比較
し、ノードbの周囲には存在せず、検索式の構造にのみ
存在する枝を抽出する。この例では、図14に破線で示
した枝kが図13のノードbの周辺には存在しないの
で、構造解析部23によって、この枝kが抽出される。
そして、推論部22がこの枝kを検索式の構造から取り
除いて良いと許可すれば、検索式修正処理部21は検索
式の構造から枝kを取り除き、図14に実線で示す構造
のみとなるように検索式が修正される。そして、修正さ
れた検索式によって検索を行なうことにより、検索結果
には、図13のノードaとノードbの両方の部分が含ま
れるようになる。
FIG. 13 is an explanatory view of an example of a partial structure of a structured document for explaining a concrete example of correction of a search expression, and FIG.
FIG. 7 is an explanatory diagram showing an example of the structure of a search expression to be modified. For example, consider a case where a structured document having a structure as shown in FIG. 13 is searched by a search formula having a structure including a broken line part as shown in FIG. The * mark in the figure indicates the extraction position. In this case, the search result is node a in FIG.
"I think the introduction wasn't interesting ..." Here, the user points out that the node b “Introduction ...” in FIG. 13 should also appear as a search result. Then, the structure analysis unit 23 compares the structure of the search expression shown in FIG. 14 with the surrounding partial structure including the node b of FIG. 13, and does not exist around the node b, and only the structure of the search expression is present. Extract existing branches. In this example, since the branch k indicated by the broken line in FIG. 14 does not exist around the node b in FIG. 13, the structure analysis unit 23 extracts the branch k.
Then, if the inference unit 22 permits this branch k to be removed from the structure of the search expression, the search expression correction processing unit 21 removes the branch k from the structure of the search expression, and only the structure shown by the solid line in FIG. 14 is obtained. The search formula is modified as follows. Then, by performing the search using the modified search formula, the search result includes both the parts of the node a and the node b in FIG.

【0061】図15は、削除ノード指定による検索式の
修正処理の一例を示すフローチャートである。検索結果
として余分なものが得られた場合には、ユーザが検索結
果として余分であるものの例を指摘することになる。以
下では、この指摘された部分を削除ノードと呼ぶことに
する。
FIG. 15 is a flow chart showing an example of the correction processing of the search expression by designating the deleted node. When an extra result is obtained as a search result, the user points out an example of the extra result. Hereinafter, this pointed out portion will be referred to as a deletion node.

【0062】ユーザが削除ノードを指示すると、S51
において、検索式修正処理部21は推論部22に対し、
現在の検索式が正しくないので修正方法の指示を出すよ
うに要求する。推論部22から修正の指示が来た場合
は、S52からS53へ進み、検索式修正処理部21
は、推論部22から受けた指示に基づく検索式の修正に
よって、削除ノードが検索結果に含まれないようになる
か否かを調べるように構造解析部23に依頼する。S5
4において、構造解析部23から、削除ノードが含まれ
ないようになるという返答を得た場合には、S55にお
いて、先に推論部22から得た修正の指示を採用し、そ
の指示の通りに検索式の構造をその状態に変化させる。
When the user designates a deletion node, S51
In the above, the retrieval formula correction processing unit 21 instructs the inference unit 22 to
The current search formula is incorrect and requires you to give instructions on how to correct it. When a correction instruction is received from the inference unit 22, the process proceeds from S52 to S53, and the search formula correction processing unit 21
Requests the structure analysis unit 23 to check whether or not the deleted node will not be included in the search result by modifying the search expression based on the instruction received from the inference unit 22. S5
In step 4, when the reply from the structure analysis unit 23 indicates that the deleted node will not be included, in S55, the correction instruction previously obtained from the inference unit 22 is adopted, and according to the instruction Change the structure of the search expression to that state.

【0063】S54において、推論部22から受けた修
正指示にしたがっても依然として削除ノードが検索結果
に含まれてしまう場合は、S56において、推論部22
に対し、先の修正案が正しくないので新たな修正方法の
指示を出すように要求する。そして、S52へ戻り、検
索式修正処理部21は推論部22から正しい修正案が与
えられるまでこれを繰り返す。
If the deleted node is still included in the search result in accordance with the correction instruction received from the inference unit 22 in S54, the inference unit 22 is executed in S56.
Request that a new correction method be instructed because the previous correction plan is incorrect. Then, the process returns to S52, and the retrieval formula correction processing unit 21 repeats this until the inference unit 22 gives a correct correction plan.

【0064】S52において、推論部22から修正でき
ないとの返答を受けた場合には、S57以降の処理を行
なう。S57において、検索式修正処理部21は構造解
析部23に対し、すでに検索対象として正しいとわかっ
ているノード周辺の構造と削除ノード周辺の構造に対し
て、検索式の木構造と重なる部分木に接している枝であ
って、正しいとわかっているノード周辺には存在し、な
おかつ削除ノード周辺には対応する枝が存在しないよう
な枝を全て見つけるように指示する。そして、S58に
おいて、構造解析部23によって抽出された枝のどれを
検索式に追加したら良いかを推論部22に問い合わせ
る。このとき、追加したい理由として削除ノードを通知
する。推論部22は、構造解析部23で抽出された枝の
中から1本を選び、その長さを指定して検索式の木に追
加するように、指示を検索式修正処理部21へ返す。推
論部22から追加の指示が返された場合には、S59か
らS60へ進み、検索式修正処理部21は、推論部22
からの追加の指示に従って、検索式の木の構造をその状
態に変化させる。
When the response from the inference unit 22 indicating that the correction cannot be made is received in S52, the processes in and after S57 are performed. In S57, the search formula modification processing unit 21 instructs the structure analysis unit 23 to create a partial tree that overlaps the search formula tree structure with respect to the structure around the node and the structure around the deleted node that are already known to be correct as the search target. It is instructed to find all branches that are in contact with each other and that exist around the node that is known to be correct, but do not have a corresponding branch around the deleted node. Then, in S58, the inference unit 22 is inquired about which of the branches extracted by the structure analysis unit 23 should be added to the search formula. At this time, the deleted node is notified as the reason for adding. The inference unit 22 returns an instruction to the search formula correction processing unit 21 so as to select one from the branches extracted by the structure analysis unit 23, specify its length, and add it to the search formula tree. When an additional instruction is returned from the inference unit 22, the process proceeds from S59 to S60, and the retrieval formula correction processing unit 21
Change the structure of the search expression tree to that state according to additional instructions from.

【0065】あるいは、S59において、推論部22が
どの枝も追加しない方が良いと判断し、そのような返答
が来た場合には、その部分は別の方法、例えば、ノード
の属性などを変更して除外するべきであると判断し、修
正を諦める。そして、ユーザにその旨を知らせたり、そ
の部分を除外するためのノード属性を自動的に求める処
理を呼び出すなどの措置をとる。
Alternatively, in S59, the inference unit 22 determines that it is better not to add any branch, and when such a reply is received, that part is changed by another method, for example, the node attribute or the like is changed. And decide that it should be excluded, and give up the correction. Then, measures are taken such as notifying the user of that fact and calling a process for automatically obtaining a node attribute for excluding the part.

【0066】具体例として、上述の図13、図14を用
いて説明する。例えば、図13に示すような構造を持つ
構造化文書に対し、図14に示す実線部のみの検索式の
構造により検索を行なった場合を考える。このときの検
索結果は、図13のノードa「はじめに……」、およ
び、ノードb「序論は面白くなかったと思うが……」の
部分となる。ここで、ユーザが図13のノードbの部分
は検索結果として現れるべきではないという指摘をする
と、検索式修正処理部21は推論部22に対して、修正
方法の指示を要求する。ここでは、推論部22から修正
できないとの返答を受けたとする。
A concrete example will be described with reference to FIGS. 13 and 14 described above. For example, consider a case where a structured document having a structure as shown in FIG. 13 is searched by the structure of the search formula of only the solid line part shown in FIG. The search result at this time is the part of the node a “Introduction ...” and the node b “I think the introduction was not interesting ...” in FIG. Here, when the user points out that the part of the node b in FIG. 13 should not appear as a search result, the search formula correction processing unit 21 requests the inference unit 22 to instruct the correction method. Here, it is assumed that the inference unit 22 has received a reply that the correction cannot be made.

【0067】検索式修正処理部21は構造解析部23に
対して、図13のノードaとノードbの周辺の図14の
実線部の木に相当する部分木を調べるように要求する。
この例の場合には、正しいとわかっているノードaの検
索式の木構造と重なる部分木に接する枝l,m,nを求
める。このうち、枝mはノードbの周辺に対応する枝が
存在するので、ここでは枝l,nが抽出される。抽出さ
れた枝l,nは、推論部22に送られ、このうちの1本
が選択される。例えば、推論部22が枝lを検索式の枝
に追加するのが最も良いと判断した場合には、検索式修
正処理部21は、図14に破線で示すように、図13の
枝lに相当する枝kを含むように検索式の構造を修正す
る。この修正によって、修正後の検索式を用いた検索結
果には、図3のノードbの部分は含まれないようにな
る。
The retrieval formula modification processing unit 21 requests the structure analysis unit 23 to examine a subtree around the nodes a and b in FIG. 13 corresponding to the solid line tree in FIG.
In the case of this example, the branches l, m, and n that are in contact with the subtree that overlaps the tree structure of the search expression of the node a that is known to be correct are obtained. Among them, since the branch m has a branch corresponding to the periphery of the node b, the branches l and n are extracted here. The extracted branches l and n are sent to the inference unit 22 and one of them is selected. For example, when the inference unit 22 determines that it is best to add the branch l to the branch of the search expression, the search expression correction processing unit 21 adds the branch l to the branch l of FIG. 13 as indicated by the broken line in FIG. Modify the structure of the search expression to include the corresponding branch k. By this modification, the search result using the modified search formula does not include the node b portion in FIG.

【0068】以上からわかるように、ユーザは誤ってい
る部分をはじめから全て指摘する必要はなく、適当に指
摘したならば、検索を実行し、この処理を繰り返し行な
い、意図した結果が得られたところで修正を止めれば良
い。途中で検索の実行を行なうことは、本発明の検索式
修正処理に何等影響を与えない。
As can be seen from the above, the user does not have to point out all the erroneous portions from the beginning, and if he points appropriately, a search is executed and this process is repeated to obtain the intended result. By the way, you can stop the correction. Executing the search on the way does not affect the search formula modification process of the present invention.

【0069】図16ないし図19は、推論部22の動作
の一例を説明するフローチャートである。推論部22に
対する要求は、上述の説明からもわかるように、以下の
ようなものである。 要求1.各枝が検索式に含まれるという情報と、その長
さに関する情報とを仮説としてデータベース24に登録
すること。(図11のS33) 要求2.検索式から枝を取り除くか、長さを自由にする
ことの是非を判断すること。(図12のS42,S4
3) 要求3.現在の検索式が正しくない時に、修正案を提示
すること。(図15のS51) 要求4.検索式に加えることが可能な枝の候補の中か
ら、1本の枝を選ぶこと。(図15のS58)
16 to 19 are flowcharts for explaining an example of the operation of the inference unit 22. The request to the inference unit 22 is as follows, as can be seen from the above description. Request 1. The information that each branch is included in the search formula and the information regarding the length thereof are registered in the database 24 as hypotheses. (S33 of FIG. 11) Request 2. Decide whether to remove the branch from the search expression or to free the length. (S42 and S4 in FIG.
3) Request 3. Submit a suggestion when the current search formula is incorrect. (S51 in FIG. 15) Request 4. Select one branch from the branch candidates that can be added to the search formula. (S58 in FIG. 15)

【0070】図16のS61において、推論部22は要
求を受け付ける。S62において、受け付けた要求が上
述の要求1ないし要求4のどの内容かを判定し、その要
求に応じてS63ないしS66の処理のうちどれかを選
択的に実行する。そして、S67において、要求元へ回
答を返す。
In S61 of FIG. 16, the inference unit 22 receives the request. In S62, it is determined which of the above-mentioned request 1 to request 4 the received request is, and in accordance with the request, any one of the processes of S63 to S66 is selectively executed. Then, in S67, an answer is returned to the request source.

【0071】以下、各々の要求に対する処理について、
一例を説明する。上述の要求1に関しては、各枝が検索
式に含まれるという情報と、その長さに関する情報とを
仮説として、データベース24に登録を行なう処理のみ
を行なう。
The processing for each request will be described below.
An example will be described. Regarding request 1 described above, only the process of registering in the database 24 is performed by using the information that each branch is included in the search expression and the information regarding its length as a hypothesis.

【0072】要求2に関しては、図17のS71におい
て、まず、検索式の部分木になっている木に対応する評
価関数をデータベース24から検索する。ここで、部分
木になっているか否かの判定は、構造解析部23が行な
う。あらかじめ優先順位を考慮して木構造をデータベー
ス24に格納しておくことにより、最初に検索されたデ
ータを採用すればよいように構成することができる。検
索された木構造に対応する評価関数から数式を取り出
す。そして、S72において、その数式に木の形以外の
引数、例えば、検索式の全体の大きさ、取り除く枝の数
等の情報を与えて計算を行なう。
Regarding the request 2, in S71 of FIG. 17, first, the evaluation function corresponding to the tree which is the subtree of the search expression is searched from the database 24. Here, the structure analysis unit 23 determines whether or not it is a subtree. By storing the tree structure in the database 24 in consideration of the priority order in advance, it is possible to adopt the first searched data. A mathematical expression is extracted from the evaluation function corresponding to the searched tree structure. Then, in S72, the mathematical expression is given an argument other than the tree shape, for example, information such as the overall size of the search expression and the number of branches to be removed.

【0073】S73において、計算された評価値が予め
設定された範囲に入っているか否かを判定し、範囲に入
っていない場合には、S74において、検索式から枝を
取り除くこと、あるいは、長さを自由にすることを許可
しないことを回答として、要求元へ返す。評価値が範囲
に入っている場合には、S75において、その要求を許
可する旨の回答を要求元へ返す。そして、S76におい
て、現在の検索式に含まれる枝の状態の組み合わせが正
しくないことを、データベース24に理由をつけて登録
する。また、S77において、取り除くか、あるいは長
さを自由にした枝に関して、データベース24内の情報
を、仮説が成立しない状態に更新する。
In S73, it is determined whether or not the calculated evaluation value is within the preset range. If it is not within the range, in S74, the branch is removed from the search expression or the length is increased. It is returned to the request source as an answer not to allow freeness. If the evaluation value is within the range, in S75, a reply to the effect that the request is permitted is returned to the request source. Then, in S76, the fact that the combination of branch states included in the current search formula is incorrect is registered in the database 24 with a reason. Further, in S77, the information in the database 24 is updated to the state in which the hypothesis is not established regarding the branch which has been removed or whose length has been freely set.

【0074】例えば、上述の図14に示した検索式の構
造において、破線で示した枝kを検索式の枝から取り除
く場合、図14に示す検索式の構造の部分木になってい
るデータをデータベース24から検索して取り出す。取
り出されたデータと対になっている数式が、例えば、 (1−(削除する枝の数)/(全体の木の枝の数))*
100 という式であったとする。削除する枝の数は1本であ
り、全体の木の枝の数は5本である。これらの値を代入
し、評価値は(1−1/5)*100=80となる。そ
して削除許可を出すのは、この値が60以上のときと定
義されていれば、削除の許可を出すことになる。もちろ
ん、削除許可を出すのを90以上と定義していれば、削
除の許可は出されない。
For example, in the structure of the search formula shown in FIG. 14 described above, when the branch k indicated by the broken line is removed from the branch of the search formula, the data which is the subtree of the structure of the search formula shown in FIG. Search and retrieve from database 24. The formula paired with the extracted data is, for example, (1- (the number of branches to be deleted) / (the number of branches of the entire tree)) *
It is assumed that the expression is 100. The number of branches to be deleted is one, and the number of branches of the entire tree is five. By substituting these values, the evaluation value becomes (1-1 / 5) * 100 = 80. Then, the deletion permission is issued if the value is defined to be 60 or more. Of course, if the deletion permission is defined to be 90 or more, the deletion permission is not issued.

【0075】ところで、この実施例では、以下でも2つ
の別の評価関数が利用される。それらについても実現方
法は同様である。ただし、以下の2つの評価関数は、よ
り早く正しい検索式へと到達するための工夫でしかない
ので、例えば、乱数や定数を返すものであっても良い。
その場合は、ユーザが意図した式に到達するのに、少し
多めに誤りの指摘が必要となるかもしれないということ
だけである。
By the way, in this embodiment, two different evaluation functions are used below. The implementation method is the same for them. However, since the following two evaluation functions are merely devised to reach a correct search expression sooner, they may return a random number or a constant, for example.
In that case, it may just be that the user needs a little more error indication to reach the intended expression.

【0076】要求3に関しては、まず、図18のS81
において、現在の検索式に含まれる枝の状態の組み合わ
せが正しくないことをデータベース24に理由をつけて
登録する。S82において、データベース24に登録さ
れている仮説のどれかを翻し、新たな検索式の候補を求
める。このとき、これまでの推論部22に対する要求に
よって、データベース24に登録されている、正しくな
いとわかっている枝の組み合わせを含んでしまうような
状態以外の状態を全て求める。これにより、過去に正し
くないと判断した履歴を用いた学習効果を得ることがで
きる。求めた状態は複数存在する。そのため、S83に
おいて、各状態に関して用意された評価関数を用いて評
価を行なう。S84において、計算した評価値に基づ
き、最も評価値の高いものを選ぶ。S85で評価値が所
定の範囲内か否かを判定し、所定範囲外の場合には、S
86で修正案がないことを回答として要求元へ返す。最
高の評価値が所定範囲内の場合には、S87において、
最高の評価値の状態を得るるために翻した仮説の情報を
修正案として要求元へ返す。そして、S88において、
翻した仮説について、データベース24に反映させる。
Regarding the request 3, first, S81 in FIG.
In (2), the fact that the combination of branch states included in the current search formula is incorrect is registered in the database 24 with a reason. In S82, one of the hypotheses registered in the database 24 is reversed to obtain a new search expression candidate. At this time, all the states other than the states that include combinations of branches that are known to be incorrect and are registered in the database 24 are obtained by the request to the inference unit 22 up to this point. As a result, it is possible to obtain the learning effect using the history that was determined to be incorrect in the past. There are multiple calculated states. Therefore, in S83, evaluation is performed using the evaluation function prepared for each state. In S84, the highest evaluation value is selected based on the calculated evaluation values. In S85, it is determined whether or not the evaluation value is within a predetermined range.
At 86, the fact that there is no correction plan is returned to the request source as an answer. If the highest evaluation value is within the predetermined range, in S87,
The information of the hypothesis that was converted to obtain the state of the highest evaluation value is returned to the request source as a correction proposal. Then, in S88,
The converted hypothesis is reflected in the database 24.

【0077】要求4に関しては、図19のS91におい
て、木の形等を基にデータベース24を検索して、追加
の是非を評価するための評価関数を得る。そして、S9
2において、得られた評価関数を用いて、追加候補の各
枝について、その枝と検索式の全体の木の大きさを入力
として評価する。S93において、評価関数による評価
結果の最も良いものを選ぶ。S94において、選択した
評価結果が有効なものか否かを判定し、有効でなければ
S95において追加を許可しない旨を要求元へ返す。評
価結果が有効であれば、S96において、選択した評価
結果を有する枝を追加するように、要求元へ返答する。
S97において、現在の検索式に含まれる枝の状態の組
み合わせが正しくないことをデータベース24に理由を
つけて登録する。また、S98において追加候補の各枝
について、データベース24の情報を更新する。このと
き、選択した枝については、その仮説が成立する状態と
して登録し、選択しなかった枝については仮説が成立し
ない状態として登録する。
With respect to the request 4, in S91 of FIG. 19, the database 24 is searched based on the shape of the tree or the like to obtain an evaluation function for evaluating whether or not to add. And S9
In step 2, the obtained evaluation function is used to evaluate, with respect to each branch of the addition candidate, the size of the branch and the entire tree of the search expression as an input. In S93, the best evaluation result by the evaluation function is selected. In S94, it is determined whether or not the selected evaluation result is valid, and if it is not valid, it is returned to the request source that the addition is not permitted in S95. If the evaluation result is valid, in S96, a reply is made to the request source to add a branch having the selected evaluation result.
In S97, the fact that the combination of the branch states included in the current search formula is incorrect is registered in the database 24 with a reason. Further, in S98, the information in the database 24 is updated for each branch of the addition candidate. At this time, the selected branch is registered as a state in which the hypothesis holds, and the branch not selected is registered as a state in which the hypothesis does not hold.

【0078】上述のフローチャートでもわかるように、
図17のS76、図18のS81、図19のS97等に
おいて、検索式に含まれる枝の集合が正しくないことを
データベースに登録し、図18のS82で、この登録さ
れている正しくない枝の集合を含むような検索式の候補
を排除している。これにより、2度と同じ過ちを繰り返
すことなく修正が行なわれていくので、指摘箇所が多く
なれば、次第に確実に正しい式に近づけることができ
る。また、正しくない枝の状態の組み合わせには理由が
ついているので、この理由そのものを取り消した場合に
は、もとの状態に戻すことも可能であり、ユーザの誤り
指摘の操作が誤りであった場合にも対処することができ
る。
As can be seen from the above flow chart,
In S76 of FIG. 17, S81 of FIG. 18, S97 of FIG. 19, etc., the fact that the set of branches included in the search formula is incorrect is registered in the database, and in S82 of FIG. Search formula candidates that include sets are excluded. As a result, corrections are made without repeating the same mistakes as twice, so that if the number of points pointed out increases, it is possible to gradually approach the correct expression. In addition, because there is a reason for the incorrect combination of branch states, it is possible to return to the original state if this reason itself is canceled, and the user's error pointing operation was incorrect. You can also deal with it.

【0079】この第2の実施例は、この構成を単独で用
いることももちろん可能であり、その場合には、検索式
が予め与えられることになる。また、第1の実施例にお
ける検索式編集部5として組み込むこともできる。この
場合には、検索式構造抽出部2、検索条件抽出部3等を
用いて構造解析部23等の機能を実現することができ
る。また、データベース24を知識ベース6と共通とす
ることももちろん可能である。
In the second embodiment, it is of course possible to use this configuration alone, and in that case, the retrieval formula is given in advance. It can also be incorporated as the search expression editing unit 5 in the first embodiment. In this case, the functions of the structure analysis unit 23 and the like can be realized by using the search expression structure extraction unit 2, the search condition extraction unit 3, and the like. It is also possible to share the database 24 with the knowledge base 6.

【0080】[0080]

【発明の効果】以上の説明から明らかなように、本発明
によれば、簡単な操作により自動的に検索式を作成する
ことができ、例えば、構造化文書の内部構造や式の文法
を知らないユーザでも、意図した式を簡単に得ることが
できる。これによって、一般ユーザが構造化文書の利点
を有効に活用することが可能となる。また、習熟したユ
ーザにも対しても有用であり、不注意による誤りがほぼ
完全に排除でき、意図した式を非常に短時間で正確に作
成することが可能となる。また、検索式編集手段を有す
る構成では、常に検索条件の正しさを保ちつつ、検索式
の編集を行なうことができるという効果がある。
As is apparent from the above description, according to the present invention, a search expression can be automatically created by a simple operation. For example, the internal structure of a structured document and the expression grammar can be known. Even a non-user can easily obtain the intended expression. This enables general users to effectively utilize the advantages of structured documents. In addition, it is also useful for experienced users, inadvertent mistakes can be almost completely eliminated, and the intended formula can be created accurately in a very short time. Further, in the configuration having the search formula editing means, there is an effect that the search formula can be edited while always maintaining the correctness of the search condition.

【0081】また、検索結果の誤りを指摘するという簡
単な操作によって、構造化文書の検索式を自動的に修正
することができるので、構造化文書の検索式の文法を知
らないユーザでも、意図した式を簡単に得ることができ
る。これによって、一般のユーザが構造化文書の利点を
有効に活用することが可能となる。また、習熟したユー
ザに対しても有用であり、不注意による誤りがほぼ完全
に排除でき、意図した式を非常に短時間で正確に作成す
ることが可能となるという効果がある。
Further, since the retrieval expression of the structured document can be automatically corrected by a simple operation of pointing out an error in the retrieval result, even a user who does not know the grammar of the retrieval expression of the structured document intends. You can easily get the formula This enables general users to effectively utilize the advantages of structured documents. Further, it is also useful for a proficient user, and there is an effect that an error due to carelessness can be almost completely eliminated and an intended expression can be accurately created in a very short time.

【図面の簡単な説明】[Brief description of drawings]

【図1】 本発明の検索式作成支援システムの第1の実
施例の構成図である。
FIG. 1 is a configuration diagram of a first embodiment of a search expression creation support system of the present invention.

【図2】 本発明の検索式作成支援システムの第1の実
施例における検索式生成の動作を示すフローチャートで
ある。
FIG. 2 is a flowchart showing an operation of generating a search expression in the first embodiment of the search expression creation support system of the present invention.

【図3】 構造化文書の一例の説明図である。FIG. 3 is an explanatory diagram of an example of a structured document.

【図4】 構造化文書の構造化された内部表現の一例の
説明図である。
FIG. 4 is an explanatory diagram of an example of a structured internal representation of a structured document.

【図5】 メモリ7に格納される構造化文書の構造の一
例の説明図である。
5 is an explanatory diagram of an example of a structure of a structured document stored in a memory 7. FIG.

【図6】 知識ベース6に蓄積されている定型的な構造
パターンの一例の説明図である。
FIG. 6 is an explanatory diagram of an example of a typical structural pattern accumulated in the knowledge base 6.

【図7】 生成された検索式の一例の説明図である。FIG. 7 is an explanatory diagram of an example of a generated search expression.

【図8】 検索式の編集を行なう際の問題点の説明図で
ある。
FIG. 8 is an explanatory diagram of a problem when a search expression is edited.

【図9】 検索式編集部5における編集操作の一例の説
明図である。
FIG. 9 is an explanatory diagram of an example of an editing operation in the search formula editing unit 5.

【図10】 本発明の検索式作成支援システムの第2の
実施例を示すブロック図である。
FIG. 10 is a block diagram showing a second embodiment of the search expression creation support system of the present invention.

【図11】 本発明の検索式作成支援システムの第2の
実施例における動作の一例を説明するフローチャートで
ある。
FIG. 11 is a flowchart illustrating an example of an operation in the second embodiment of the search expression creation support system of the present invention.

【図12】 追加ノード指定による検索式の修正処理の
一例を示すフローチャートである。
FIG. 12 is a flowchart showing an example of a search expression correction process by specifying an additional node.

【図13】 検索式の修正の具体例を説明するための構
造化文書の部分構造の一例の説明図である。
FIG. 13 is an explanatory diagram of an example of a partial structure of a structured document for explaining a specific example of correction of a search expression.

【図14】 修正対象となる検索式の構造の一例を示す
説明図である。
FIG. 14 is an explanatory diagram showing an example of the structure of a search expression to be modified.

【図15】 削除ノード指定による検索式の修正処理の
一例を示すフローチャートである。
FIG. 15 is a flowchart showing an example of a correction process of a search expression by designating a deleted node.

【図16】 推論部22の全体動作の一例を説明するフ
ローチャートである。
16 is a flowchart illustrating an example of the overall operation of the inference unit 22. FIG.

【図17】 推論部22における検索式から枝を取り除
くか、長さを自由にすることの是非を判断する動作の一
例を説明するフローチャートである。
FIG. 17 is a flowchart illustrating an example of an operation for determining whether to remove a branch from a search expression or to make the length free in the inference unit 22.

【図18】 推論部22における修正案を提示する動作
の一例を説明するフローチャートである。
FIG. 18 is a flowchart illustrating an example of an operation of presenting a correction plan in the inference unit 22.

【図19】 推論部22における追加候補の枝の中から
1本を選ぶ動作の一例を説明するフローチャートであ
る。
FIG. 19 is a flowchart illustrating an example of an operation of selecting one branch from addition candidate branches in the inference unit 22.

【符号の説明】[Explanation of symbols]

1…構造解析部、2…検索式構造抽出部、3…検索条件
抽出部、4…検索式合成部、5…検索式編集部、6…知
識ベース、7…メモリ、8…検索式、9…構造化文書、
21…検索式修正処理部、22…推論部、23…構造解
析部、24…データベース、25…構造化文書。
1 ... Structural analysis unit, 2 ... Search formula structure extraction unit, 3 ... Search condition extraction unit, 4 ... Search formula synthesis unit, 5 ... Search formula editing unit, 6 ... Knowledge base, 7 ... Memory, 8 ... Search formula, 9 … Structured documents,
21 ... Retrieval expression correction processing unit, 22 ... Inference unit, 23 ... Structure analysis unit, 24 ... Database, 25 ... Structured document.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 構造化文書に対して検索処理を行なう際
に用いる検索式の作成を支援する検索式作成支援システ
ムにおいて、前記構造化文書が記憶される記憶手段と、
検索結果の1つとしてユーザから例示された前記構造化
文書の部分構造に基づき前記例示された部分構造を含む
部分構造を抽出する構造抽出手段と、該構造抽出手段に
より抽出された部分構造から検索式を合成する検索式合
成手段を有することを特徴とする検索式作成支援システ
ム。
1. A search formula creation support system for supporting the creation of a search formula used when performing a search process on a structured document, and a storage means for storing the structured document,
Structure extracting means for extracting a partial structure including the exemplified partial structure based on the partial structure of the structured document exemplified by the user as one of the search results, and searching from the partial structure extracted by the structure extracting means A search expression creation support system having a search expression synthesizing means for synthesizing expressions.
【請求項2】 ユーザからの編集操作指示に従い、前記
検索式合成手段により合成された検索式に対して変形を
行なう際に、変形された検索式が合成の際に用いた部分
構造を含むことを条件に検索式の変形処理を実行する検
索式編集手段を有することを特徴とする請求項1に記載
の検索式作成支援システム。
2. When the search formula synthesized by the search formula synthesis means is transformed in accordance with an editing operation instruction from a user, the transformed search formula includes a partial structure used in the synthesis. The search expression creation support system according to claim 1, further comprising a search expression editing unit that executes a modification process of the search expression under the condition.
【請求項3】 構造化文書に対して検索処理を行なう際
に用いる検索式の作成を支援する検索式作成支援システ
ムにおいて、検索式に従い検索を行なう検索手段と、該
検索手段による検索結果に基づきユーザが検索結果に対
する誤りの指摘を行なう入力手段と、該入力手段から入
力される誤りの指摘に従い指摘された部分を含む部分構
造と検索式の構造に基づき検索式を修正する検索式修正
処理手段を有することを特徴とする検索式作成支援シス
テム。
3. A search formula creation support system for supporting the creation of a search formula used when performing a search process on a structured document, and based on a search means for performing a search according to the search formula and a search result by the search means. An input means for the user to point out an error in the search result, and a search formula correction processing means for correcting the search formula based on the structure of the partial structure including the part pointed out according to the error point input by the input means and the structure of the search formula. A search expression creation support system characterized by having.
【請求項4】 誤りが指摘された検索式の構造に含まれ
ている各枝と、その枝の組み合わせに関する情報を順次
記憶するデータベースを有し、前記検索式修正処理手段
は、検索式を修正する際に前記データベースを参照し、
前記データベースに記憶されている枝の組み合わせを含
む検索式の修正候補以外の修正候補に基づいて検索式の
修正を行なうことを特徴とする請求項3に記載の検索式
作成支援システム。
4. A database that sequentially stores information about each branch included in the structure of the search expression in which an error is pointed out and the combination of the branches, and the search expression correction processing means corrects the search expression. When referring to the database,
4. The search expression creation support system according to claim 3, wherein the search expression is corrected based on correction candidates other than the search expression correction candidates including the combination of branches stored in the database.
JP13310594A 1993-10-30 1994-06-15 Search formula creation support system Expired - Fee Related JP3168829B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP13310594A JP3168829B2 (en) 1993-10-30 1994-06-15 Search formula creation support system
US08/490,249 US5628008A (en) 1994-06-15 1995-06-14 Structured document search formula generation assisting system

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP5-294211 1993-10-30
JP29421193 1993-10-30
JP13310594A JP3168829B2 (en) 1993-10-30 1994-06-15 Search formula creation support system

Publications (2)

Publication Number Publication Date
JPH07225771A true JPH07225771A (en) 1995-08-22
JP3168829B2 JP3168829B2 (en) 2001-05-21

Family

ID=26467529

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13310594A Expired - Fee Related JP3168829B2 (en) 1993-10-30 1994-06-15 Search formula creation support system

Country Status (1)

Country Link
JP (1) JP3168829B2 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000010988A (en) * 1998-06-19 2000-01-14 Nec Corp Structured document retrieval system/method and recording medium recording structured document retrieval program
US6718333B1 (en) 1998-07-15 2004-04-06 Nec Corporation Structured document classification device, structured document search system, and computer-readable memory causing a computer to function as the same
JP2006313501A (en) * 2005-05-09 2006-11-16 Nippon Telegr & Teleph Corp <Ntt> Common query graph pattern generation device and method, program for generation and common subgraph retrieving device and method using the same and program for retrieval
US7197510B2 (en) 2003-01-30 2007-03-27 International Business Machines Corporation Method, system and program for generating structure pattern candidates
JP2007140713A (en) * 2005-11-15 2007-06-07 Nippon Telegr & Teleph Corp <Ntt> Graph retrieving device
WO2009154241A1 (en) * 2008-06-18 2009-12-23 日本電気株式会社 Search expression creating system, search expression creating method, search expression creating program, and recording medium
JP2011170503A (en) * 2010-02-17 2011-09-01 Hitachi Ltd Method for providing search formula, program, and system for providing search formula
WO2011108618A1 (en) * 2010-03-01 2011-09-09 日本電気株式会社 Search formula update device, search formula update method
JP2022530607A (en) * 2019-04-30 2022-06-30 ウォークミー リミテッド GUI element acquisition using multiple alternative notations for GUI elements

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000010988A (en) * 1998-06-19 2000-01-14 Nec Corp Structured document retrieval system/method and recording medium recording structured document retrieval program
US6718333B1 (en) 1998-07-15 2004-04-06 Nec Corporation Structured document classification device, structured document search system, and computer-readable memory causing a computer to function as the same
US7197510B2 (en) 2003-01-30 2007-03-27 International Business Machines Corporation Method, system and program for generating structure pattern candidates
JP2006313501A (en) * 2005-05-09 2006-11-16 Nippon Telegr & Teleph Corp <Ntt> Common query graph pattern generation device and method, program for generation and common subgraph retrieving device and method using the same and program for retrieval
JP2007140713A (en) * 2005-11-15 2007-06-07 Nippon Telegr & Teleph Corp <Ntt> Graph retrieving device
WO2009154241A1 (en) * 2008-06-18 2009-12-23 日本電気株式会社 Search expression creating system, search expression creating method, search expression creating program, and recording medium
JP5429165B2 (en) * 2008-06-18 2014-02-26 日本電気株式会社 Retrieval expression generation system, retrieval expression generation method, retrieval expression generation program, and recording medium
JP2011170503A (en) * 2010-02-17 2011-09-01 Hitachi Ltd Method for providing search formula, program, and system for providing search formula
WO2011108618A1 (en) * 2010-03-01 2011-09-09 日本電気株式会社 Search formula update device, search formula update method
JP5440687B2 (en) * 2010-03-01 2014-03-12 日本電気株式会社 Search formula update device and search formula update method
JP2022530607A (en) * 2019-04-30 2022-06-30 ウォークミー リミテッド GUI element acquisition using multiple alternative notations for GUI elements

Also Published As

Publication number Publication date
JP3168829B2 (en) 2001-05-21

Similar Documents

Publication Publication Date Title
US7197510B2 (en) Method, system and program for generating structure pattern candidates
KR100833538B1 (en) System and method for validating an xml document and reporting schema violations
US5111398A (en) Processing natural language text using autonomous punctuational structure
US6108676A (en) Document processing apparatus, document type determining method, and hierarchical regular expression determining method
US9514181B2 (en) Calculation expression management
JPH06266780A (en) Character string retrieving method by semantic pattern recognition and device therefor
US20060167873A1 (en) Editor for deriving regular expressions by example
JP2004265423A (en) Document translation method
JPH0830620A (en) Structure retrieving device
US20050188323A1 (en) Template creation apparatus and creation method
US5628008A (en) Structured document search formula generation assisting system
JP3168829B2 (en) Search formula creation support system
US5727195A (en) Document retrieving object instructing apparatus
JPH06259420A (en) Sentence editing support device
JPH09245052A (en) Structured document processor
JPH08329108A (en) Method for converting text into hypertext
JP2000148756A (en) Translation error detecting device
JP3430273B2 (en) Database search device and database search method
JP2008243075A (en) Structured document management device and method
JP3828499B2 (en) Document editing apparatus, document editing method, and document editing program
JP2007501464A (en) Method and system for probability-based verification of XML documents
JP2004310249A (en) Retrieval method, retrieval device and program of xml data, and storage medium recording the program
JP3617192B2 (en) Document structure conversion apparatus and document structure conversion method
JPH10187721A (en) Document processor, document style deciding method, hierarchical normal expression deciding method, medium with recorded document processing program, medium with recorded document style deciding program, and medium with recorded hierarchical normal expression decision program
JP3568062B2 (en) Document database management device and document database management method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080316

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090316

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100316

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees