JP2009251845A - Retrieval result evaluation device and retrieval result evaluation method - Google Patents
Retrieval result evaluation device and retrieval result evaluation method Download PDFInfo
- Publication number
- JP2009251845A JP2009251845A JP2008097778A JP2008097778A JP2009251845A JP 2009251845 A JP2009251845 A JP 2009251845A JP 2008097778 A JP2008097778 A JP 2008097778A JP 2008097778 A JP2008097778 A JP 2008097778A JP 2009251845 A JP2009251845 A JP 2009251845A
- Authority
- JP
- Japan
- Prior art keywords
- search
- expression
- target data
- evaluation
- vocabulary
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、検索された構造化文書を評価する検索結果評価装置及び検索結果評価方法に関する。 The present invention relates to a search result evaluation apparatus and a search result evaluation method for evaluating a searched structured document.
一般に、論理構造を持つ文書は構造化文書と呼ばれる。構造化文書において、当該文書の論理構造は、当該文書中に記述されたタグによって示される場合がある。このタグを用いて論理構造が表現された構造化文書は、計算機で各種目的に合わせて解釈ないし加工して利用する処理に適している。構造化文書の代表として、XML(Extensible Markup Language)形式で記述されたXML文書が知られている。 In general, a document having a logical structure is called a structured document. In a structured document, the logical structure of the document may be indicated by a tag described in the document. A structured document in which a logical structure is expressed using this tag is suitable for processing that is interpreted or processed by a computer for various purposes. As a typical structured document, an XML document described in an XML (Extensible Markup Language) format is known.
近年、非常に多くのアプリケーションでXMLが用いられるようになり、様々なデータがXML形式で記述されるようになってきている。これにより、XML形式で記述されたXML文書を検索する技術が、重要となっている。 In recent years, XML has been used in a large number of applications, and various data have been described in XML format. As a result, a technique for retrieving an XML document described in the XML format is important.
ここで、上記したXML文書の検索の条件指定では、
1.XPathやXQueryといった問合せ言語による条件指定
2.要素名、属性名とその値の組による条件指定
3.キーワード(文字列)による条件指定
4.自然言語による条件指定
のいずれかの方法が用いられている。
Here, in the above XML document search condition specification,
1. Condition specification by query language such as XPath and XQuery 2. Specifying conditions by pairs of element names, attribute names and their values Condition specification by keyword (character string) Any method of condition specification in natural language is used.
上記の条件指定方法のうち、1及び2に関しては、利用者(ユーザ)が問合せ言語などの専門的知識を有し、または予め検索したいXML文書の構造を把握した上で、条件指定を行うため、ユーザにとって所望のXML文書を検索できる可能性が高い。 Among the above-mentioned condition specifying methods, with respect to 1 and 2, the user (user) has specialized knowledge such as a query language, or specifies the condition after grasping the structure of the XML document to be searched in advance. There is a high possibility that the user can search for a desired XML document.
一方、3及び4に関しては、例えばユーザが問合せ言語などの専門的知識を持たない場合であってもXML文書を検索することができるという利点がある。 On the other hand, 3 and 4 have an advantage that an XML document can be searched even when the user does not have specialized knowledge such as a query language.
ところで、上記したXML文書の検索に際しては、例えばユーザにより指定された条件(検索条件)によっては多数のXML文書が検索結果としてユーザに提示される(返される)場合がある。このような場合には、ユーザは、提示された多数のXML文書の中から所望のXML文書を探す必要がある。しかしながら、多数のXML文書の中から所望のXML文書を見つけ出すことは困難であり、時間がかかる。 By the way, when searching for the XML document described above, a large number of XML documents may be presented (returned) to the user as search results depending on conditions (search conditions) specified by the user, for example. In such a case, the user needs to search for a desired XML document from among a large number of presented XML documents. However, it is difficult and time consuming to find a desired XML document from among a large number of XML documents.
このため、例えば検索された多数のXML文書の各々(検索結果)を評価し、ユーザにとって所望のXML文書を例えば上位に順位付けした形で検索結果を返すことで、ユーザが最終的に必要としているデータを見つけやすくすることができる。 For this reason, for example, each of the many XML documents searched (search results) is evaluated, and the search results are returned in a form in which, for example, the XML documents desired by the user are ranked higher, so that the user finally needs Can make it easier to find existing data.
ここで、検索結果を評価する方法としては、例えばXML文書に含まれる各単語に対して、当該単語が出現するXML文書中での重要度を予めインデックスとして保持しておき、例えば検索時に指定された全てのキーワードに対して、その重要度の評価を行う方法等がある。 Here, as a method of evaluating the search result, for example, for each word included in the XML document, the importance in the XML document in which the word appears is stored in advance as an index. There is a method for evaluating the importance of all keywords.
また、XML文書の検索では、上記した検索結果の評価において当該XML文書の構造についても考慮して評価を行うことが望ましい。 Further, in the search of the XML document, it is desirable to perform the evaluation in consideration of the structure of the XML document in the above-described evaluation of the search result.
上記したような検索結果を評価する技術に関して、例えばフォーマットファイルにそれぞれの文書の構造のどの部分に対応したインデックスを作成するのかを記述するという簡単な操作によって、文書の構造情報とフィルタを利用した適切な適合度計算を行うことができる技術(以下、先行技術と表記)が開示されている(例えば、特許文献1を参照)。
しかしながら、上記した問合せ言語による条件指定及び要素名、属性名とその値の組による条件指定では、XPathまたはXQueryのような問合せ言語の専門的知識や、ユーザが予め検索したいXML文書の構造を把握した上で条件指定を行う必要がある。よって、そのような知識を持たないユーザは用いることができないため、利便性に欠ける。 However, in the condition specification by the above query language and the condition specification by the combination of element name, attribute name and its value, the knowledge of the query language such as XPath or XQuery and the structure of the XML document that the user wants to search in advance are grasped After that, it is necessary to specify conditions. Therefore, since a user who does not have such knowledge cannot use it, convenience is lacking.
一方、上記したキーワードによる条件指定または自然言語による条件指定では、必要としているデータを特定するための情報(例えば、XML文書の構造)を表すことができない。また、自然言語による条件指定に関しては、自然言語におけるあいまいさが残ってしまう。このため、ユーザが必要としているデータ以外にも多量のデータが検索結果として返ってきてしまう。 On the other hand, the condition specification by the keyword or the condition specification by the natural language cannot represent information for specifying the necessary data (for example, the structure of the XML document). In addition, natural language ambiguity remains for condition specification in natural language. For this reason, a large amount of data is returned as a search result in addition to the data required by the user.
また、検索結果に対して評価を行う場合、既存のキーワードによる全文検索等では、検索結果にユーザの意図を反映させることが困難である。また、上記した先行技術においては、例えば指定されたキーワードと静的に予め定義しておいたインデックス等に基づいて順序(順位)付けがされている。したがって、先行技術においては、例えば静的にはXML文書の構造に従った重要度を適用することも可能であるが、検索時にユーザによって指定された検索条件から当該ユーザが意図する階層構造を有するXML文書を動的に上位に順位付けすることは困難である。 Further, when evaluating a search result, it is difficult to reflect the user's intention in the search result in a full-text search using existing keywords. Further, in the above-described prior art, for example, the order (ranking) is given based on a specified keyword and a statically defined index or the like. Therefore, in the prior art, for example, it is possible to statically apply the importance according to the structure of the XML document, but it has a hierarchical structure intended by the user based on the search conditions specified by the user at the time of search. It is difficult to dynamically rank XML documents at the top.
本発明の目的は、複数のキーワード(文字列)を入力するだけで当該キーワード間の階層関係を考慮して構造化文書の検索を実行し、かつ、当該キーワードに応じて当該検索結果を評価する検索結果評価装置及び検索結果評価方法を提供することにある。 An object of the present invention is to search a structured document in consideration of the hierarchical relationship between the keywords only by inputting a plurality of keywords (character strings), and evaluate the search results according to the keywords. A search result evaluation apparatus and a search result evaluation method are provided.
本発明の1つの態様によれば、検索対象となる複数の構造化文書が格納されている検索対象データ格納手段に対して、ユーザによって指定された複数の文字列を含む検索条件に応じて検索を実行する検索結果評価装置が提供される。この検索結果評価装置は、前記検索対象データ格納手段に格納されている複数の構造化文書の各々に含まれる語彙間の階層関係を示す語彙階層関係グラフを、当該構造化文書毎に格納する語彙階層関係グラフ格納手段と、前記語彙階層関係グラフ格納手段を参照して、前記検索条件に含まれる複数の文字列から構造化文書を検索するための検索式を作成するクエリ作成手段と、前記作成された検索式に合致する構造化文書を前記検索対象データ格納手段から検索する検索手段と、前記検索条件に含まれる複数の文字列に基づいて、前記検索された構造化文書を評価する検索結果評価手段とを具備する。 According to one aspect of the present invention, a search target data storage unit storing a plurality of structured documents to be searched is searched according to a search condition including a plurality of character strings specified by a user. A search result evaluation apparatus for executing is provided. This search result evaluation apparatus is a vocabulary for storing a lexical hierarchy relation graph indicating a hierarchical relation between vocabularies included in each of a plurality of structured documents stored in the search target data storage means for each structured document. A hierarchical relationship graph storage means; a query creation means for creating a search expression for retrieving a structured document from a plurality of character strings included in the search condition with reference to the vocabulary hierarchical relationship graph storage means; and the creation A search unit that searches the search target data storage unit for a structured document that matches the search expression, and a search result that evaluates the searched structured document based on a plurality of character strings included in the search condition Evaluation means.
本発明によれば、複数のキーワードを入力するだけで当該キーワード間の階層関係を考慮して構造化文書の検索を実行し、かつ、当該検索結果を評価することを可能とする。 According to the present invention, it is possible to search a structured document in consideration of the hierarchical relationship between the keywords and to evaluate the search results simply by inputting a plurality of keywords.
以下、図面を参照して、本発明の各実施形態について説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[第1の実施形態]
図1は、本発明の第1の実施形態に係る検索結果評価装置の主として機能構成を示すブロック図である。この検索結果評価装置10は、例えば検索者(ユーザ)20によって指定された複数の文字列を含む検索条件に応じて構造化文書の検索を実行する。
図1に示す検索結果評価装置10は、データ解析部11、検索実行部12、記憶部13及び検索結果評価部14を含む。
[First Embodiment]
FIG. 1 is a block diagram mainly showing a functional configuration of a search result evaluation apparatus according to the first embodiment of the present invention. The search
A search
データ解析部11は、例えば検索結果評価装置10の管理者30からの語彙階層関係グラフ作成要求に従って、語彙階層関係グラフを作成する。語彙階層関係グラフは、検索対象となる構造化文書(以下、検索対象データと表記)に含まれる語彙間の階層関係を示す。なお、この語彙階層関係グラフの詳細については後述する。
データ解析部11は、データ解析制御部111及び語彙階層関係グラフ作成部112を含む。データ解析制御部111は、記憶部13から検索対象データを取得し、当該検索対象データを解析する。語彙階層関係グラフ作成部112は、データ解析制御部111によって解析された結果に基づいて、語彙階層関係グラフを作成する。また、語彙階層関係グラフ作成部112は、作成された語彙階層関係グラフを記憶部13に登録する。
The
The
検索実行部12は、検索者20によって指定される検索条件(検索者20からの検索要求)に従って、検索処理を実行する。検索実行部12は、検索者20によって指定される検索条件及び当該検索条件に合致する検索結果(データ)を検索結果評価部14に渡す。また、検索実行部12は、検索結果を検索者20に返す。検索実行部12は、クエリ作成部121及び検索制御部122を含む。
クエリ作成部121は、検索者20によって指定される検索条件のリストを作成し、作成されたリストから検索対象データを検索するための検索式を作成する。検索式は、語彙階層関係グラフ格納部132を参照し後述する変換データに基づいて作成される。なお、検索者20によって指定される検索条件は、パス形式で示される。以下、パス形式で示される検索条件を検索条件パス式と称する。この検索条件パス式には、例えば検索者20によって指定される複数の文字列が含まれる。
検索制御部122は、クエリ作成部121によって作成された検索式により、記憶部13に対して検索処理を実行するための制御を行う。検索制御部122は、記憶部13から受け取った検索結果データを検索結果評価部14に渡す。この検索結果データには、クエリ作成部121によって作成された検索式により検索された検索対象データ、すなわち、検索者20によって指定された検索条件に合致する検索対象データが含まれる。
The
The
The
記憶部13は、各種データを格納する。記憶部13は、検索対象データ格納部131、語彙階層関係グラフ格納部132及び変換データ格納部133を有し、適宜各種データの格納または取り出しを行う。
検索対象データ格納部131には、構造化文書検索装置10による検索の対象となる検索対象データ(構造化文書)が格納されている。なお、検索対象データ格納部131は、検索結果評価装置10とは別の、例えば外部の記憶装置に管理(格納)される構成であってもよい。語彙階層関係グラフ132には、データ解析部11の語彙階層関係グラフ作成部112によって作成された語彙階層関係グラフが格納(登録)されている。変換データ格納部133には、前述した変換データが格納されている。この変換データは、上記した検索条件パス式から検索式を作成(変換)するためのデータである。
The storage unit 13 stores various data. The storage unit 13 includes a search target
The search target
検索結果評価部14は、検索実行部12から渡された検索結果データを、当該検索実行部12から渡された検索条件(検索条件パス式)に基づいて評価する。検索結果評価部14は、パス式文書間評価部141を含む。
パス式文書間評価部141は、検索実行部12から渡された検索結果データに含まれる検索対象データ(構造化文書)毎に、当該検索対象データの評価値を算出する。この場合、パス式文書間評価部141は、検索対象データ内において、検索条件パス式に含まれる複数の文字列が出現する箇所に基づいて当該構造化文書の評価値を算出する。パス式文書間評価部141は、算出された評価値に基づいて、検索結果データに含まれる検索対象データの順序(順位)付けを行う。パス式文書間評価部141は、算出された評価値に応じて順序付けされた検索結果データを検索実行部12に返す。
The search
The path type
次に、図2のフローチャートを参照して、図1に示す検索結果評価装置10において語彙階層関係グラフが作成される際の処理手順について説明する。
まず、管理者30は、例えばデータ解析部11に対して、語彙階層関係グラフを作成させるための語彙階層関係グラフ作成要求を出す(ステップS1)。このとき、例えば作成される語彙階層関係グラフに含まれる語彙を指定する等の条件が、管理者30によって与えられる構成であっても構わない。この場合、作成される語彙階層関係グラフが、例えば管理者30によって指定された語彙を必ず保持する構成でもよいし、または当該指定された語彙を優先的に保持する構成でもよい。
Next, with reference to the flowchart of FIG. 2, a processing procedure when the lexical hierarchy relation graph is created in the search
First, the
データ解析部11のデータ解析制御部111は、管理者30からの語彙階層関係グラフ作成要求に応じて解析の対象となるデータ(以下、解析対象データと表記)の取得要求を、記憶部13に対して出力する(ステップS2)。この解析対象データは、検索対象データ格納部131に格納されている検索対象データである。以下、データ解析部11によって処理される検索対象データを解析対象データとして説明する。
記憶部13は、この取得要求に応じて、検索対象データ格納部131に格納されている解析対象データを検索する(ステップS3)。記憶部13は、検索された解析対象データをデータ解析制御部111に渡す。これにより、データ解析制御部111は、解析対象データを取得する。
The data
In response to this acquisition request, the storage unit 13 searches the analysis target data stored in the search target data storage unit 131 (step S3). The storage unit 13 passes the searched analysis target data to the data
なお、データ解析制御部111は、検索対象データ格納部131に格納されている検索対象データの全てを解析対象データとして取得することを基本とするが、ステップS1において、管理者30によって条件が指定されている場合には、当該条件に合致する検索対象データのみを解析対象データとして取得する構成であってもよい。例えば前回の解析時からの差分、つまり、まだ解析を行っていないデータのみを解析対象とすることも可能である。
The data
データ解析制御部111は、取得された解析対象データの解析を行う(ステップS4)。語彙階層関係グラフ作成部112は、データ解析制御部111によって解析された結果を基に、語彙階層関係グラフを作成する(ステップS5)。語彙階層関係グラフ作成部112は、作成された語彙階層関係グラフを語彙階層関係グラフ格納部132に登録する(ステップS6)。
The data
次に、図3のフローチャートを参照して、図1に示す検索結果評価装置10において検索者20からの検索要求に応じた検索が実行される際の処理手順について説明する。
まず、検索者20は、検索実行部12に対して、例えば検索条件パス式を指定して検索要求を出す(ステップS11)。この検索条件パス式には、複数の文字列が含まれる。
Next, with reference to the flowchart of FIG. 3, the processing procedure when the search according to the search request from the
First, the
クエリ作成部121は、入力された検索条件パス式に応じて、検索対象データ格納部131に対して検索を実行するための検索式を作成する(ステップS12)。すなわち、クエリ作成部121は、語彙階層関係グラフ格納部132及び変換データ格納部133を参照して、検索条件パス式に含まれる複数の文字列を語彙として含む語彙階層関係グラフによって示される当該複数の文字列間の階層関係に基づいて、検索式を作成する。
The
検索実行部12の検索制御部122は、クエリ作成部121によって作成された検索式を指定して、記憶部13に対して検索要求を出力する(ステップS13)。
記憶部13は、検索制御部122からの検索要求に応じて、当該検索制御部122の制御の下、検索対象データ格納部131から当該検索要求に合致する検索対象データを検索する(ステップS14)。記憶部13は、検索制御部122からの検索要求に合致する検索対象データを含む検索結果(データ)を検索制御部122に返す。これにより、検索制御部122は、検索式に基づく検索結果データを取得する。この検索結果データには、記憶部13によって検索された上記検索要求に合致する検索対象データ(構造化文書)が含まれる。
The
In response to the search request from the
検索制御部122は、取得された検索結果データ及び検索条件パス式を、検索結果評価部14に渡す。検索結果評価部14は、検索制御部122から渡された検索条件パス式に基づいて、検索結果データに含まれる検索対象データの各々を評価する(ステップS15)。このとき、検索結果評価部14のパス式文書間評価部141は、検索結果データに含まれる検索対象データ内において、検索条件パス式に含まれる複数の文字列が出現する箇所に基づいて当該検索対象データの評価値を算出する。なお、評価値の算出処理の詳細については後述する。
The
パス式文書間評価部141は、算出された評価値に基づいて検索結果データに含まれる検索対象データの各々について順序付けを行う。パス式文書間評価部141によって順序付けされた検索対象データを含む検索結果データは、検索実行部12に渡される。
検索制御部122は、パス式文書間評価部141から渡された検索結果データを、検索要求に対する検索結果として検索者20に対して返す(ステップS16)。これにより、検索者20は、検索要求に対する検索結果を取得する(ステップS17)。この場合、検索結果は、パス式文書間評価部141によって順序付けされた結果の上位の検索対象データから順に検索者20に対して提示(表示)される。
The path type
The
図4は、検索対象データ格納部131に格納されている検索対象データの一例を示す図である。図4に示す検索対象データは、例えばXML(Extensible Markup Language)形式で記述された天気予報データ100である。図4に示す天気予報データ100は、例えばルート要素名として「天気予報」を有する。また、天気予報データ100は、例えば要素名として「場所」、「予報」、「天気」、「気温」、「最高」、「最低」及び「降水確率」を有する。
更に、天気予報データ100は、例えば属性名が「都道府県」で、属性値として「東京都」、「神奈川県」及び「埼玉県」を有する。また、例えば属性名が「地域」で、属性値として「東京地方」、「伊豆諸島北部」、「伊豆諸島南部」、「小笠原諸島」、「東部」、「西部」、「北部」及び「南部」を有する。また、例えば属性名が「単位」で、属性値として「%」を有する。
FIG. 4 is a diagram illustrating an example of search target data stored in the search target
Furthermore, the
ここで、上記した検索対象データに含まれる要素には、単純型と複合型が存在する。単純型は、属性を持たない要素であって、内容にテキスト(文字列)のみを持つ要素である。天気予報データ100では、例えば要素名「天気」、「最高」及び「最低」が単純型である。
また、複合型には、単純型内容を持つ複合型と単純型内容を持たない複合型が存在する。単純型内容を持つ複合型は、属性を有する要素であって、内容にテキストのみを持つ要素である。天気予報データ100では、例えば要素名「降水確率」が挙げられる。一方、単純型内容を持たない複合型は、内容にテキスト以外のものを持つ複合型である。天気予報データ100では、例えば要素名「場所」及び「気温」が挙げられる。
Here, there are a simple type and a composite type in the elements included in the search target data. The simple type is an element having no attribute and having only text (character string) in the content. In the
The composite type includes a composite type having a simple type content and a composite type having no simple type content. A complex type having simple type content is an element having an attribute and having only text in the content. In the
次に、図5及び図7を参照して、前述した図2のステップS4及びS5の処理について詳細に説明する。まず、図5のフローチャートを参照して、上記した解析対象データ(検索対象データ)の階層構造を示す構造グラフを作成する処理手順について説明する。なお、この構造グラフは、語彙階層関係グラフを作成するために用いられる。
データ解析部11は、構造グラフを初期化する(ステップS21)。この処理により、データ解析部11は、構造グラフを頂点及び辺を持たないグラフとする。
Next, with reference to FIG. 5 and FIG. 7, the processing of steps S4 and S5 of FIG. 2 described above will be described in detail. First, a processing procedure for creating a structure graph indicating the hierarchical structure of the analysis target data (search target data) will be described with reference to the flowchart of FIG. This structure graph is used to create a lexical hierarchy relationship graph.
The
次に、データ解析部11のデータ解析制御部111は、前述した図2のステップS3で検索された解析対象データのルート要素を対象要素として取得する(ステップS22)。なお、ルート要素は、例えば構造化文書(XMLデータ)の要素を全て包含する要素である。
データ解析制御部111は、取得された対象要素の要素名を取得し(ステップS23)、対象要素に属性が指定されているか否かを判定する(ステップS24)。さらに、対象要素に属性が指定されていると判定されると(ステップS24のYES)、当該対象要素に指定されている属性の属性名及び属性値を取得する(ステップS25)。取得された属性値に対して形態素解析を実行し、その結果により、属性値に含まれる名詞を抽出する(ステップS26)。
なお、ステップS24において、対象要素に属性が指定されていないと判定されると、上記したステップS25及びS26の処理は実行されない。
Next, the data
The data
If it is determined in step S24 that no attribute is specified for the target element, the processes in steps S25 and S26 described above are not executed.
次に、データ解析制御部111は、対象要素が前述した単純型または単純型内容を持つ複合型であるか否かを判定する(ステップS27)。対象要素が単純型または単純型内容を持つ複合型であると判定された場合(ステップS27のYES)、当該対象要素の内容を取得する(ステップS28)。取得された対象要素の内容に対して形態素解析を実行し、その結果により、対象要素の内容に含まれる名詞を抽出する(ステップS29)。
なお、ステップS27において、対象要素が単純型または単純型内容を持つ複合型でないと判定された場合、上記したステップS28及びS29の処理は実行されない。
Next, the data
If it is determined in step S27 that the target element is not a simple type or a complex type having simple type contents, the processes in steps S28 and S29 described above are not executed.
次に、語彙階層関係グラフ作成部112は、取得された要素名、属性名またはステップS26またはS28で抽出された名詞(語彙)に対して、スコアリングを行う(ステップS30)。語彙階層関係グラフ作成部112は、例えば評価値を用いてスコアリング処理を実行する。
Next, the vocabulary hierarchy relationship
ここで、評価値の例について具体的に説明する。語彙階層関係グラフ作成部112は、以下の例えば第1の評価値から第7の評価値のうち複数の評価値を用いてスコアリング処理を実行する。まず、要素名または属性名の場合の評価値の例について説明する。
Here, an example of the evaluation value will be specifically described. The lexical hierarchy relationship
第1の評価値は、例えば解析対象データ内における要素名または属性名の出現回数に応じて算出される。例えば出現回数が多いものに対しては、評価値は高くなる。
第2の評価値は、出現位置に応じて算出される。この場合、出現位置(階層)が深いものほど、評価値は小さくなる。例えば階層の深さをdepthとすると、評価式1/depthまたは1/(log depth)+1によって第2の評価値は算出される。なお、階層の深さは、ルート要素を1とする。
また、例えば管理者30によって条件として指定された語彙が要素名であれば、要素名が当該指定された語彙である要素以下の要素または属性の深さについては、要素名が当該指定された語彙である要素の深さは0として扱い、これに基づいて、上記した第2の評価値が求められる構成であってもよい。
The first evaluation value is calculated according to the number of occurrences of element names or attribute names in the analysis target data, for example. For example, the evaluation value is high for those having a large number of appearances.
The second evaluation value is calculated according to the appearance position. In this case, the evaluation value is smaller as the appearance position (hierarchy) is deeper. For example, when the depth of the hierarchy is depth, the second evaluation value is calculated by the
For example, if the vocabulary specified as a condition by the
第3の評価値は、子ノード(子要素、属性)に応じて算出される。この場合、子ノード数が多いほど、評価値は大きくなる。例えば子ノード数をcountとすると、評価式count/全ノード数によって第3の評価値は算出される。なお、ノードとは、要素、要素の内容、属性名、属性値を総称したものである。
第4の評価値は、要素名であるか属性名であるかに応じて算出される。例えば要素名または属性名によって、評価値を算出する際に用いる係数を変更する。
第5の評価値は、要素名または属性名に関係するテキストの内容に応じて算出される。例えば管理者30によって条件として指定された語彙が要素の内容または属性値に含まれている場合には、要素の内容に当該指定された語彙を含む要素の要素名、または属性値に当該指定された語彙を含む属性の属性名に対する評価値は大きくなる。
要素名または属性名(に含まれる語彙)の場合、例えば上記した第1から第5の評価値を含む複数の評価値の合計によって、スコアリングされる。
The third evaluation value is calculated according to the child node (child element, attribute). In this case, the evaluation value increases as the number of child nodes increases. For example, if the number of child nodes is count, the third evaluation value is calculated by the evaluation formula count / total number of nodes. Note that a node is a generic term for elements, element contents, attribute names, and attribute values.
The fourth evaluation value is calculated according to whether it is an element name or an attribute name. For example, the coefficient used when calculating the evaluation value is changed depending on the element name or attribute name.
The fifth evaluation value is calculated according to the text content related to the element name or attribute name. For example, when the vocabulary specified as a condition by the
In the case of an element name or an attribute name (a vocabulary included in the element name), for example, scoring is performed by the sum of a plurality of evaluation values including the first to fifth evaluation values.
次に、要素の内容または属性値の場合の評価値の例について説明する。第6の評価値は、形態素解析を行った結果、取得された名詞または固有名詞などの出現回数に応じて算出される。例えば出現回数が多いものに対しては、評価値は大きくなる。
第7の評価値は、要素の内容または属性値に関係するノード名に応じて算出される。なお、ノード名は、ここでは要素名または属性名を示す。例えば管理者30によって条件として指定された語彙が要素名又は属性名である場合、要素名が当該指定された要素の内容または属性名が当該指定された語彙の属性値の評価値は大きくなる。要素の内容または属性値の場合、例えば上記した第6または第7の評価値を含む複数の評価値の合計によって、スコアリングされる。
Next, examples of evaluation values in the case of element contents or attribute values will be described. The sixth evaluation value is calculated according to the number of appearances of the acquired noun or proper noun as a result of the morphological analysis. For example, the evaluation value is large for a large number of appearances.
The seventh evaluation value is calculated according to the node name related to the content of the element or the attribute value. Here, the node name indicates an element name or an attribute name. For example, when the vocabulary designated as a condition by the
次に、語彙階層関係グラフ作成部112は、取得された要素名、属性名またはステップS26またはS28で抽出された語彙をラベル(名称)として持ち、それぞれノードタイプを保持する頂点として構造グラフに追加する(ステップS31)。ノードタイプは、要素名、要素の内容、属性名または属性値を示す。
語彙階層関係グラフ作成部112は、定義に従って、構造グラフに辺を追加する(ステップS32)。辺は、構造グラフ上の要素名、属性名またはステップS26またはS28で抽出された語彙相互間の階層関係を表す。ここで、上記した定義には、例えば矢印(辺)の向きにより「親要素名から子要素名」、「要素名からその属性名」、「属性名から属性値」、「要素名からのその要素の内容に含まれる文字列」、「親要素の属性名から子要素名」、「親要素の属性値に含まれる文字列から子要素名」等が含まれる。
Next, the vocabulary hierarchy relationship
The vocabulary hierarchy relationship
語彙階層関係グラフ作成部112は、解析対象データに基づいて、対象要素が子要素を持つか否かを判定する(ステップS33)。対象要素が子要素をもつと判定された場合(ステップS33のYES)、データ解析制御部111は、当該子要素を取得し(ステップS34)、そして、取得された子要素を対象要素として、上記したステップS23に戻って処理を繰り返す。
The vocabulary hierarchy relationship
一方、ステップS33において対象要素が子要素をもたないと判定された場合、語彙階層関係グラフ作成部112は、ステップS30においてスコアリングされた結果を下に語彙を抽出する(ステップS35)。このとき、語彙階層関係グラフ作成部112は、語彙(ここでは、取得された要素名、属性名、またはステップS26またはS28で抽出された語彙)のうち、スコア(評価値の合計)が所定の値以上の語彙を抽出する。なお、この所定の値は、予め設定されていてもよいし、処理の度に例えば管理者30によって設定される構成でもよい。また、語彙階層関係グラフ作成部112は、例えば管理者30によって指定された語数の語彙を評価値の大きい順に抽出する構成でもよい。
On the other hand, if it is determined in step S33 that the target element has no child elements, the vocabulary hierarchy relationship
語彙階層関係グラフ112は、ステップS35において抽出された語彙でもなく、管理者30によって指定された語彙でもない語彙をラベルとして持つ頂点及びその頂点に隣接する辺を削除する(ステップS36)。ステップS36において削除処理を終えたグラフが、解析対象データの階層構造を示す構造グラフとなる。
The lexical
図6は、図5のフローチャートに示す処理によって作成された天気予報データ100の構造グラフ200の一例を示す。なお、この構造グラフ200は、例えば管理者30によって、条件として「天気」の語彙が指定されて作成されたものとする。
FIG. 6 shows an example of the
図6に示すように、構造グラフ200には、要素名として「場所」、「予報」、「天気」、「気温」及び「降水確率」が示されている。構造グラフ200には、属性名として「都道府県」が示され、属性値に含まれる文字列として「東京都」、「神奈川県」及び「埼玉県」が示されている。また、構造グラフ200には、要素名が「天気」である要素の内容に含まれる文字列として「晴れ」、「くもり」及び「雨」が示されている。なお、図6では、グラフの表記においてXML上でのノードタイプによって頂点の表記を変えている。また、構造グラフ200には、例えば要素名「場所」から要素名「予報」に向かって辺が示される。この辺は、前述したような定義に従って追加されたものである。
As shown in FIG. 6, the
なお、図4に示す天気予報データ100が有する要素名、属性名、属性値または要素の内容のうち、構造グラフ200に示されていない語彙については、前述した図5のステップS36において削除されたものとする。削除された語彙は、例えばスコアリングされた結果、所定の値より評価値が小さく、かつ管理者30によって指定されていない語彙である。
Of the element names, attribute names, attribute values, or element contents of the
次に、図7のフローチャートを参照して、構造グラフを用いて語彙階層関係グラフを作成する処理手順について説明する。なお、ここで用いられる構造グラフは、図6示す構造グラフ200であるものとして説明する。
まず、語彙階層関係グラフ作成部112は、作成された構造グラフ200を参照して、当該構造グラフ200に示される頂点と同一のラベルを持つ頂点を語彙階層関係グラフに追加する(ステップS41)。このとき、構造グラフ200に同一のラベルを持つ頂点が複数存在する場合には、当該頂点が重複しないように頂点を追加する。
Next, a processing procedure for creating a lexical hierarchy relationship graph using a structure graph will be described with reference to the flowchart of FIG. Note that the structure graph used here is assumed to be the
First, the lexical hierarchy relationship
語彙階層関係グラフ作成部112は、構造グラフ200を参照して、特定の距離以内にある任意の2頂点を取得する(ステップS42)。ここで、構造グラフ200上の1階層の距離を1とすると、特定の距離は2以上が好ましい。また、この特定の距離は、例えば管理者30によって事前に指定されてもよいし、処理の度に例えば管理者30によって指定される構成であってもよい。
The lexical hierarchy relationship
語彙階層関係グラフ112は、取得された任意の2頂点に対応する語彙階層関係グラフ上の2頂点間に、辺を追加する(ステップS43)。ここで、追加される辺は、ラベルを持つ。辺のラベルは、取得された任意の2頂点の構造グラフ200上でのノードタイプの組を示す。
なお、語彙階層関係グラフ格納部132を更新する場合には、語彙階層関係グラフ作成部112は、語彙階層関係グラフを初期化してから図7のフローチャートによって示される処理を実行する。
The lexical
When updating the vocabulary hierarchy relationship
図8は、図7に示す処理によって作成された語彙階層関係グラフの概略図である。図8に示す語彙階層関係グラフ300は、上記した特定の距離を2として作成された語彙階層関係グラフである。なお、図8は、便宜的に「東京都」をラベルとして持つ頂点(以下、単に「東京都」と表記)を中心とした部分のみを示す。「東京都」以外のラベルを持つ頂点間の辺は、点線で示されており、当該辺のラベルは省略されている。また、「東京都」以外の頂点については、例えば辺等の一部が省略されている。
上記した図6に示す構造グラフ200の「東京都」から距離が2以内に存在する頂点は、「場所」、「都道府県」、「予報」、「天気」、「気温」及び「降水確率」である。以下、この頂点を特定距離内頂点と称する。
FIG. 8 is a schematic diagram of the lexical hierarchy relation graph created by the process shown in FIG. A vocabulary
In the
また、図8に示す語彙階層関係グラフ300では、「東京都」及び特定距離内頂点の各々が辺で結ばれ、辺の各々にはラベルが付されている。例えば「場所」及び「東京都」においては、「場所」から「東京都」に辺が結ばれており、当該辺のラベルは、「要素名、属性値」である。これは、「場所」のノードタイプが要素名であり、「東京都」のノードタイプが属性値であることを示す。なお、図8に示す語彙階層関係グラフ300では省略されているが、「東京都」以外の頂点についても同様に、特定距離内頂点と辺で結ばれており、その辺の各々にはラベルが付されている。
Further, in the lexical
次に、図9のフローチャートを参照して、前述した図3に示すステップS12の処理について詳細に説明する。
検索実行部12のクエリ作成部121は、図3に示すステップS11の処理において検索者20によって指定された検索条件パス式を入力する。以下、クエリ作成部121によって入力された検索条件パス式を入力パス式と称する。ここでは、入力パス式は、例えば「東京都/天気」であるものとして説明する。
Next, the process of step S12 shown in FIG. 3 will be described in detail with reference to the flowchart of FIG.
The
なお、入力パス式によって示される文字列(語彙)の順列は、当該順列の文字列の順によって階層関係を示す。上記したように入力パス式が「東京都/天気」である場合には、「東京都」から「天気」に階層関係を有する旨を示す。以下、この階層関係を入力パス式の階層関係と称する。 Note that the permutation of the character string (vocabulary) indicated by the input path expression indicates a hierarchical relationship according to the order of the character string of the permutation. As described above, when the input path expression is “Tokyo / weather”, it indicates that there is a hierarchical relationship from “Tokyo” to “weather”. Hereinafter, this hierarchical relationship is referred to as an input path type hierarchical relationship.
クエリ作成部121は、語彙階層関係グラフ格納部132を参照して、入力パス式の階層関係を例えば親子関係として含む語彙階層関係グラフを取得する(ステップS51)。なお、クエリ作成部121は、例えば入力パス式の階層関係の全てを親子関係として含む語彙階層関係グラフが語彙階層関係グラフ格納部132に存在しない場合には、当該入力パス式の階層関係の一部を親子関係として含む語彙階層関係グラフを取得する。
また、例えば入力パス式がA/B/C(当該入力パス式の階層関係がAからB、BからC)である場合に、当該階層関係を完全に含む語彙階層関係グラフが語彙階層関係グラフ格納部132に存在しない場合を想定する。この場合には、クエリ作成部121は、例えばAからBの階層関係のみを親子関係として含む語彙階層関係グラフ、またはBからCの階層関係のみを親子関係として有する語彙階層関係グラフを取得する。
The
For example, when the input path expression is A / B / C (the input path expression has a hierarchical relationship from A to B, and from B to C), the lexical hierarchy relationship graph that completely includes the hierarchical relationship is the lexical hierarchy relationship graph. Assume that the
クエリ作成部121は、取得された語彙階層関係グラフに基づいて、入力パス式に含まれる文字列の各々のノードタイプを判別する(ステップS52)。
クエリ作成部121は、入力パス式の階層関係及び判別されたノードタイプに基づいて、当該入力パス式に含まれる文字列間の階層関係を有する検索対象データを検索するための検索式、例えばXPath式を作成する。つまり、クエリ作成部121は、入力パス式をXPath式に変換する(ステップS53)。または、クエリ作成部121は、変換データ格納部133に格納されている変換データに基づいてXPath式に変換する。
The
Based on the hierarchical relationship of the input path expression and the determined node type, the
なお、ステップS51において、クエリ作成部121によって複数の語彙階層関係グラフが取得された場合は、当該取得された語彙階層関係グラフの各々についてステップS52及びS53の処理が実行される。これにより、複数のXPath式が作成(変換)された場合は、当該複数のXPath式を互いにOR(論理和)の関係として、検索対象データ格納部131に対して検索処理が実行される。
In step S51, when a plurality of vocabulary hierarchy relationship graphs are acquired by the
ここで、図10は、変換データ格納部133に格納されている変換データのデータ構造の一例を示す。なお、この変換データは、事前に語彙階層関係グラフにおける各関係に対するXPath式への変換方法として定義されている。図10に示すように、変換データは、関係情報及び当該情報に対応付けられているXPath式情報を含む。
Here, FIG. 10 shows an example of the data structure of the conversion data stored in the conversion
関係情報は、語彙(文字列)間の階層関係を示す。図10に示す例では、例えば親子(要素名、要素名)の関係がある。これは、当該語彙のそれぞれのノードタイプが要素名であることを示す。また、同様に、親子(要素名、要素の内容)は、親となる語彙のノードタイプが要素名であり、異なる語彙(子)のノードタイプが要素の内容(に含まれる文字列)であることを示す。また、例えば兄弟(要素名、要素名、…)の関係は、語彙間の関係が同じ階層、同じノードタイプであることを示している。 The relationship information indicates a hierarchical relationship between vocabularies (character strings). In the example shown in FIG. 10, for example, there is a parent-child (element name, element name) relationship. This indicates that each node type of the vocabulary is an element name. Similarly, in the parent and child (element name, element content), the node type of the parent vocabulary is the element name, and the node type of a different vocabulary (child) is the element content (character string included in the element). It shows that. For example, the relationship between siblings (element names, element names,...) Indicates that the relationships between vocabularies are the same hierarchy and the same node type.
また、XPath式情報は、対応付けられている関係を示す情報によって示される語彙間の関係に適合する検索対象データ(構造化文書)を検索するために適当なXPath式を示す。例えば親子(要素名、要素の内容)の関係情報に対応付けられているXPath式情報は、XPath式「//element1[.//elemnt2]」を示す。また、同様に、例えば親子(要素名、要素の内容)の関係情報に対応付けられているXPath式情報は、XPath式「//element1[./text()=”context”]」を示す。なお、上記したXPath式において、element1及びelement2は要素名を示し、contextは要素の内容を示す。また、これ以外にattriは属性名を示し、valueは属性値を示す。 Further, the XPath expression information indicates an XPath expression suitable for searching for search target data (structured document) that matches the vocabulary relationship indicated by the information indicating the associated relationship. For example, the XPath expression information associated with the parent-child (element name, element content) relation information indicates the XPath expression “//element1[.//elemnt2]”. Similarly, for example, XPath expression information associated with parent-child (element name, element content) relation information indicates the XPath expression “//element1[./text()=“context”] ”. In the above XPath expression, element1 and element2 indicate element names, and context indicates the content of the element. In addition, attri indicates an attribute name, and value indicates an attribute value.
なお、図10に示す変換データに含まれる関係情報には、2つの語彙の階層関係が定義されているが、これらを複数組み合わせることにより、3つ以上の語彙の階層関係を定義することも可能である。これにより、3つ以上の語彙を含む入力パス式をXPath式に変換することも可能である。 Note that the relationship information included in the conversion data shown in FIG. 10 defines a hierarchical relationship between two vocabularies, but it is also possible to define a hierarchical relationship between three or more vocabularies by combining a plurality of these. It is. Thus, an input path expression including three or more vocabularies can be converted into an XPath expression.
再び図9のステップS53に戻ると、クエリ作成部121は、ステップS52において判別されたノードタイプ及び入力パス式の階層関係から、適合する関係情報を特定する。クエリ作成部121は、特定された関係情報に対応付けられたXPath式情報に基づいて、XPath式に変換する。
Returning to step S53 in FIG. 9 again, the
例えば上記したように入力パス式が「東京都/天気」であり、ステップS51において図8に示す語彙階層関係グラフ300が取得された場合について説明する。この場合、語彙階層関係グラフ300において、「東京都」は属性値であり、「天気」は要素名である。また、「東京都」から「天気」に辺が結ばれていることから、「東京都」及び「天気」は親子の関係である。よって、クエリ作成部121は、例えば図10に示す変換データに基づいて、親子(属性値、要素名)を示す関係情報に対応するXPath式情報によって示されるXPath式を作成する。つまり、クエリ作成部121は、入力パス式「東京都/天気」をXPath式「//*[./@*=”東京都”and.//天気]」に変換する。このXPath式に基づいて、検索対象データ格納部131に対して検索処理が実行される。XPath式「//*[./@*=”東京都”and.//天気]」は、「東京都」及び「天気」が親子関係であり、かつ、「東京都」のノードタイプが属性値であり、「天気」のノードタイプが要素名であるXMLデータ(構造化文書)を検索するための検索式である。なお、「東京都」及び「天気」は直接親子関係を有する必要はなく、例えば孫またはひ孫の関係であっても検索可能である。
ここでは、変換データはXPath式情報を含み、入力パス式をXPath式に変換する例を示したが、例えばXQueryまたはSQL等の任意のデータソースに対する任意の問合せ言語へ変換する構成でもよい。
For example, the case where the input path expression is “Tokyo / weather” as described above and the lexical
Here, the conversion data includes XPath expression information, and an example in which an input path expression is converted into an XPath expression has been shown. However, for example, the conversion data may be converted into an arbitrary query language for an arbitrary data source such as XQuery or SQL.
図11は、図4の天気予報データ100に対し、上記したクエリ作成部121によって作成されたXPath式「//*[./@*=”東京都”and.//天気]」による検索結果400を示す。検索結果400は、属性値「東京都」及びその親子関係(ここでは、孫関係)である要素名「天気」を含むXMLデータとなる。
FIG. 11 shows a search result based on the XPath expression “//*[./@*=“Tokyo” and.//weather] ”created by the
ところで、例えば入力パス式の階層関係が複数存在する場合において、当該複数の階層関係のうち、語彙階層関係グラフ格納部132内の語彙階層関係グラフに設定されていない階層関係(未設定階層関係)が指定された場合を想定する。この場合、未設定階層関係に対する設定(設定レベル)を予め定義しておく構成であっても構わない。予めレベルを設定しておくことにより、所望の検索結果範囲を得ることができる。 By the way, for example, when there are a plurality of input path type hierarchical relationships, a hierarchical relationship that is not set in the vocabulary hierarchical relationship graph in the vocabulary hierarchical relationship graph storage unit 132 (unset hierarchical relationship) among the plurality of hierarchical relationships. Assume that is specified. In this case, the configuration (setting level) for the unset hierarchy relationship may be defined in advance. By setting the level in advance, a desired search result range can be obtained.
図12は、予め定義された設定レベルの一例を示す。図12の例では、未設定階層関係を構成する2つの語彙に設定するノードタイプと、未設定階層関係を構成する2つの語彙に設定する階層関係についてレベル1から3が定義されている。なお、レベルの段階は、例えば検索者20によって適宜設定される。
FIG. 12 shows an example of a preset setting level. In the example of FIG. 12,
例えばレベル1では、入力パス式に含まれる未設定階層関係については、無視することが定義されている。例えば入力パス式が、A/B/Cである場合を想定する。この場合、語彙階層関係グラフ格納部132に格納されている1つの語彙階層関係グラフにおいて、AからBの階層関係は存在するが、BからCの階層関係が存在しない場合、当該BからCの階層関係は無視し、AからBの階層関係のみからXPath式に変換することを示す。
また、例えばレベル2では、タイプは「要素名」を示し、動作内容は「未設定階層関係を親子関係に設定」を示す。つまり、未設定階層関係を構成する2つの語彙のノードタイプをそれぞれ要素名に設定し、当該2つの語彙の階層関係を親子関係として、入力パス式がXPath式に変換される。
また、例えばレベル3では、タイプは「すべて」を示し、動作内容は「未設定階層関係を親子関係または兄弟関係に設定」を示す。つまり、未設定階層関係を構成する2つの語彙の各々のノードタイプは、要素名、属性名、属性値または要素の内容のそれぞれに設定される。また、設定された全ての組み合わせ毎に、語彙間の階層関係に親子関係または兄弟関係が設定される。設定された全ての組み合わせ及び階層関係に基づいて、入力パス式がXPath式に変換される。
For example, at
For example, at
Further, for example, at
次に、図13及び図14を参照して、検索結果評価装置10における検索結果評価処理(前述した図3に示すステップS15の処理)について具体的に説明する。ここで、入力パス式(検索条件パス式)は、「発明/(合田 and 構造化文書)」であるものとする。この入力パス式は、例えば「発明のうち、合田が行ったもので、かつ、構造化文書を含むもの」といった意味を表す。また、この入力パス式からは、例えば「//発明[.//text()=”合田” and .//text()=”構造化文書”]」のようなXPath式がクエリ作成部121により作成される。
Next, with reference to FIGS. 13 and 14, the search result evaluation process (the process of step S15 shown in FIG. 3 described above) in the search
なお、上記したXPath式「//発明[.//text()=”合田” and .//text()=”構造化文書”]」に応じて検索対象データ格納部131から検索された検索結果として、図13に示す検索対象データ101及び図14に示す検索対象データ102が得られたものとする。
The search retrieved from the search target
以下、検索結果として得られた検索対象データ101及び検索対象データ102のそれぞれについて、パス式文書間評価部141が入力パス式(ここでは、「発明/(合田 and 構造化文書)」)に基づいて評価値を算出するアルゴリズム(以下、第1のアルゴリズムと表記)の一例について説明する。
まず、パス式文書間評価部141は、例えば入力パス式で階層関係にある全てのキーワード(文字列)間に対して、検索結果として得られた検索対象データ101及び検索対象データ102の各々における距離を算出する。ここで、キーワード間の距離とは、例えば要素からその子要素、要素からその属性名に対しては距離を1とする。また、要素からその要素の内容、属性名からその属性値に対しても、同様に距離を1とする。
Hereinafter, for each of the
First, the path expression
次に、パス式文書間評価部141は、検索結果として得られた検索対象データ毎に、算出された距離の逆数を求め、それらの合計を当該検索対象データの評価値として算出する。
ここで、図13に示す検索対象データ101及び図14に示す検索対象データ102の評価値の算出処理について具体的に説明する。
Next, the path type
Here, processing for calculating the evaluation values of the
入力パス式は「発明/(合田 and 構造化文書)」であるため、当該入力パス式の階層関係(にあるキーワード)は、「発明→合田」及び「発明→構造化文書」である。 Since the input path expression is “invention / (Goda and structured document)”, the hierarchical relationship (keywords) in the input path expression is “invention → Goda” and “invention → structured document”.
検索対象データ101における「発明→合田」に対応する距離を算出する。この場合、検索対象データ101の要素である「発明」からその子要素である「発明者」の距離が1であり、要素である「発明者」からその要素の内容である「合田」の距離が1である。よって、検索対象データ101における「発明→合田」に対応する距離は2と算出される。
The distance corresponding to “invention → Goda” in the
また、検索対象データ101における「発明→構造化文書」に対応する距離を算出する。この場合、検索対象データ101の要素である「発明」からその子要素である「名称」の距離が1であり、要素である「名称」からその要素の内容である「構造化文書」の距離が1である。よって、検索対象データ101における「発明→構造化文書」に対応する距離は2と算出される。
上記したように評価値はキーワード間の距離の逆数の合計であるため、検索対象データ101の評価値は、1/2+1/2=1となる。
Further, a distance corresponding to “invention → structured document” in the
As described above, since the evaluation value is the sum of the reciprocal of the distance between the keywords, the evaluation value of the
一方、検索対象データ102における「発明→合田」に対応する距離を算出する。この場合、検索対象データ102の要素である「発明」からその子要素である「発明者」の距離が1であり、要素である「発明者」からその子要素である「氏名」の距離が1であり、要素である「氏名」からその要素の内容である「合田」の距離が1である。よって、検索対象データ102における「発明→合田」に対応する距離は3と算出される。
On the other hand, the distance corresponding to “invention → Goda” in the
また、検索対象データ102における「発明→構造化文書」に対応する距離を算出する。この場合、検索対象データ102の要素である「発明」からその子要素である「内容」の距離が1であり、要素である「内容」からその子要素である「名称」の距離が1であり、要素である「名称」からその要素の内容である「構造化文書」の距離が1である。よって、検索対象データ102における「発明→構造化文書」に対応する距離は3と算出される。
上記したように評価値はキーワード間の距離の逆数の合計であるため、検索対象データ102の評価値は、1/3+1/3=2/3となる。
In addition, the distance corresponding to “invention → structured document” in the
As described above, since the evaluation value is the sum of the reciprocals of the distances between the keywords, the evaluation value of the
パス式文書間評価部141は、算出された検索対象データ101及び検索対象データ102の評価値に基づいて、当該検索対象データ101及び検索対象データ102の順位付けを行う。パス式文書間評価部141は、例えば算出された評価値が大きい検索対象データ(ここでは、検索対象データ101)を上位に順位付ける。したがって、この場合には検索対象データ101、検索対象データ102の順で検索結果が検索者20に対して提示されることになる。
なお、上記した第1のアルゴリズムは一例であり、例えばキーワード間の距離の定義または評価値の算出方法は、ここで説明した以外のものであっても構わない。
The path type
Note that the first algorithm described above is merely an example, and for example, the method for defining the distance between keywords or calculating the evaluation value may be other than that described here.
上記したように本実施形態においては、検索者から指定された複数の文字列(語彙)を含むパス形式の検索条件(検索条件パス式)から、語彙階層関係グラフ格納部132に格納されている語彙階層関係グラフ及び変換データ格納部133に格納されている変換データに基づいて、当該検索条件に含まれる文字列間の階層関係に適合する構造化文書(検索対象データ)を検索するためのXPath式が作成される。この作成されたXPath式に基づいて、検索対象データ格納部131に対して検索が実行される。これにより、検索者20は、検索対象となる構造化文書のデータ構造を意識することなく、例えばキーワード(文字列)を指定するような簡便さで、構造化文書の階層関係を考慮した検索を実行することが可能となる。
As described above, in the present embodiment, the search condition (search condition path expression) in the path format including a plurality of character strings (vocabulary) designated by the searcher is stored in the vocabulary hierarchy relation
また、本実施形態においては、上記したXPath式により検索された検索結果を、検索者20によって指定された検索条件に基づいて評価することにより、当該検索者20が意図した階層構造の構造化文書をより上位に順位付けして検索結果を返すことができる。これにより、検索者20は、効率的に自身が必要とするデータ(構造化文書)を取得することが可能となる。
In the present embodiment, the search result searched by the above XPath expression is evaluated based on the search condition specified by the
また、本実施形態においては、構造化文書の階層構造を示す構造グラフ上で、例えば任意の2頂点の特定の距離に基づいて、語彙階層関係グラフが作成される。これにより、この語彙階層関係グラフを用いて検索処理が実行される際、検索対象となる構造化文書上で、検索者20によって指定された語彙が直接階層関係にない構造化文書であっても考慮して検索することが可能となる。
In the present embodiment, a lexical hierarchy relation graph is created on the structure graph indicating the hierarchical structure of the structured document, for example, based on a specific distance between two arbitrary vertices. Thus, when a search process is executed using this vocabulary hierarchy relation graph, even if the vocabulary specified by the
また、本実施形態においては、予め定義されたレベルを設定指定おくことで、未設定階層関係が入力パス式として指定された場合であっても、当該設定されたレベルに応じて、当該未設定階層関係を静的または動的に設定することが可能となる。 Further, in the present embodiment, by setting and specifying a pre-defined level, even if the unset hierarchy relationship is specified as an input path expression, the non-set level is set according to the set level. Hierarchical relationships can be set statically or dynamically.
なお、上記した本実施形態においては、検索者20によって検索実行部12に検索要求が出され、管理者30によってデータ解析部11に語彙階層関係グラフ作成要求が出される構成としているが、全ての要求を入力する要求制御部を設ける構成でも構わない。この場合、要求制御部は、入力された要求を解釈し、データ解析部11または検索実行部12に処理を自動で振り分けることが可能となる。
In the above-described embodiment, the
また、本実施形態に係る検索結果評価装置10は、上記したように検索装置であるものとして説明したが、検索対象データを検索対象データ格納部131に登録する機能を有する構成であってもよい。また、検索結果評価装置10は、検索対象データを更新または削除する機能を含む管理装置として利用される構成であっても構わない。
Moreover, although the search
[第2の実施形態]
次に、図15を参照して、本発明の第2の実施形態に係る検索結果評価装置について説明する。図15は、本実施形態に係る検索結果評価装置の主として機能構成を示すブロック図である。なお、前述した図1と同様の部分には同一参照符号を付してその詳しい説明を省略する。ここでは、図1と異なる部分について主に述べる。
[Second Embodiment]
Next, a search result evaluation apparatus according to the second embodiment of the present invention will be described with reference to FIG. FIG. 15 is a block diagram mainly showing a functional configuration of the search result evaluation apparatus according to the present embodiment. The same parts as those in FIG. 1 described above are denoted by the same reference numerals, and detailed description thereof is omitted. Here, parts different from FIG. 1 will be mainly described.
図15に示す検索結果評価装置40は、検索実行部41及び検索結果評価部42を含む。検索実行部41は、クエリ作成部411を含む。クエリ作成部411は、例えば検索者20によって指定された検索条件パス式を複数の検索条件パス式に展開する処理を実行する。このとき、クエリ作成部411は、検索者20によって指定された検索条件パス式に含まれる複数の文字列に基づいて、当該検索条件パス式を展開する。クエリ作成部411は、例えば検索者20によって指定された検索条件パス式に含まれる複数の文字列の並び替えることによって複数の検索条件パス式に展開する。これにより、クエリ作成部411は、検索者20によって指定された検索条件パス式から複数の検索条件パス式を作成する。また、クエリ作成部411は、語彙階層関係グラフ格納部132及び変換データ格納部133を参照して、検索者20によって指定された検索条件パス式及び展開された複数の検索パス式から検索式(例えばXPath式)を作成する。
The search
検索結果評価部42は、パス式間評価部421を含む。パス式間評価部421は、クエリ作成部411によって展開された複数の検索条件パス式の各々を、例えば検索者20によって指定された検索条件パス式に基づいて評価する。この場合、パス式間評価部421は、検索者によって指定された検索条件パス式に含まれる複数の文字列の並び順及びクエリ作成部411によって展開された複数の検索条件パス式の各々に含まれる複数の文字列の並び順に基づいて、当該展開された複数の検索条件パス式の各々の評価値を算出する。パス式間評価部421は、算出された評価値に基づいて、展開された複数の検索条件パス式の順序付けを行う。
The search
次に、図16のフローチャートを参照して、図15に示す検索結果評価装置40の検索者20からの検索要求に応じて検索が実行される際の処理手順について説明する。
まず、検索者20は、検索条件パス式を指定して検索要求を出す(ステップS61)。この検索条件パス式には、複数の文字列(語彙)が含まれる。ここでは、検索条件パス式は、「天気/東京都」であるものとして説明する。
Next, a processing procedure when a search is executed in response to a search request from the
First, the
検索実行部41のクエリ作成部411は、検索者20によって指定された検索条件パス式を入力する。以下、クエリ作成部411によって入力された検索条件パス式を入力パス式と称する。
次に、クエリ作成部411は、入力パス式を展開する(ステップSS62)。クエリ作成部411は、入力パス式に含まれる文字列を並び替えることによって、当該入力パス式を複数の検索条件パス式に展開する。このとき、クエリ作成部411は、検索条件パス式に含まれる全ての文字列の順列(並び順)毎に展開する。具体的には、入力パス式が「天気/東京都」であれば、当該入力パス式は、「天気/東京都」及び「東京都/天気」のように複数の検索条件パス式に展開される。以下、クエリ作成部411によって展開された複数の検索条件パス式の各々を展開パス式と称する。
The query creation unit 411 of the
Next, the query creation unit 411 expands the input path expression (step SS62). The query creation unit 411 expands the input path expression into a plurality of search condition path expressions by rearranging the character strings included in the input path expression. At this time, the query creation unit 411 expands every permutation (arrangement order) of all character strings included in the search condition path expression. Specifically, if the input path expression is “weather / Tokyo”, the input path expression is expanded into a plurality of search condition path expressions such as “weather / Tokyo” and “Tokyo / weather”. The Hereinafter, each of the plurality of search condition path expressions expanded by the query creation unit 411 is referred to as an expanded path expression.
なお、展開パス式の各々によって示される文字列の順列は、当該順列の文字列の順によって階層関係を示す。例えば展開パス式が「天気/東京都」である場合には、「天気」から「東京都」に階層関係を有する旨を示す。以下、この階層関係を展開パス式の階層関係と称する。 Note that the permutation of the character strings indicated by each of the expansion path expressions indicates the hierarchical relationship according to the order of the character strings in the permutation. For example, if the development path expression is “weather / Tokyo”, it indicates that there is a hierarchical relationship from “weather” to “Tokyo”. Hereinafter, this hierarchical relationship is referred to as an expanded path type hierarchical relationship.
また、上記したステップS62においては、入力パス式に含まれるすべての文字列の順列毎に展開する場合について説明したが、例えば語彙階層関係グラフ格納部132を参照して、上記した展開パス式の階層関係を含む語彙階層関係グラフが存在する展開パス式のみが展開される構成でもよい。これにより、以下のステップにおいて処理される展開パス式の数が少なくなるため、処理量を減少させることが可能となる。
Further, in the above-described step S62, the case where expansion is performed for each permutation of all character strings included in the input path expression has been described. For example, referring to the vocabulary hierarchy relation
また、入力パス式に含まれる文字列を形態素解析し、その結果により抽出された文字列により当該入力パス式を展開する構成でもよい。この場合、例えば入力パス式が「天気/くもり時々晴れ」である場合、「くもり時々晴れ」を形態素解析し、展開パス式を「天気/くもり/晴れ」、「天気/くもり」及び「天気/晴れ」のように展開することが可能となる。 Further, a configuration may be adopted in which a character string included in the input path expression is subjected to morphological analysis, and the input path expression is expanded by a character string extracted as a result. In this case, for example, when the input path expression is “weather / cloudy sometimes sunny”, “morphely is sometimes cloudy” is analyzed, and the developed path expressions are “weather / cloudy / sunny”, “weather / cloudy” and “weather / cloudy”. It becomes possible to develop as “sunny”.
また、入力パス式の展開には、上記したような当該入力パス式に含まれる文字列の単純な並び替えだけでなく、例えば「and」、「or」または「not」のような論理演算による展開も含まれる。つまり、入力パス式が「A/B/C」である場合には、例えば「A/(B and C)」に展開することも可能である。 In addition, the expansion of the input path expression is not only based on the simple rearrangement of the character strings included in the input path expression as described above, but also by a logical operation such as “and”, “or” or “not”. Deployment is also included. That is, when the input path expression is “A / B / C”, for example, it can be expanded to “A / (B and C)”.
次に、クエリ作成部411は、展開パス式の各々に対して、スコアリングを行う(ステップS63)。例えば評価値を用いてスコアリング処理を実行する。また、クエリ作成部411は、必要に応じて語彙階層関係グラフ格納部132に格納されている語彙階層関係グラフを利用して評価値を算出する。
Next, the query creation unit 411 performs scoring for each expansion path expression (step S63). For example, scoring processing is executed using the evaluation value. Further, the query creation unit 411 calculates an evaluation value using the vocabulary hierarchy relationship graph stored in the vocabulary hierarchy relationship
ここで、上記したスコアリング処理に用いられる評価値の例について具体的に説明する。クエリ作成部411は、以下の例えば第8の評価値から第10の評価値を含む複数の評価値を用いてスコアリング処理を実行する。
第8の評価値は、入力パス式と展開パス式の各々とを比較して、両者に含まれる文字列の順序の違いに応じて算出される。この場合、入力パス式に含まれる文字列の順序と比較して、順序が異なる文字列が多く含まれる展開パス式に対しては、評価値は小さくなる。例えばx=入力パス式と順序の異なる文字列の数、X=入力パス式または展開パス式に含まれる文字列の数とすると、例えば評価式X/(log a x)+Nによって第8の評価値は算出される。ただし、評価式X/(log a x)+Xにおいて、入力パス式と順序の異なる文字列がない場合、つまり、x=0の場合には、評価値1が算出されるものとする。なお、評価式において、「a」は底とし、任意に設定可能である。以下の評価値においても同様である。
Here, an example of evaluation values used in the above scoring process will be specifically described. The query creation unit 411 executes the scoring process using a plurality of evaluation values including the following eighth evaluation value to tenth evaluation value, for example.
The eighth evaluation value is calculated according to the difference in the order of the character strings included in both of the input path expression and the expansion path expression. In this case, compared with the order of the character strings included in the input path expression, the evaluation value is smaller for the expanded path expression including many character strings having different orders. For example, if x = the number of character strings in the order different from the input path expression, and X = the number of character strings included in the input path expression or the expansion path expression, for example, the eighth evaluation value by the evaluation expression X / (log ax) + N Is calculated. However, in the evaluation formula X / (log ax) + X, when there is no character string having a different order from the input path formula, that is, when x = 0, the
第9の評価値は、入力パス式と展開パス式の各々とを比較して、両者の文字列(語彙)の種類の違いに応じて算出される。この場合、入力パス式に含まれる語彙の種類と異なる種類の語彙が多く含まれる展開パス式に対しては、評価値は小さくなる。ここで、例えば展開パス式に含まれる語彙が、上記した入力パス式に含まれる語彙そのものでなく、形態素解析して抽出された語彙である場合には、語彙の種類が異なるものとして扱われる。例えばy=入力パス式に含まれる語彙の種類と異なる種類の語彙の数、Y=入力パス式または展開パス式に含まれる語彙の数とすると、例えば評価式Y/(log a y)+Yによって第9の評価値は算出される。ただし、評価式Y/(log a y)+Yにおいて入力パス式に含まれる語彙の種類と異なる種類の語彙がない場合、つまり、y=0の場合には評価値1が算出されるものとする。
The ninth evaluation value is calculated according to the difference in the type of character string (vocabulary) between the input path expression and the expansion path expression. In this case, the evaluation value is small for an expanded path expression that includes many vocabulary types different from the vocabulary types included in the input path expression. Here, for example, when the vocabulary included in the expanded path expression is not the vocabulary itself included in the input path expression but a vocabulary extracted by morphological analysis, the vocabulary types are treated as different. For example, if y = the number of vocabulary types different from the vocabulary type included in the input path expression, and Y = the number of vocabularies included in the input path expression or the expansion path expression, An evaluation value of 9 is calculated. However, when there is no vocabulary of a different type from the vocabulary included in the input path expression in the evaluation expression Y / (log a y) + Y, that is, when y = 0, the
第10の評価値は、展開パス式内で隣接されている文字列(語彙)間の関係に応じて算出される。この場合、展開パス式の階層関係の各々のうち、例えば親子関係として設定されていない階層関係の数が多い場合には、評価値は小さくなる。例えばZ=親子関係として設定されていない階層関係の数とすると、例えば評価式1/(log a Z)+1によって第10の評価値は算出される。ただし、評価式1/(log a Z)+1において、設定されていない階層関係がない場合、つまり、Z=0の場合には評価値1が算出されるものとする。なお、第10の評価値は、例えば語彙階層関係グラフ格納部132に格納されている語彙階層関係グラフの各々について上記した評価式で評価値を求め、当該語彙階層関係グラフの各々について求められた評価値を合計することによって求められる。
The tenth evaluation value is calculated according to the relationship between adjacent character strings (vocabulary) in the development path expression. In this case, for example, when the number of hierarchical relationships that are not set as parent-child relationships is large in each of the hierarchical relationships of the development path expression, the evaluation value becomes small. For example, if Z = the number of hierarchical relationships that are not set as parent-child relationships, the tenth evaluation value is calculated by, for example, the
展開パス式の各々は、例えば上記した第8から第10の評価値を含む複数の評価値の合計によってスコアリングされる。クエリ作成部411は、スコアリングされた結果を元に、スコア(評価値の合計)が上位の展開パス式を選択する(ステップS64)。以下、クエリ作成部411によって選択されたスコアが上位の展開パス式を中間パス式と称する。なお、中間パス式は複数であっても構わない。 Each of the development path expressions is scored by, for example, the sum of a plurality of evaluation values including the above-described eighth to tenth evaluation values. Based on the scored result, the query creation unit 411 selects an expanded path expression having a higher score (total evaluation value) (step S64). Hereinafter, an expanded path expression having a higher score selected by the query creation unit 411 is referred to as an intermediate path expression. There may be a plurality of intermediate path expressions.
検索実行部41(クエリ作成部411)は、入力パス式及び中間パス式を検索結果評価部42に渡す。
検索結果評価部42のパス式間評価部421は、検索実行部41から渡された入力パス式及び中間パス式を取得する。パス式間評価部421は、取得された入力パス式に基づいて、取得された中間パス式(の各々)を評価する(ステップS65)。この場合、パス式間評価部421は、入力パス式に含まれる複数の文字列の並び順及び中間パス式に含まれる複数の文字列の並び順に基づいて、当該中間パス式の評価値を算出し、算出された評価値に基づいて、中間パス式の順序付けを行う。パス式間評価部421は、順序付けされた中間パス式を検索実行部41に返す。
The search execution unit 41 (query creation unit 411) passes the input path expression and intermediate path expression to the search result evaluation unit.
The inter-path
ここで、パス式間評価部421による中間パス式の評価値を算出する処理について具体的に説明する。ここでは、入力パス式は、「合田/発明/構造化文書」であるものとして説明する。この入力パス式は、例えば「合田が行った発明で構造化文書を含むもの」といった意味を表す。また、クエリ作成部411によって入力パス式「合田/発明/構造化文書」から中間パス式「発明/(合田 and 構造化文書)」及び「合田/発明/構造化文書」が作成されたものとする。以下、中間パス式「発明/(合田 and 構造化文書)」を第1の中間パス式、中間パス式「合田/発明/構造化文書」を第2の中間パス式と称する。
Here, the process of calculating the evaluation value of the intermediate path expression by the inter-path
なお、例えば上記ステップS63におけるスコアリングの結果によっては、上記のように入力パス式と第2の中間パス式が同じになる場合もあり得る。この場合には、入力パス式及び第2の中間パス式を1つの検索条件パス式(例えば入力パス式)として扱っても構わない。 For example, depending on the result of scoring in step S63, the input path expression and the second intermediate path expression may be the same as described above. In this case, the input path expression and the second intermediate path expression may be handled as one search condition path expression (for example, an input path expression).
以下、パス式間評価部421が第1の中間パス式及び第2の中間パス式の評価値を算出するアルゴリズム(以下、第2のアルゴリズムと表記)の一例について説明する。
まず、パス式間評価部421は、例えば入力パス式及び中間パス式(ここでは、第1の中間パス式及び第2の中間パス式)において同一の階層関係にある同一のキーワードの組み合わせの数(以下、第1の組み合わせ数と表記)を算出する。
ここで、階層関係とは、入力パス式または中間パス式において、「/」で区切られているキーワードの関係を意味する。また、複数の「/」で区切られているキーワード間にも階層関係があると定義する。例えば入力パス式(中間パス式)が「A/B/C」である場合には、当該入力パス式には、「A→B」、「A→C」及び「B→C」という階層関係が含まれている。
Hereinafter, an example of an algorithm (hereinafter referred to as a second algorithm) in which the inter-path
First, the inter-path
Here, the hierarchical relationship means a relationship between keywords separated by “/” in an input path expression or an intermediate path expression. Also, it is defined that there is a hierarchical relationship between keywords separated by a plurality of “/”. For example, when the input path expression (intermediate path expression) is “A / B / C”, the input path expression includes a hierarchical relationship of “A → B”, “A → C”, and “B → C”. It is included.
次に、パス式間評価部421は、入力パス式に含まれる複数のキーワード(文字列)のうち、任意の2つのキーワードの組み合わせの数(以下、第2の組み合わせ数と表記)を算出する。上記したように例えば入力パス式が「A/B/C」である場合には、任意の2つのキーワードの組み合わせは「A、B」、「A、C」及び「B、C」であるから、第2の組み合わせ数は3となる。
パス式間評価部421は、算出された第1の組み合わせ数及び第2の組み合わせ数から、第1の組み合わせ数/第2の組み合わせ数を中間パス式の評価値として算出する。
Next, the inter-path
The inter-path
ここで、上記した第1の中間パス式及び第2の中間パス式の評価値について具体的に説明する。まず、入力パス式「合田/発明/構造化文書」の階層関係は、「合田→発明」、「合田→構造化文書」及び「発明→構造化文書」である。第1の中間パス式「発明/(合田 and 構造化文書)」の階層関係は、「発明→合田」及び「発明→構造化文書」である。また、第2の中間パス式「合田/発明/構造化文書」の階層関係は、「合田→発明」、「合田→構造化文書」及び「発明→構造化文書」である。
この場合、入力パス式及び第1の中間パス式における第1の組み合わせ数は、1(「発明→構造化文書」)である。また、入力パス式及び第2の中間パス式における第1の組み合わせ数は、3(「合田→発明」、「合田→構造化文書」、「発明→構造化文書」)である。
また、入力パス式における第2の組み合わせ数は、3(「合田→発明」、「合田→構造化文書」、「発明→構造化文書」)である。
これにより、第1の中間パス式の評価値は、第1の組み合わせ数/第2の組み合わせ数より、1/3である。また、第2の中間パス式の評価値は、3/3(=1)である。
Here, the evaluation values of the first intermediate path expression and the second intermediate path expression will be specifically described. First, the hierarchical relationship of the input path expression “Goda / invention / structured document” is “Goda → invention”, “Goda → structured document”, and “invention → structured document”. The hierarchical relationship of the first intermediate path expression “invention / (Goda and structured document)” is “invention → Goda” and “invention → structured document”. The hierarchical relationship of the second intermediate path expression “Goda / invention / structured document” is “Goda → invention”, “Goda → structured document”, and “invention → structured document”.
In this case, the first combination number in the input path expression and the first intermediate path expression is 1 (“invention → structured document”). The number of first combinations in the input path expression and the second intermediate path expression is 3 (“Goda → Invention”, “Goda → Structured Document”, “Invention → Structured Document”).
The second combination number in the input path expression is 3 (“Goda → Invention”, “Goda → Structured Document”, “Invention → Structured Document”).
Thereby, the evaluation value of the first intermediate path expression is 1/3 from the number of first combinations / the number of second combinations. The evaluation value of the second intermediate path expression is 3/3 (= 1).
パス式間評価部421は、算出された第1の中間パス式及び第2の中間パス式の評価値に基づいて、当該第1の中間パス式及び第2の中間パス式の順序付けを行う。例えば算出された評価値が大きい中間パス式(ここでは、第2の中間パス式)を上位に順位付ける。
The inter-path
なお、上記した第2のアルゴリズムは一例であり、例えば階層関係の定義または評価値の算出方法は、ここで説明した以外のものであっても構わない。 Note that the second algorithm described above is merely an example. For example, the hierarchical relationship definition or the evaluation value calculation method may be other than the one described here.
次に、クエリ作成部411は、語彙階層関係グラフ格納部132を参照して、入力パス式毎及び中間パス式毎の階層関係を例えば親子関係として含む語彙階層関係グラフを取得する(ステップS66)。
なお、クエリ作成部411は、例えば入力パス式及び中間パス式の階層関係のすべてを親子関係として含む語彙階層関係グラフが語彙階層関係グラフ格納部132に存在しない場合には、当該入力パス式及び中間パス式の階層関係の一部を親子関係として含む語彙階層関係グラフを取得する。例えば入力パス式(中間パス式)がA/B/C(当該入力パス式の階層関係がAからB、BからC)である場合に、当該階層関係を完全に含む語彙階層関係グラフが語彙階層関係グラフ格納部132に存在しない場合を想定する。この場合、クエリ作成部411は、例えばAからBの階層関係のみを親子関係として含む語彙階層関係グラフ、またはBからCの階層関係のみを親子関係として有する語彙階層関係グラフを取得する。
Next, the query creation unit 411 refers to the vocabulary hierarchy relationship
Note that the query creation unit 411, for example, if the lexical hierarchy relationship graph including all of the hierarchical relationships of the input path expression and the intermediate path expression as a parent-child relationship does not exist in the vocabulary hierarchy relationship
クエリ作成部411は、取得された語彙階層関係グラフに基づいて、入力パス式及び中間パス式に含まれる文字列(語彙)の各々のノードタイプを判別する(ステップS67)。クエリ作成部411は、入力パス式の階層関係及び判別された当該入力パス式に含まれる文字列のノードタイプに基づいて、当該入力パス式に含まれる文字列間の階層関係を有する検索対象データを検索するための検索式、例えばXPath式を作成する。同様に、クエリ作成部411は、中間パス式の階層関係及び判別された当該中間パス式に含まれる文字列のノードタイプに基づいて、当該中間パス式に含まれる文字列間の階層関係を有する検索対象データを検索するための検索式(XPath式)を作成する。
つまり、クエリ作成部411は、入力パス式及び中間パス式をそれぞれXPath式に変換する(ステップS68)。このとき、クエリ作成部411は、変換データ格納部133に格納されている変換データに基づいて、変換処理を実行する。この変換処理については、前述した第1の実施形態と同様であるためその詳しい説明は省略する。
The query creation unit 411 determines the node type of each character string (vocabulary) included in the input path expression and the intermediate path expression based on the acquired vocabulary hierarchy relation graph (step S67). Based on the hierarchical relationship of the input path expression and the node type of the character string included in the determined input path expression, the query creating unit 411 has search target data having a hierarchical relationship between the character strings included in the input path expression. Create a search expression to search for, for example, XPath expression. Similarly, the query creation unit 411 has a hierarchical relationship between character strings included in the intermediate path expression based on the hierarchical relationship of the intermediate path expression and the node type of the character string included in the determined intermediate path expression. Create a search expression (XPath expression) for searching the search target data.
That is, the query creation unit 411 converts the input path expression and the intermediate path expression into XPath expressions, respectively (step S68). At this time, the query creation unit 411 executes conversion processing based on the conversion data stored in the conversion
次に、検索実行部41の検索制御部122は、クエリ作成部411によって作成されたXPath式を指定して、記憶部13に対して検索要求を出力する。
記憶部13は、検索制御部122からの検索要求に応じて、当該検索制御部122の制御の下、検索対象データ格納部131から当該検索要求に合致する検索対象データ(構造化文書)を検索する(ステップS69)。このとき、記憶部13は、クエリ作成部411によって作成されたXPath式の各々に基づいて検索を実行する。記憶部13は、クエリ作成部411によって作成されたXPath式毎に、検索された検索対象データを含む検索結果データを検索制御部122に返す。これにより、検索制御部122は、XPath式毎の検索結果データを取得する。
Next, the
In response to the search request from the
以下、入力パス式から作成(変換)されたXPath式に基づいて検索された検索対象データを含む検索結果データを入力パス式の検索結果データと称する。また、中間パス式から作成されたXPath式に基づいて検索された検索対象データを含む検索結果データを中間パス式の検索結果データと称する。なお、単に検索結果データと表記する場合には、入力パス式の検索結果データ及び中間パス式の検索結果データの両方を含むものとする。 Hereinafter, search result data including search target data searched based on an XPath expression created (converted) from an input path expression is referred to as input path expression search result data. Further, search result data including search target data searched based on an XPath expression created from an intermediate path expression is referred to as intermediate path expression search result data. It should be noted that the expression “search result data” includes both input path type search result data and intermediate path type search result data.
検索制御部122は、取得された検索結果データ及び入力パス式を検索結果評価部42に渡す。
検索結果評価部42のパス式文書間評価部141は、検索制御部122から渡された入力パス式、検索結果データ及びパス式間評価部421による中間パス式の順序付けの結果に基づいて、当該検索結果データに含まれる検索対象データ(構造化文書)の評価を行う(ステップS70)。
The
The path expression
このときパス式文書間評価部141は、検索制御部122から渡された入力パス式に基づいて、入力パス式及び中間パス式の検索結果データ毎に評価値を算出する。
つまり、パス式文書間評価部141は、検索制御部122から渡された入力パス式に基づいて、入力パス式の検索結果データに含まれる検索対象データの各々の評価値を算出する。これにより、パス式文書間評価部141は、算出された評価値に基づいて、入力パス式の検索結果データにも含まれる検索対象データに対して順序付けを行う。
At this time, the path expression
That is, the path expression
また、パス式文書間評価部141は、検索制御部122から渡された入力パス式に基づいて、中間パス式の検索結果データに含まれる検索対象データの各々の評価値を算出する。これにより、パス式文書間評価部141は、算出された評価値に基づいて、中間パス式の検索結果データに含まれる検索対象データに対して順序付けを行う。
なお、この検索対象データの評価値は、前述した第1の実施形態の例えば第1のアルゴリズムにより算出されるため、その詳しい説明は省略する。
Further, the path type
Note that the evaluation value of the search target data is calculated by, for example, the first algorithm of the first embodiment described above, and thus detailed description thereof is omitted.
また、パス式文書間評価部141は、上記ステップS65においてパス式間評価部421によって中間パス式に対する順序付けの結果及び上記検索対象データの各々に対する順序付けの結果に基づいて、検索結果データに含まれる検索対象データについて順序付けを行う。パス式文書間評価部141によって順序付けされた検索対象データを含む検索結果データは、検索実行部41に渡される。
Further, the pass expression
検索制御部122は、パス式文書間評価部141から渡された検索結果データを、検索者20からの検索要求に対する検索結果として検索者20に返す(ステップS71)。これにより検索者20は、検索要求に対する検索結果を取得する(ステップS72)。この場合、検索結果は、パス式文書間評価部141によって順序付けされた結果が上位の検索対象データから順に検索者20に対して提示(表示)される。
The
なお、ステップS66において、クエリ作成部411によって複数の語彙階層関係グラフが取得された場合は、取得された語彙階層関係グラフの各々についてステップS67及びS68の処理が実行される。これにより、例えば入力パス式(または中間パス式)から複数のXPath式が作成(変換)された場合は、当該複数のXPath式を互いにOR(論理輪)の関係として、ステップS69の処理が実行される。 In step S66, when a plurality of vocabulary hierarchy relationship graphs are acquired by the query creation unit 411, the processing of steps S67 and S68 is executed for each of the acquired vocabulary hierarchy relationship graphs. As a result, for example, when a plurality of XPath expressions are created (converted) from the input path expression (or intermediate path expression), the process of step S69 is executed with the plurality of XPath expressions being in an OR (logical ring) relationship with each other. Is done.
次に、図17及び図18を参照して、パス式文書間評価部141による検索対象データの順序付けの具体例について説明する。
ここで、クエリ作成部411によって入力パス式から作成された中間パス式は、中間パス式1及び中間パス式2であるものとする。
図17は、各検索条件パス式(入力パス式、中間パス式1、中間パス式2)の検索結果データの一例を示す。図17に示す例では、入力パス式の検索結果データには、検索対象データ1〜3が含まれる。同様に、中間パス式1の検索結果データには、検索対象データ4〜6が含まれる。また、中間パス式2の検索結果データには、検索対象データ7及び8が含まれる。
Next, a specific example of ordering of search target data by the path type
Here, the intermediate path expressions created from the input path expression by the query creation unit 411 are the
FIG. 17 shows an example of search result data for each search condition path expression (input path expression,
ここで、パス式間評価部421が例えば前述した第2のアルゴリズムにより算出した中間パス式1の評価値が1/3、中間パス式2の評価値が1であるものとする。この場合、パス式間評価部421は、中間パス式2、中間パス式1の順に順序付けを行う。
また、パス式文書間評価部141が例えば前述した第1のアルゴリズムにより入力パス式、中間パス式1及び中間パス式2の検索結果データ毎に対して評価値を算出したものとする。この結果、入力パス式の検索結果データにおいては、算出された評価値に基づいて、検索対象データ1、検索対象データ3、検索対象データ2の順に順序付けされたものとする。中間パス式1においては、算出された評価値に基づいて、検索対象データ5、検索対象データ4、検索対象データ6の順に順序付けされたものとする。また、中間パス式2においては、算出された評価値に基づいて、検索対象データ8、検索対象データ7の順に順序付けされたものとする。
パス式文書間評価部141は、上記したような中間パス式に対する順序付けの結果及び各検索結果データに対する順序付けの結果に基づいて、検索結果データに含まれる検索対象データ全体の順序付けを行う。
Here, it is assumed that the evaluation value of the
In addition, it is assumed that the path type
The path expression
図18は、上記したような中間パス式及び各検索結果データに対する順序付けの結果に基づいて、検索結果データに含まれる検索対象データが順序付けされた結果を示す。
上記したように中間パス式は、中間パス式2、中間パス式1の順に順序付けがされている。この場合、検索対象データの順序付けにおいては、入力パス式の検索結果データ、中間パス式2の検索結果データ、中間パス式1の検索結果データの順に順序付けされる。また、各検索結果データに含まれる検索対象データの順序付けにおいては、上記した各検索結果データに対する順序付けの順となる。
FIG. 18 shows a result of ordering the search target data included in the search result data based on the above intermediate path expression and the result of ordering for each search result data.
As described above, the intermediate path expressions are ordered in the order of the
よって、図18に示すように、まず、入力パス式の検索結果データに含まれる検索対象データ1、検索対象データ3、検索対象データ2が上位に順序付けされる。次に、中間パス式2の検索結果データに含まれる検索対象データ8、検索対象データ7の順に順序付けされる。その後に、中間パス式1の検索結果データに含まれる検索対象データ5、検索対象データ4、検索対象データ6の順に順序付けされる。
つまり、上記したような場合、検索結果データ(に含まれる各検索対象データ)が図18に示す順序で検索者20に対して提示されることになる。
Therefore, as shown in FIG. 18, first, the
That is, in the case described above, search result data (each search target data included therein) is presented to the
上記したように本実施形態においては、前述した第1の実施形態と異なり、検索者20によって指定された検索条件パス式(入力パス式)から複数の検索条件パス式(中間パス式)が作成される。本実施形態においては、入力パス式から作成されたXPath式に加えて、この中間パス式から作成されたXPath式に基づいて検索処理が実行される。これにより、検索者20によって指定された複数の文字列(語彙)を含む入力パス式の階層関係以外の階層関係についても検索することが可能となる。したがって、検索者20は、前述した第1の実施形態と比較して、より構造化文書のデータ構造を意識することなく、構造化文書の階層関係を考慮した検索を実行することが可能となる。
As described above, in this embodiment, unlike the first embodiment described above, a plurality of search condition path expressions (intermediate path expressions) are created from the search condition path expression (input path expression) specified by the
また、本実施形態においては、入力パス式及び中間パス式の検索結果(データ)を評価することにより、検索者20が意図した階層構造の構造化文書をより上位に順位付けして検索結果を返すことができる。これにより、検索者20は、効率的に自身が必要とするデータ(構造化文書)を取得することが可能となる。
Further, in this embodiment, by evaluating the search results (data) of the input path expression and the intermediate path expression, the structured documents having the hierarchical structure intended by the
また、本実施形態においては、入力パス式から作成された中間パス式を事前に評価し、順位付けを行うことにより、検索結果に含まれる検索対象データの評価処理を減少させることにより、全体としての処理時間の短縮を可能とすることができる。 Further, in the present embodiment, the intermediate path expression created from the input path expression is evaluated in advance, and ranking is performed, thereby reducing the evaluation processing of the search target data included in the search result, and as a whole The processing time can be shortened.
なお、本願発明は、上記各実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記各実施形態に開示されている複数の構成要素の適宜な組合せにより種々の発明を形成できる。例えば、各実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態に亘る構成要素を適宜組合せてもよい。 Note that the present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. Further, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the above embodiments. For example, some components may be deleted from all the components shown in each embodiment. Furthermore, you may combine the component covering different embodiment suitably.
10,40…検索結果評価装置、11…データ解析部、12,41…検索実行部、13…記憶部、14,42…検索結果評価部、111…データ解析制御部、112…語彙階層関係グラフ作成部、121,411…クエリ作成部、122…検索制御部、131…検索対象データ格納部、132…語彙階層関係グラフ格納部、133…変換データ格納部、141…パス式文書間評価部、421…パス式間評価部。
DESCRIPTION OF
Claims (5)
前記検索対象データ格納手段に格納されている複数の構造化文書の各々に含まれる語彙間の階層関係を示す語彙階層関係グラフを、当該構造化文書毎に格納する語彙階層関係グラフ格納手段と、
前記語彙階層関係グラフ格納手段を参照して、前記検索条件に含まれる複数の文字列から構造化文書を検索するための検索式を作成するクエリ作成手段と、
前記作成された検索式に合致する構造化文書を前記検索対象データ格納手段から検索する検索手段と、
前記検索条件に含まれる複数の文字列に基づいて、前記検索された構造化文書を評価する検索結果評価手段と
を具備することを特徴とする検索結果評価装置。 In a search result evaluation apparatus that performs a search according to a search condition including a plurality of character strings specified by a user, with respect to a search target data storage unit storing a plurality of structured documents to be searched,
A lexical hierarchy relation graph storage means for storing a lexical hierarchy relation graph indicating a hierarchical relation between vocabularies included in each of the plurality of structured documents stored in the search target data storage means, for each structured document;
Query creation means for creating a search expression for searching a structured document from a plurality of character strings included in the search condition with reference to the vocabulary hierarchy relationship graph storage means;
A search unit that searches the search target data storage unit for a structured document that matches the created search formula;
A search result evaluation device comprising: search result evaluation means for evaluating the searched structured document based on a plurality of character strings included in the search condition.
前記検索された構造化文書内において前記検索条件に含まれる複数の文字列が出現する箇所に基づいて、当該構造化文書の評価値を算出する算出手段を含み、
前記算出された評価値に基づいて、前記検索された構造化文書の順序付けを行う
ことを特徴とする請求項1記載の検索結果評価装置。 The search result evaluation means includes:
A calculation unit that calculates an evaluation value of the structured document based on a location where a plurality of character strings included in the search condition appear in the searched structured document;
The search result evaluation apparatus according to claim 1, wherein the searched structured documents are ordered based on the calculated evaluation value.
前記クエリ作成手段は、
前記検索条件に含まれる文字列を並び替えることによって、当該検索条件から複数の検索条件を展開する展開手段と、
前記ユーザによって指定された検索条件及び前記展開された複数の検索条件毎に、当該検索条件に含まれる複数の文字列を語彙として含む語彙階層関係グラフを取得する取得手段と、
前記取得された語彙階層関係グラフによって示される前記複数の文字列間の階層関係を示す関係情報に対応付けて前記変換データ格納手段に格納されている検索式情報によって示される検索式を作成する検索式作成手段と
を含み、
前記検索手段は、前記検索式作成手段によって作成された検索式に合致する構造化文書を前記検索対象データ格納手段から検索し、
前記検索結果評価手段は、
前記展開された複数の検索条件の各々を、前記ユーザによって指定された複数の文字列を含む検索条件に基づいて評価する検索条件評価手段を含み、
前記ユーザによって指定された検索条件に含まれる複数の文字列及び前記検索条件評価手段による評価結果に基づいて、前記検索手段によって検索された構造化文書を評価する
ことを特徴とする請求項1記載の検索結果評価装置。 A conversion data storage means for storing relation information indicating a hierarchical relation between character strings and search expression information indicating a search expression for searching for a structured document having a hierarchical relation between the character strings in advance; Equipped,
The query creation means includes:
Expanding means for expanding a plurality of search conditions from the search conditions by rearranging the character strings included in the search conditions;
Obtaining means for acquiring a lexical hierarchy relation graph including a plurality of character strings included in the search condition as a vocabulary for each of the search condition specified by the user and the plurality of expanded search conditions;
A search for creating a search formula indicated by the search formula information stored in the conversion data storage means in association with the relationship information indicating the hierarchical relationship between the plurality of character strings indicated by the acquired vocabulary hierarchical relationship graph Including formula creation means and
The search means searches the search target data storage means for a structured document that matches the search expression created by the search expression creation means,
The search result evaluation means includes:
A search condition evaluation unit that evaluates each of the plurality of expanded search conditions based on a search condition including a plurality of character strings specified by the user;
The structured document searched by the search unit is evaluated based on a plurality of character strings included in the search condition specified by the user and an evaluation result by the search condition evaluation unit. Search result evaluation device.
前記検索結果評価手段は、前記算出された評価値に基づいて、前記検索された構造化文書の順序付けを行う
ことを特徴とする請求項3記載の検索結果評価装置。 The search condition evaluation means, based on the arrangement order of a plurality of character strings included in the search condition specified by the user and the arrangement order of a plurality of character strings included in each of the expanded plurality of search conditions, Including a calculation means for calculating an evaluation value of each of the expanded search conditions,
The search result evaluation device according to claim 3, wherein the search result evaluation unit orders the searched structured documents based on the calculated evaluation value.
前記検索対象データ格納手段に格納されている複数の構造化文書の各々に含まれる語彙間の階層関係を示す語彙階層関係グラフを、当該構造化文書毎に前記語彙階層関係グラフ格納手段に格納するステップと、
前記語彙階層関係グラフ格納手段を参照して、前記検索条件に含まれる複数の文字列から構造化文書を検索するための検索式を作成するステップと、
前記作成された検索式に合致する構造化文書を前記検索対象データ格納手段から検索するステップと、
前記検索条件に含まれる複数の文字列に基づいて、前記検索された構造化文書を評価するステップと
を具備することを特徴とする検索結果評価方法。 A search target data storage unit storing a plurality of structured documents to be searched and a vocabulary hierarchy relation graph storage unit are included, and the search target data storage unit includes a plurality of character strings designated by the user. A search result evaluation method applied in a search result evaluation device that executes a search according to a search condition,
A lexical hierarchy relation graph indicating a hierarchical relation between vocabularies included in each of the plurality of structured documents stored in the search target data storage means is stored in the vocabulary hierarchy relation graph storage means for each structured document. Steps,
Creating a search expression for searching a structured document from a plurality of character strings included in the search condition with reference to the vocabulary hierarchy relation graph storage means;
Searching the search target data storage unit for a structured document that matches the created search expression;
Evaluating the searched structured document based on a plurality of character strings included in the search condition. A search result evaluation method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008097778A JP2009251845A (en) | 2008-04-04 | 2008-04-04 | Retrieval result evaluation device and retrieval result evaluation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008097778A JP2009251845A (en) | 2008-04-04 | 2008-04-04 | Retrieval result evaluation device and retrieval result evaluation method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009251845A true JP2009251845A (en) | 2009-10-29 |
Family
ID=41312510
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008097778A Withdrawn JP2009251845A (en) | 2008-04-04 | 2008-04-04 | Retrieval result evaluation device and retrieval result evaluation method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009251845A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101448166B1 (en) | 2013-03-12 | 2014-10-07 | 주식회사 다음커뮤니케이션 | Method and server apparatus for evaluating search results |
WO2021082123A1 (en) * | 2019-10-28 | 2021-05-06 | 苏州跃盟信息科技有限公司 | Information recommendation method and apparatus, and electronic device |
-
2008
- 2008-04-04 JP JP2008097778A patent/JP2009251845A/en not_active Withdrawn
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101448166B1 (en) | 2013-03-12 | 2014-10-07 | 주식회사 다음커뮤니케이션 | Method and server apparatus for evaluating search results |
WO2021082123A1 (en) * | 2019-10-28 | 2021-05-06 | 苏州跃盟信息科技有限公司 | Information recommendation method and apparatus, and electronic device |
US11436289B2 (en) | 2019-10-28 | 2022-09-06 | Suzhou Deepleper Information And Technology Company Limited | Information recommendation method and apparatus, and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5744873B2 (en) | Trusted Query System and Method | |
KR101646754B1 (en) | Apparatus and Method of Mobile Semantic Search | |
US8805861B2 (en) | Methods and systems to train models to extract and integrate information from data sources | |
JP4314221B2 (en) | Structured document storage device, structured document search device, structured document system, method and program | |
US7548933B2 (en) | System and method for exploiting semantic annotations in executing keyword queries over a collection of text documents | |
JPH07319917A (en) | Document data base managing device and document data base system | |
JP2008052662A (en) | Structured document management system and program | |
Cammarano et al. | Visualization of heterogeneous data | |
JP2008171181A (en) | Structured data search apparatus | |
US20120179709A1 (en) | Apparatus, method and program product for searching document | |
US8229970B2 (en) | Efficient storage and retrieval of posting lists | |
JP3178421B2 (en) | Text search device and computer-readable recording medium storing text search program | |
JPH0844771A (en) | Information retrieval device | |
EP2240875A1 (en) | Method and system for navigation of a data structure | |
JP4439496B2 (en) | Search processing apparatus and program | |
JP2009251845A (en) | Retrieval result evaluation device and retrieval result evaluation method | |
JP4439497B2 (en) | Search processing apparatus and program | |
Gozudeli et al. | A new method based on Tree simplification and schema matching for automatic web result extraction and matching | |
JP5260123B2 (en) | Search system, index creation device, search engine, index creation method, search method and program | |
JP2009276826A (en) | Information retrieval device and information retrieval program | |
JP6589317B2 (en) | Rewriting device, processing method and program thereof, and information processing device | |
JP2008065543A (en) | Structured document search apparatus and structured document search method | |
CN115827829B (en) | Ontology-based search intention optimization method and system | |
JP4703705B2 (en) | Structured data search program and structured data search device | |
JP4543819B2 (en) | Information search system, information search method, and information search program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20110607 |