JP2013196264A - Similarity search device and computer program and similarity search method - Google Patents
Similarity search device and computer program and similarity search method Download PDFInfo
- Publication number
- JP2013196264A JP2013196264A JP2012061609A JP2012061609A JP2013196264A JP 2013196264 A JP2013196264 A JP 2013196264A JP 2012061609 A JP2012061609 A JP 2012061609A JP 2012061609 A JP2012061609 A JP 2012061609A JP 2013196264 A JP2013196264 A JP 2013196264A
- Authority
- JP
- Japan
- Prior art keywords
- file
- unit
- headword
- storage
- similarity
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
この発明は、蓄積した多数のファイルのなかから類似したファイルを検索する類似検索装置に関する。 The present invention relates to a similarity search apparatus that searches for a similar file from among a large number of accumulated files.
電子ファイルを適正なファイル保存領域に格納するため、アクセス頻度が高いファイル保存領域を提示して、ファイル保存領域をユーザに選択させる技術がある。 In order to store an electronic file in an appropriate file storage area, there is a technique that presents a file storage area with high access frequency and allows the user to select a file storage area.
アクセス頻度が高いファイル保存領域を提示する方式は、電子ファイルの内容をまったく考慮していないので、必ずしも適正なファイル保存領域を提示できるとは限らない。
この発明は、例えば、ファイルの内容を考慮することにより、利用者に対して、ファイルを保存する適正な保管場所を提示することを目的とする。
Since the method for presenting a file storage area with high access frequency does not take into account the contents of the electronic file at all, an appropriate file storage area cannot always be presented.
An object of the present invention is to present a proper storage location for storing a file to a user by considering the contents of the file, for example.
この発明にかかる類似検索装置は、
データを記憶する記憶装置と、ファイル記憶部と、見出し語記憶部と、データ入力部と、見出し語抽出部と、検索部と、類似度算出部とを有し、
上記ファイル記憶部は、上記記憶装置を用いて、複数のファイルを記憶し、
上記見出し語記憶部は、上記記憶装置を用いて、上記ファイル記憶部が記憶したファイルそれぞれについて、上記ファイルから抽出した見出し語を記憶し、
上記データ入力部は、データを入力し、
上記見出し語抽出部は、上記データ入力部が入力したデータから見出し語を抽出し、
上記検索部は、上記見出し語記憶部が記憶した見出し語のなかから、上記見出し語抽出部が抽出した見出し語と一致する見出し語を検索し、
上記類似度算出部は、上記検索部が検索した見出し語に基づいて、上記ファイル記憶部が記憶したファイルそれぞれについて、上記データ入力部が入力したデータとの類似度を算出する
ことを特徴とする。
The similarity search device according to the present invention is:
A storage device for storing data, a file storage unit, a headword storage unit, a data input unit, a headword extraction unit, a search unit, and a similarity calculation unit;
The file storage unit stores a plurality of files using the storage device,
The headword storage unit stores headwords extracted from the file for each file stored by the file storage unit using the storage device,
The data input unit inputs data,
The headword extraction unit extracts headwords from the data input by the data input unit,
The search unit searches for a headword that matches the headword extracted by the headword extraction unit from the headwords stored in the headword storage unit,
The similarity calculation unit calculates a similarity between each file stored in the file storage unit and data input by the data input unit based on an entry word searched by the search unit. .
この発明にかかる類似検索装置によれば、例えば、データ入力部が入力したデータとファイルとの類似度を算出するので、データを保存する適正な保管場所を提示することができる。 According to the similarity search device according to the present invention, for example, since the similarity between the data input by the data input unit and the file is calculated, an appropriate storage location for storing the data can be presented.
実施の形態1.
実施の形態1について、図1〜図11を用いて説明する。
The first embodiment will be described with reference to FIGS.
図1は、この実施の形態におけるファイル蓄積システム10の全体構成の一例を示す図である。
FIG. 1 is a diagram showing an example of the overall configuration of a
ファイル蓄積システム10は、例えば、ファイル編集装置11と、ファイル記憶装置12とを有する。
ファイル記憶装置12は、多数のファイルを記憶する。ファイルとは、ファイル記憶装置12が記憶した電子的なデータをオペレーティングシステム(OS)などが管理する単位である。
ファイル編集装置11は、利用者の操作にしたがって、ファイル記憶装置12が記憶したファイルを閲覧したり、編集したりするための装置である。また、ファイル編集装置11は、利用者の操作にしたがって、新たなデータを入力し、入力したデータを新たなファイルとして、ファイル記憶装置12に記憶させる。
The
The
The
図2は、この実施の形態におけるコンピュータ90のハードウェア資源の一例を示す図である。 FIG. 2 is a diagram illustrating an example of hardware resources of the computer 90 in this embodiment.
ファイル編集装置11やファイル記憶装置12は、例えば、コンピュータ90である。
コンピュータ90は、例えば、処理装置91と、入力装置92と、出力装置93と、記憶装置94とを有する。
The
The computer 90 includes, for example, a
記憶装置94は、処理装置91が実行するコンピュータプログラムや、処理装置91が処理するデータなどを記憶する。記憶装置94は、例えば、半導体メモリなどの内部記憶装置や、磁気ディスク装置や光学ディスク装置などの外部記憶装置である。
処理装置91は、記憶装置94が記憶したコンピュータプログラムを実行することにより、データを処理し、コンピュータ90全体を制御する。
入力装置92は、外部から情報を入力し、処理装置91が処理するデータに変換する。入力装置92が変換したデータは、処理装置91が直接処理する構成でもよいし、記憶装置94が一時的に記憶する構成でもよい。入力装置92は、例えば、キーボードやマウスなどの操作入力装置、マイクなどの音声入力装置、カメラやスキャナなどの画像入力装置、センサ、アナログデジタル変換装置、受信装置などである。
出力装置93は、処理装置91が処理したデータや記憶装置94が記憶したデータを変換して外部へ出力する。出力装置93は、例えば、スピーカなどの音声出力装置、画像表示装置、印刷装置、デジタルアナログ変換装置、送信装置などである。
The
The
The
The
ファイル記憶装置12などの機能ブロックは、例えば、処理装置91がコンピュータプログラムを実行することにより実現される。しかし、これらの機能ブロックは、他の電気的構成や機械的構成などによって実現されるものであってもよい。
また、ファイル記憶装置12などは、一台のコンピュータ90ではなく、複数のコンピュータ90によって構成されるものであってもよい。逆に、一台のコンピュータ90が、ファイル編集装置11とファイル記憶装置12との双方を構成するものであってもよい。
Functional blocks such as the
Further, the
図3は、この実施の形態におけるファイル記憶装置12の機能ブロックの構成の一例を示す図である。
FIG. 3 is a diagram showing an example of the functional block configuration of the
ファイル記憶装置12は、例えば、ファイル記憶部20と、指示入力部22と、データ入力部21と、ファイル出力部23と、見出し語抽出部24と、見出し語記憶部25と、検索部26と、類似度算出部27と、類似出力部28とを有する。
The
ファイル記憶部20は、記憶装置94を用いて、複数のファイルを記憶する。ファイル記憶部20が記憶したファイルは、例えば文書IDなどのファイル識別子によって識別される。また、利用者がファイルの内容を理解しやすいように、ファイル記憶部20が記憶したファイルには、利用者などが命名したファイル名がつけられている。また、利用者がファイルを分類整理するために、ファイル記憶部20が記憶したファイルは、利用者が指定したフォルダなどの保管場所に収められる。なお、保管場所は、記憶装置94の物理的な違いを反映したものであってもよいし、記憶装置94の物理的な違いとは無関係な論理的なものであってもよい。
The
データ入力部21は、ファイル編集装置11からデータを入力する。
The
指示入力部22は、入力装置92を用いて、ファイル編集装置11から利用者による指示を入力する。利用者による指示には、例えば、書込み指示、読出し指示、類似検索指示などがある。
書込み指示とは、データ入力部21が入力したデータをファイル記憶部20にファイルとして記憶させることを指示するものである。書込み指示は、例えば、ファイル記憶部20に記憶させるファイルのファイル名や保管場所を含む。
読出し指示とは、ファイル記憶部20が記憶したファイルの内容を出力することを指示するものである。読出し指示は、例えば、出力するファイルのファイル名や保管場所を含む。
類似検索指示とは、ファイル記憶部20が記憶したファイルのなかから、データ入力部21が入力したデータと類似した内容を持つファイルを探すことを指示するものである。
The
The write instruction is an instruction to store the data input by the
The read instruction is an instruction to output the contents of the file stored in the
The similarity search instruction is an instruction to search for a file having contents similar to the data input by the
ファイル出力部23は、出力装置93を用いて、ファイル記憶部20が記憶したファイルの内容を出力する。
The
見出し語抽出部24は、処理装置91を用いて、データ入力部21が入力したデータや、ファイル記憶部20が記憶したファイルの内容から、見出し語を抽出する。見出し語とは、そのデータやファイルの内容を表わすキーワードである。見出し語の抽出方式には、例えば、単語分割法やNグラム法などがある。
単語分割法とは、データを単語に分割して、見出し語とする方式である。例えば、見出し語抽出部24は、あらかじめ単語辞書を記憶しておき、単語辞書に登録された単語がデータのなかに現れる場合に、その単語を見出し語として抽出する。
Nグラム法とは、意味にかかわらず、決められた長さの文字列を切り出す方式である。例えば、見出し語抽出部24は、データの1文字目からN文字目までを第一の見出し語として抽出し、2文字目から(N+1)文字目までを第二の見出し語として抽出し、というように、1文字ずつシフトしながら見出し語を抽出する。
なお、見出し語抽出部24が見出し語を抽出する方式は、単語分割法やNグラム法に限らず、他の方式であってもよい。
The
The word division method is a method in which data is divided into words and used as a headword. For example, the
The N-gram method is a method of cutting out a character string of a predetermined length regardless of the meaning. For example, the
The method by which the
見出し語記憶部25は、記憶装置94を用いて、ファイル記憶部20が記憶したファイルから見出し語抽出部24が抽出した見出し語を、ファイルごとに記憶する。
The
検索部26は、処理装置91を用いて、見出し語記憶部25が記憶した見出し語のなかから、データ入力部21が入力したデータから見出し語抽出部24が抽出した見出し語と一致するものを検索する。
The
類似度算出部27は、処理装置91を用いて、検索部26が検索した見出し語に基づいて、データ入力部21が入力したデータと、ファイル記憶部20が記憶したそれぞれのファイルとの間の類似度を算出する。
例えば、類似度算出部27は、それぞれのファイルについて、そのファイルから抽出した見出し語のうち、データ入力部21が入力したデータから抽出した見出し語と一致する見出し語の数を数えて、類似度とする。この場合、類似度の値が大きいほど、データ入力部21が入力したデータとそのファイルの内容とが類似していることを表わす。
The
For example, for each file, the
類似出力部28は、処理装置91を用いて、類似度算出部27が算出した類似度に基づいて、ファイル記憶部20が記憶したファイルのなかから、データ入力部21が入力したデータと類似しているファイルを抽出する。類似出力部28は、出力装置93を用いて、抽出したファイルのファイル名や保管場所などの情報を出力する。
例えば、類似出力部28は、類似度算出部27が算出した類似度が高いほうから順に、所定の数のファイルを抽出する。
The
For example, the
図4は、この実施の形態におけるファイル情報D20の一例を示す図である。 FIG. 4 is a diagram showing an example of the file information D20 in this embodiment.
ファイル記憶部20は、例えば、ファイル情報D20を記憶している。ファイル情報D20は、例えば、複数のファイル識別子D21と、複数のファイル名D22と、複数の保管場所D23と、複数の内容データD24とを含む。一つのファイル識別子D21には、一つのファイル名D22、一つの保管場所D23、一つの内容データD24が対応づけられている。ファイル識別子D21は、ファイルを一意に識別する識別子である。ファイル名D22は、そのファイルの名称を表わす。保管場所D23は、そのファイルの保管場所を表わす。内容データD24は、そのファイルの内容を表わす。
The
図5は、この実施の形態における見出し語D40の一例を示す図である。 FIG. 5 is a diagram showing an example of the headword D40 in this embodiment.
この例は、見出し語抽出部24がNグラム法(N=2)によって見出し語を抽出する場合の例である。見出し語抽出部24は、例えば、内容データD24が「本日晴天なり。明日雨天なり。」であるファイルから、「本日」「日晴」「晴天」「天な」「なり」「り。」「。明」「明日」「日雨」「雨天」という10個の見出し語D40を抽出する。「天な」「なり」「り。」の3つは、内容データD24のなかに2回現れるが、この例において、見出し語抽出部24は、同じ見出し語を2回抽出せず、異なる見出し語だけを抽出する。なお、見出し語抽出部24は、同じ見出し語を複数回抽出する構成であってもよい。
In this example, the
図6は、この実施の形態におけるインデックス情報D50の一例を示す図である。 FIG. 6 is a diagram showing an example of the index information D50 in this embodiment.
見出し語記憶部25は、例えば、インデックス情報D50を記憶する。インデックス情報D50は、例えば、複数の見出し語D51と、複数のファイル識別子D52とを含む。一つの見出し語D51には、一つのファイル識別子D52が対応づけられている。見出し語D51は、見出し語抽出部24がファイルから抽出した見出し語である。ファイル識別子D52は、見出し語抽出部24が見出し語D51を抽出したファイルのファイル識別子である。
見出し語抽出部24は、通常、一つのファイルから複数の見出し語を抽出する。このため、ファイル識別子D52には、重複するものが含まれる。また、見出し語抽出部24が、異なるファイルから同じ見出し語を抽出する場合もある。このため、見出し語D51にも、重複するものが含まれる。
The
The
なお、見出し語抽出部24が一つのファイルから同じ見出し語を複数抽出する構成である場合、インデックス情報D50は、例えば、更に、ファイル識別子D52で識別されるファイルから見出し語抽出部24が見出し語D51を抽出した数を表わす抽出件数を含む構成であってもよい。
また、インデックス情報D50は、この例に示した構成に限らず、見出し語から、その見出し語が抽出された抽出元のファイルが検索可能な構成であればよい。例えば、インデックス情報D50は、見出し語D51が重複するものを一つにまとめ、ファイル識別子D52の代わりに、その見出し語が抽出されたファイルのファイル識別子のリストを含む構成であってもよい。
Note that when the
Further, the index information D50 is not limited to the configuration shown in this example, and any configuration may be used as long as the file from which the headword is extracted can be searched from the headword. For example, the index information D50 may be configured so that overlapping entries of the entry word D51 are combined into one, and a list of file identifiers of the file from which the entry word is extracted is included instead of the file identifier D52.
図7は、この実施の形態における類似度情報D70の一例を示す図である。 FIG. 7 is a diagram showing an example of the similarity information D70 in this embodiment.
類似度算出部27は、例えば、類似度情報D70を生成する。類似度情報D70は、例えば、複数のファイル識別子D71と、複数のヒット件数D72とを有する。一つのファイル識別子D71には、一つのヒット件数D72が対応づけられている。ファイル識別子D71は、データ入力部21が入力したデータと同じ見出し語が抽出されたファイルのファイル識別子である。ヒット件数D72は、データ入力部21が入力したデータから抽出された見出し語と、ファイル識別子D71で識別されるファイルから抽出された見出し語との間で、一致する見出し語の数を表わす。
データ入力部21が入力したデータのなかに同じ見出し語が複数回出現する場合や、一つのファイルのなかに同じ見出し語が複数回出現する場合でも、類似度算出部27は、ヒット件数1件として数える。
For example, the
Even when the same headword appears multiple times in the data input by the
なお、見出し語抽出部24が一つのファイルから同じ見出し語を複数抽出する構成である場合において、ある見出し語が、データ入力部21が入力したデータからa回抽出され、ファイル識別子D71で識別されるファイルからb回抽出されたとすると、類似度算出部27は、その一つの見出し語だけでヒット件数a×b件(あるいはb件)と数える構成であってもよい。これにより、出現回数の多い見出し語が共通している場合、類似度算出部27が算出する類似度が高くなる。
When the
図8は、この実施の形態における類似出力情報D80の一例を示す図である。 FIG. 8 is a diagram showing an example of the similar output information D80 in this embodiment.
類似出力部28は、例えば、類似出力情報D80を出力する。類似出力情報D80は、例えば、複数のファイル識別子D81と、複数のファイル名D82と、複数の保管場所D83と、複数のヒット件数D84とを含む。一つのファイル識別子D81には、一つのファイル名D82と、一つの保管場所D83と、一つのヒット件数D84とが対応づけられている。ファイル識別子D81は、データ入力部21が入力したデータと類似するファイルのファイル識別子である。ファイル名D82は、そのファイルのファイル名を表わす。保管場所D83は、そのファイルの保管場所を表わす。ヒット件数D84は、データ入力部21が入力したデータから抽出された見出し語と、ファイル識別子D71で識別されるファイルから抽出された見出し語との間で、一致する見出し語の数を表わす。
The
図9は、この実施の形態におけるファイル記憶装置12の処理の流れの一例を示すフロー図である。
FIG. 9 is a flowchart showing an example of the processing flow of the
ファイル記憶装置12は、例えば、指示入力工程S11と、書込み処理S12と、読出し処理S13と、類似検索処理S14とを実行する。
The
指示入力工程S11において、指示入力部22は、ファイル編集装置11から利用者による指示を入力する。
入力した指示が書込み指示である場合、指示入力部22は、書込み処理S12へ処理を進める。
入力した指示が読出し指示である場合、指示入力部22は、読出し処理S13へ処理を進める。
入力した指示が類似検索指示である場合、指示入力部22は、類似検索処理S14へ処理を進める。
In the instruction input step S <b> 11, the
If the input instruction is a write instruction, the
If the input instruction is a read instruction, the
If the input instruction is a similarity search instruction, the
書込み処理S12において、ファイル記憶装置12は、データ入力部21が入力したデータをファイル記憶部20に記憶する。書込み処理S12の詳細については、後述する。書込み処理S12の終了後、指示入力部22は、指示入力工程S11に処理を戻し、次の指示を待つ。
In the writing process S <b> 12, the
読出し処理S13において、ファイル記憶部20は、指示入力工程S11で指示入力部22が入力した読出し指示から、ファイル名と保管場所とを取得する。ファイル記憶部20は、記憶したファイル情報D20のなかから、取得したファイル名と一致するファイル名D22に対応づけられ、かつ、取得した保管場所と一致する保管場所D23に対応づけられたファイル識別子D21を抽出する。
条件を満たすファイル識別子D21が存在する場合、ファイル記憶部20は、抽出したファイル識別子D21に対応づけられた内容データD24を取得する。ファイル出力部23は、ファイル記憶部20が取得した内容データD24を、ファイル編集装置11に対して出力する。
条件を満たすファイル識別子D21が存在しない場合、ファイル出力部23は、ファイル編集装置11に対して、エラーを出力する。
指示入力部22は、指示入力工程S11に処理を戻し、次の指示を待つ。
In the read process S13, the
When there is a file identifier D21 that satisfies the condition, the
If the file identifier D21 that satisfies the condition does not exist, the
The
類似検索処理S14において、ファイル記憶部20は、ファイル記憶部20が記憶したファイルのなかから、データ入力部21が入力したデータと類似するファイルを探す。類似検索処理S14の詳細については、後述する。類似検索処理S14の終了後、指示入力部22は、指示入力工程S11に処理を戻し、次の指示を待つ。
In the similarity search process S <b> 14, the
図10は、この実施の形態における書込み処理S12の流れの一例を示すフロー図である。 FIG. 10 is a flowchart showing an example of the flow of the writing process S12 in this embodiment.
書込み処理S12は、例えば、上書き判定工程S21と、見出し語削除工程S22と、データ入力工程S23と、ファイル記憶工程S24と、見出し語抽出工程S25と、見出し語記憶工程S26とを有する。 The writing process S12 includes, for example, an overwrite determination step S21, a headword deletion step S22, a data input step S23, a file storage step S24, a headword extraction step S25, and a headword storage step S26.
上書き判定工程S21において、ファイル記憶部20は、指示入力工程S11で指示入力部22が入力した書込み指示から、ファイル名と保管場所とを取得する。ファイル記憶部20は、記憶したファイル情報D20のなかから、書込み指示から取得したファイル名と一致するファイル名D22に対応づけられ、かつ、書込み指示から取得した保管場所と一致する保管場所D23に対応づけられたファイル識別子D21を抽出する。
条件を満たすファイル識別子D21が存在する場合、そのファイルを上書きする。ファイル記憶部20は、抽出したファイル識別子D21に対応づけられた内容データD24を消去する。ファイル記憶部20は、見出し語削除工程S22へ処理を進める。
条件を満たすファイル識別子D21が存在しない場合、新しいファイルを作成する。ファイル記憶部20は、新たなファイル識別子を生成してファイル識別子D21として記憶する。ファイル記憶部20は、書込み指示から取得したファイル名を、そのファイル識別子D21に対応づけられたファイル名D22として記憶する。ファイル記憶部20は、書込み指示から取得した保管場所を、そのファイル識別子D21に対応づけられた保管場所D23として記憶する。ファイル記憶部20は、データ入力工程S23へ処理を進める。
In the overwrite determination step S21, the
If the file identifier D21 that satisfies the condition exists, the file is overwritten. The
If the file identifier D21 that satisfies the condition does not exist, a new file is created. The
見出し語削除工程S22において、見出し語記憶部25は、記憶したインデックス情報D50のなかから、上書き判定工程S21でファイル記憶部20が抽出したファイル識別子D21と一致するファイル識別子D52を抽出する。
条件を満たすファイル識別子D52が存在する場合、見出し語記憶部25は、抽出したファイル識別子D52と、それに対応づけられた見出し語D51とをすべて削除する。
In the headword deletion step S22, the
When there is a file identifier D52 that satisfies the condition, the
データ入力工程S23において、データ入力部21は、ファイル編集装置11からデータを入力する。データ入力部21は、データを一文字ずつ順に入力する。
データの最後に到達し、入力する文字がなくなった場合、データ入力部21は、書込み処理S12を終了する。
まだデータの最後に到達せず、一文字分のデータを入力した場合、データ入力部21は、ファイル記憶工程S24へ処理を進める。
In the data input step S <b> 23, the
When the end of the data is reached and there are no more characters to be input, the
If the end of the data has not yet been reached and data for one character has been input, the
ファイル記憶工程S24において、ファイル記憶部20は、データ入力工程S23で入力した一文字分のデータを、上書き判定工程S21で抽出あるいは生成したファイル識別子D21に対応づけられた内容データD24の最後に追加して記憶する。
In the file storage step S24, the
見出し語抽出工程S25において、見出し語抽出部24は、データ入力工程S23でデータ入力部21が入力した文字をN回分遡り、N文字からなる見出し語とする。ただし、Nは、1以上の整数である。
In the headword extraction step S25, the
見出し語記憶工程S26において、見出し語記憶部25は、記憶したインデックス情報D50のなかから、見出し語抽出工程S25で見出し語抽出部24が抽出した見出し語と一致する見出し語D51と、上書き判定工程S21でファイル記憶部20が抽出あるいは生成したファイル識別子D21と一致するファイル識別子D52とが対応づけられている組を抽出する。
条件を満たす見出し語D51とファイル識別子D52との組が存在する場合、その見出し語は、既に抽出済である。
条件を満たす見出し語D51とファイル識別子D52との組が存在しない場合、その見出し語は、未抽出である。見出し語記憶部25は、見出し語抽出工程S25で見出し語抽出部24が抽出した見出し語を、見出し語D51として記憶する。見出し語記憶部25は、上書き判定工程S21でファイル記憶部20が抽出あるいは生成したファイル識別子D21を、その見出し語D51に対応づけられたファイル識別子D52として記憶する。
データ入力部21は、データ入力工程S23に処理を戻し、次の文字を入力する。
In the headword storage step S26, the
When there is a set of a headword D51 and a file identifier D52 that satisfy the condition, the headword has already been extracted.
When there is no combination of the headword D51 and the file identifier D52 that satisfy the condition, the headword is not extracted. The
The
このように、ファイル記憶装置12は、新たなファイルを記憶する際、そのファイルから見出し語を抽出して、あらかじめインデックスを作成しておく。
As described above, when storing a new file, the
なお、データを入力しながらインデックスを作成するのではなく、まず、データを入力して記憶したのちに、インデックスを作成する構成であってもよい。 Instead of creating an index while inputting data, the index may be created after first inputting and storing the data.
図11は、この実施の形態における類似検索処理S14の流れの一例を示すフロー図である。 FIG. 11 is a flowchart showing an example of the flow of the similarity search process S14 in this embodiment.
類似検索処理S14は、例えば、初期化工程S40と、データ入力工程S41と、見出し語抽出工程S42と、見出し語検索工程S43と、ファイル選択工程S44と、一致計数工程S45と、並べ替え工程S50と、ファイル選択工程S51と、類似出力工程S52とを有する。 The similarity search processing S14 includes, for example, an initialization step S40, a data input step S41, a headword extraction step S42, a headword search step S43, a file selection step S44, a coincidence counting step S45, and a rearrangement step S50. And a file selection step S51 and a similar output step S52.
初期化工程S40において、見出し語抽出部24は、抽出済の見出し語のリストを初期化する。例えば、見出し語抽出部24は、抽出済の見出し語のリストとして空のリストを記憶する。
類似度算出部27は、類似度情報D70を初期化する。例えば、類似度算出部27は、記憶した類似度情報D70を削除する。
In the initialization step S40, the
The
データ入力工程S41において、データ入力部21は、ファイル編集装置11からデータを入力する。データ入力部21は、データを一文字ずつ順に入力する。
データの最後に到達し、入力する文字がなくなった場合、データ入力部21は、並べ替え工程S50へ処理を進める。
まだデータの最後に到達せず、一文字分のデータを入力した場合、データ入力部21は、見出し語抽出工程S42へ処理を進める。
In the data input step S <b> 41, the
When the end of the data is reached and there are no more characters to be input, the
If the end of the data has not been reached yet and one character's worth of data has been input, the
見出し語抽出工程S42において、見出し語抽出部24は、データ入力工程S41で入力した文字をN回分遡り、N文字からなる見出し語とする。ただし、Nは、1以上の整数である。
見出し語抽出部24は、抽出済の見出し語のリストのなかに、今回の見出し語が存在するか否かを判定する。
抽出済の見出し語のリストのなかに今回の見出し語が存在する場合、指示入力部22は、データ入力工程S41に処理を戻し、次の文字を入力する。
抽出済の見出し語のリストのなかに今回の見出し語が存在しない場合、見出し語抽出部24は、今回の見出し語を、抽出済の見出し語のリストに加えて記憶する。見出し語抽出部24は、見出し語検索工程S43へ処理を進める。
In the headword extraction step S42, the
The
If the current headword is present in the extracted headword list, the
If the current headword does not exist in the list of extracted headwords, the
見出し語検索工程S43において、検索部26は、見出し語記憶部25が記憶したインデックス情報D50のなかから、見出し語抽出工程S42で見出し語抽出部24が抽出した見出し語と一致する見出し語D51を抽出する。
条件を満たす見出し語D51が存在する場合、検索部26は、一致計数工程S45へ処理を進める。
条件を満たす見出し語D51が存在しない場合、データ入力部21は、データ入力工程S41に処理を戻し、次の文字を入力する。
In the headword search step S43, the
If there is a headword D51 that satisfies the condition, the
If there is no headword D51 that satisfies the condition, the
ファイル選択工程S44において、類似度算出部27は、見出し語検索工程S43で検索部26が抽出した見出し語D51に対応づけられたファイル識別子D52のなかから、まだ選択していないファイル識別子D52を一つ選択する。
検索部26が抽出した見出し語D51に対応づけられたファイル識別子D52がすべて選択済であり、まだ選択していないファイル識別子D52がない場合、データ入力部21は、データ入力工程S41に処理を戻し、次の文字を入力する。
検索部26が抽出した見出し語D51に対応づけられたファイル識別子D52のなかに、まだ選択していないファイル識別子D52がある場合、類似度算出部27は、まだ選択していないファイル識別子D52のなかから、ファイル識別子D52を一つ選択する。
In the file selection step S44, the
If all the file identifiers D52 associated with the headword D51 extracted by the
When there is a file identifier D52 that has not yet been selected among the file identifiers D52 that are associated with the headword D51 extracted by the
一致計数工程S45において、類似度算出部27は、記憶した類似度情報D70のなかから、ファイル選択工程S44で選択したファイル識別子D52と一致するファイル識別子D71を抽出する。
ファイル識別子D52と一致するファイル識別子D71が存在する場合、類似度算出部27は、そのファイル識別子D71に対応づけられたヒット件数D72に1を加える。
ファイル識別子D52と一致するファイル識別子D71が存在しない場合、類似度算出部27は、ファイル選択工程S44で選択したファイル識別子D52をファイル識別子D71として記憶する。類似度算出部27は、そのファイル識別子D71に対応付けられたヒット件数D72として1を記憶する。
類似度算出部27は、ファイル選択工程S44に処理を戻し、次のファイル識別子D52を選択する。
In the coincidence counting step S45, the
When there is a file identifier D71 that matches the file identifier D52, the
When there is no file identifier D71 that matches the file identifier D52, the
The
並べ替え工程S50において、類似出力部28は、類似度算出部27が記憶した類似度情報D70を、ヒット件数D72が大きい順に並べ替える。
In the rearrangement step S50, the
ファイル選択工程S51において、類似出力部28は、並べ替え工程S50で並べ替えた類似度情報D70のなかから、まだ選択していないファイル識別子D71を選択する。
すべてのファイル識別子D71が選択済であり、まだ選択していないファイル識別子D71がない場合や、選択済のファイル識別子D71の数が所定の数に達した場合、類似出力部28は、類似検索処理S14を終了する。
まだ選択していないファイル識別子D71があり、選択済のファイル識別子D71の数がまだ所定の数に達していない場合、類似出力部28は、まだ選択していないファイル識別子D71のなかから、対応づけられたヒット件数D72が最大であるファイル識別子D71を選択する。
In the file selection step S51, the
When all the file identifiers D71 have been selected and there is no file identifier D71 that has not yet been selected, or when the number of selected file identifiers D71 reaches a predetermined number, the
If there is a file identifier D71 that has not yet been selected, and the number of selected file identifiers D71 has not yet reached a predetermined number, the
類似出力工程S52において、類似出力部28は、ファイル記憶部20が記憶したファイル情報D20のなかから、ファイル選択工程S51で選択したファイル識別子D71と一致するファイル識別子D21に対応づけられたファイル名D22及び保管場所D23を取得する。類似出力部28は、ファイル選択工程S51で選択したファイル識別子D71をファイル識別子D81として出力する。類似出力部28は、ファイル情報D20から取得したファイル名D22を、ファイル識別子D81に対応づけられたファイル名D82として出力する。類似出力部28は、ファイル情報D20から取得した保管場所D23を、ファイル識別子D81に対応づけられた保管場所D83として出力する。類似出力部28は、ファイル選択工程S51で選択したファイル識別子D71に対応づけられたヒット件数D72を、ファイル識別子D81に対応づけられたヒット件数D84として出力する。
類似出力部28は、ファイル選択工程S51に処理を戻し、次のファイル識別子D71を選択する。
In the similar output step S52, the
The
このように、一致する見出し語の数が多いファイルを、類似したファイルとして判定する。あらかじめインデックスを作成してあるので、ファイル記憶部20が記憶しているファイルの数が多い場合でも、類似したファイルを素早く見つけることができる。
As described above, a file having a large number of matching headwords is determined as a similar file. Since an index is created in advance, a similar file can be quickly found even if the number of files stored in the
なお、データを入力しながら検索するのではなく、まず、データを入力して一時的に記憶したのちに、検索をする構成であってもよい。 Instead of searching while inputting data, a configuration may be used in which searching is performed after data is first input and temporarily stored.
以上のように、ファイルを保管する際に、見出し語を抽出する。保管するファイルの見出し語を既存のインデックス(インデックス情報D50)と付け合せ、ビット件数を文書ID(ファイル識別子)別に集計する。既存のファイル情報D20からファイル名、保管場所などの情報を付加して、出力する。これにより、類似したファイルを取得でき、参照したり流用したりすることができる。 As described above, the headword is extracted when the file is stored. The headword of the file to be stored is added to the existing index (index information D50), and the number of bits is totaled by document ID (file identifier). Information such as the file name and storage location is added from the existing file information D20 and output. Thereby, a similar file can be acquired, and can be referred to and used.
実施の形態2.
実施の形態2について、図12〜図17を用いて説明する。
なお、実施の形態1と共通する部分については、同一の符号を付し、説明を省略する。
Embodiment 2. FIG.
The second embodiment will be described with reference to FIGS.
In addition, about the part which is common in
この実施の形態では、類似度算出部27が算出する類似度の別の例について説明する。
In this embodiment, another example of the similarity calculated by the
図12は、この実施の形態におけるファイル記憶装置12の機能ブロックの構成の一例を示す図である。
FIG. 12 is a diagram showing an example of the functional block configuration of the
見出し語記憶部25は、記憶装置94を用いて、見出し語抽出部24が抽出した見出し語に加えて、更に、見出し語抽出部24がそれぞれのファイルから抽出した見出し語の数を、ファイルごとに記憶する。
In addition to the headword extracted by the
類似度算出部27は、処理装置91を用いて、それぞれのファイルについて、そのファイルから抽出した見出し語のうち、データ入力部21が入力したデータから抽出した見出し語と一致する見出し語の割合を、類似度とする。例えば、類似度算出部27は、実施の形態1で説明した類似度を算出し、算出した類似度を、見出し語記憶部25がそのファイルについて記憶した見出し語の数で割った商を算出して、この実施の形態における類似度とする。
The
図13は、この実施の形態における見出し語数情報D60の一例を示す図である。 FIG. 13 is a diagram showing an example of headword number information D60 in this embodiment.
見出し語記憶部25は、例えば、見出し語数情報D60を記憶する。見出し語数情報D60は、例えば、複数のファイル識別子D61と、複数の総見出し語数D62とを含む。一つのファイル識別子D61には、一つの総見出し語数D62が対応づけられている。ファイル識別子D61は、ファイル記憶部20が記憶したファイルのファイル識別子である。総見出し語数D62は、そのファイルから見出し語抽出部24が抽出した見出し語の総数を表わす。
The
図14は、この実施の形態における類似度情報D70の一例を示す図である。 FIG. 14 is a diagram showing an example of the similarity information D70 in this embodiment.
類似度情報D70は、実施の形態1で説明したデータに加えて、更に、複数のヒット割合D73を含む。一つのファイル識別子D71には、一つのヒット割合D73が対応づけられている。ヒット割合D73は、対応づけられたファイル識別子D71で識別されるファイルから見出し語抽出部24が抽出した見出し語のうち、データ入力部21が入力したデータから見出し語抽出部24が抽出した見出し語と一致する見出し語の割合を表わす。
The similarity information D70 further includes a plurality of hit ratios D73 in addition to the data described in the first embodiment. One hit ratio D73 is associated with one file identifier D71. The hit ratio D73 is the headword extracted by the
図15は、この実施の形態における類似出力情報D80の一例を示す図である。 FIG. 15 is a diagram showing an example of similar output information D80 in this embodiment.
類似出力情報D80は、実施の形態1で説明したデータに加えて、更に、複数のヒット割合D85を含む。一つのファイル識別子D81には、一つのヒット割合D85が対応づけられている。ヒット割合D85は、対応づけられたファイル識別子D71で識別されるファイルから見出し語抽出部24が抽出した見出し語のうち、データ入力部21が入力したデータから見出し語抽出部24が抽出した見出し語と一致する見出し語の割合を表わす。
The similar output information D80 further includes a plurality of hit ratios D85 in addition to the data described in the first embodiment. One hit ratio D85 is associated with one file identifier D81. The hit ratio D85 is the headword extracted by the
図16は、この実施の形態における書込み処理S12の流れの一例を示すフロー図である。 FIG. 16 is a flowchart showing an example of the flow of the writing process S12 in this embodiment.
書込み処理S12は、実施の形態1で説明した工程に加えて、更に、見出し語計数工程S27と、見出し語数記憶工程S28とを有する。 In addition to the steps described in the first embodiment, the writing process S12 further includes a headword counting step S27 and a headword number storage step S28.
見出し語記憶工程S26において、見出し語が抽出済である場合、データ入力部21は、データ入力工程S23に戻り、次の文字を入力する。
見出し語が未抽出である場合、見出し語記憶部25は、見出し語計数工程S27へ処理を進める。
If the headword has been extracted in the headword storage step S26, the
When the headword has not been extracted, the
見出し語計数工程S27において、見出し語記憶部25は、総見出し語数に1を加える。
データ入力部21は、データ入力工程S23に戻り、次の文字を入力する。
In the headword counting step S27, the
The
データ入力工程S23において、データの最後に到達した場合、データ入力部21は、見出し語数記憶工程S28へ処理を進める。
In the data input step S23, when the end of the data is reached, the
見出し語数記憶工程S28において、見出し語記憶部25は、上書き判定工程S21で抽出あるいは生成したファイル識別子D21を、ファイル識別子D61として記憶する。見出し語記憶部25は、算出した総見出し語数を、そのファイル識別子D61に対応づけられた総見出し語数D62として記憶する。
In the headword number storage step S28, the
このように、インデックス作成時に、あらかじめ総見出し語数を算出しておく。 Thus, the total number of headwords is calculated in advance when creating an index.
図17は、この実施の形態における類似検索処理S14の流れの一例を示すフロー図である。 FIG. 17 is a flowchart showing an example of the flow of the similarity search process S14 in this embodiment.
類似検索処理S14は、実施の形態1で説明した工程に加えて、更に、ファイル選択工程S46と、割合算出工程S47とを有する。 The similarity search process S14 further includes a file selection process S46 and a ratio calculation process S47 in addition to the processes described in the first embodiment.
データ入力工程S41において、データの最後に到達した場合、データ入力部21は、ファイル選択工程S46へ処理を進める。
In the data input step S41, when the end of the data is reached, the
ファイル選択工程S46において、類似度算出部27は、記憶した類似度情報D70のなかから、まだ選択していないファイル識別子D71を一つ選択する。
すべてのファイル識別子D71が選択済であり、まだ選択していないファイル識別子D71がない場合、類似度算出部27は、並べ替え工程S50へ処理を進める。
まだ選択していないファイル識別子D71がある場合、類似度算出部27は、まだ選択していないファイル識別子D71のなかから、ファイル識別子D71を一つ選択して、割合算出工程S47へ処理を進める。
In the file selection step S46, the
When all the file identifiers D71 have been selected and there is no file identifier D71 that has not yet been selected, the
When there is a file identifier D71 that has not been selected, the
割合算出工程S47において、類似度算出部27は、見出し語記憶部25が記憶した見出し語数情報D60のなかから、ファイル選択工程S46で選択したファイル識別子D71と一致するファイル識別子D61を抽出する。類似度算出部27は、見出し語数情報D60から抽出したファイル識別子D61に対応づけられた総見出し語数D62を取得する。類似度算出部27は、ファイル選択工程S46で選択したファイル識別子D71に対応づけられたヒット件数D72を、見出し語数情報D60から取得した総見出し語数D62で割った商を算出する。類似度算出部27は、ファイル選択工程S46で選択したファイル識別子D71に対応づけられたヒット割合D73として、算出した商を記憶する。
類似度算出部27は、ファイル選択工程S46に処理を戻し、次のファイル識別子D71を選択する。
In the ratio calculation step S47, the
The
このように、ヒット件数をそのまま類似度とするのではなく、ヒット件数を総見出し語数で割った商を類似度とする。一つのファイルから見出し語抽出部24が抽出した見出し語の数が多いほうが、ヒット件数が多くなる傾向がある。ヒット割合を類似度とすることにより、一つのファイルから見出し語抽出部24が抽出した見出し語の数の多少に左右されることなく、類似したファイルを見つけることができる。
また、あらかじめ総見出し語数を算出してあるので、ファイル記憶部20が記憶しているファイルの数が多い場合でも、類似したファイルを素早く見つけることができる。
In this way, the number of hits is not directly used as the similarity, but the quotient obtained by dividing the number of hits by the total number of headwords is used as the similarity. As the number of headwords extracted by the
In addition, since the total number of headwords is calculated in advance, a similar file can be quickly found even when the number of files stored in the
実施の形態3.
実施の形態3について、図18〜図21を用いて説明する。
なお、実施の形態1または実施の形態2と共通する部分については、同一の符号を付し、説明を省略する。
Embodiment 3 FIG.
The third embodiment will be described with reference to FIGS.
Note that portions common to
この実施の形態では、類似度に基づいて、データをファイルとして記憶する保管場所の候補を抽出する構成について説明する。 In this embodiment, a configuration for extracting a storage location candidate for storing data as a file based on the similarity will be described.
図18は、この実施の形態におけるファイル記憶装置12の機能ブロックの構成の一例を示す図である。
FIG. 18 is a diagram showing an example of the functional block configuration of the
ファイル記憶装置12は、実施の形態2で説明した構成に加えて、更に、適合度算出部29と、保管場所候補抽出部30とを有する。
In addition to the configuration described in the second embodiment, the
適合度算出部29は、処理装置91を用いて、類似度算出部27が算出した類似度に基づいて、データ入力部21が入力したデータを記憶する保管場所として適している度合いを表わす適合度を、ファイル記憶部20がファイルを記憶している保管場所ごとに算出する。
適合度算出部29は、例えば、それぞれの保管場所について、その保管場所に記憶されているすべてのファイルについて類似度算出部27が算出した類似度を合計して、その保管場所の適合度とする。
The fitness
For example, for each storage location, the
保管場所候補抽出部30は、処理装置91を用いて、適合度算出部29が算出した適合度に基づいて、ファイル記憶部20がファイルを記憶している保管場所のなかから、データ入力部21が入力したデータを記憶する保管場所の候補を抽出する。保管場所候補抽出部30は、出力装置93を用いて、抽出した保管場所の候補を出力する。
例えば、保管場所候補抽出部30は、適合度算出部29が算出した適合度が高いほうから順に、所定の数の保管場所を、保管場所の候補として抽出する。
The storage location
For example, the storage location
図19は、この実施の形態における適合度情報D90の一例を示す図である。 FIG. 19 is a diagram showing an example of the fitness information D90 in this embodiment.
適合度算出部29は、例えば、適合度情報D90を生成する。適合度情報D90は、例えば、複数の保管場所D91と、複数の適合度D92とを含む。一つの保管場所D91には、一つの適合度D92が対応づけられている。保管場所D91は、ファイル記憶部20がファイルを記憶している保管場所を表わす。適合度D92は、対応づけられた保管場所D91について適合度算出部29が算出した適合度を表わす。
The fitness
図20は、この実施の形態におけるファイル記憶装置12の処理の流れの一例を示すフロー図である。
FIG. 20 is a flowchart showing an example of the processing flow of the
ファイル記憶装置12は、実施の形態1で説明した処理に加えて、更に、場所検索処理S15を実行する。
In addition to the processing described in the first embodiment, the
指示入力工程S11において、指示入力部22が入力した指示が場所検索指示である場合、指示入力部22は、場所検索処理S15へ処理を進める。
場所検索指示とは、データ入力部21が入力したデータを保管すべき保管場所の候補の検索を指示するものである。
In the instruction input step S11, when the instruction input by the
The location search instruction is an instruction to search for a candidate for a storage location where the data input by the
図21は、この実施の形態における場所検索処理S15の流れの一例を示すフロー図である。 FIG. 21 is a flowchart showing an example of the flow of the location search processing S15 in this embodiment.
場所検索処理S15は、例えば、初期化工程S40と、データ入力工程S41と、見出し語抽出工程S42と、見出し語検索工程S43と、ファイル選択工程S44と、一致計数工程S45と、ファイル選択工程S46と、割合算出工程S47と、集計工程S48と、並べ替え工程S50と、場所選択工程S53と、場所出力工程S54とを有する。このうち、実施の形態2で説明した類似検索処理S14と共通する符号を付した工程は、類似検索処理S14の工程と同様である。 The location search process S15 includes, for example, an initialization step S40, a data input step S41, a headword extraction step S42, a headword search step S43, a file selection step S44, a coincidence counting step S45, and a file selection step S46. And a ratio calculation step S47, a tabulation step S48, a rearrangement step S50, a location selection step S53, and a location output step S54. Of these steps, the steps denoted by the same reference numerals as those of the similar search processing S14 described in the second embodiment are the same as the steps of the similar search processing S14.
割合算出工程S47が終了したのち、類似度算出部27は、集計工程S48へ処理を進める。
After the ratio calculation step S47 is completed, the
集計工程S48において、適合度算出部29は、ファイル記憶部20が記憶したファイル情報D20のなかから、ファイル選択工程S46で類似度算出部27が選択したファイル識別子D71と一致するファイル識別子D21を抽出する。適合度算出部29は、抽出したファイル識別子D21に対応づけられた保管場所D23を取得する。
適合度算出部29は、記憶した適合度情報D90のなかから、取得した保管場所D23と一致する保管場所D91を抽出する。
条件を満たす保管場所D91が存在する場合、適合度算出部29は、抽出した保管場所D91に対応づけられた適合度D92に、割合算出工程S47で類似度算出部27が算出した類似度を加える。
条件を満たす保管場所D91が存在しない場合、適合度算出部29は、ファイル記憶部20から取得した保管場所D23を保管場所D91として記憶する。適合度算出部29は、割合算出工程S47で類似度算出部27が算出した類似度を、その保管場所D91に対応づけられた適合度D92として記憶する。
類似度算出部27は、ファイル選択工程S46に処理を戻し、次のファイル識別子D71を選択する。
In the counting step S48, the fitness
The fitness
When there is a storage location D91 that satisfies the condition, the
When there is no storage location D91 that satisfies the condition, the fitness
The
並べ替え工程S50において、保管場所候補抽出部30は、適合度算出部29が記憶した適合度情報D90を、適合度D92が大きい順に並べ替える。
In the rearrangement step S50, the storage location
場所選択工程S53において、保管場所候補抽出部30は、並べ替え工程S50で並べ替えた適合度情報D90のなかから、まだ選択していない保管場所D91を選択する。
すべての保管場所D91が選択済であり、まだ選択していない保管場所D91がない場合や、選択済の保管場所D91の数が所定の数に達した場合、保管場所候補抽出部30は、場所検索処理S15を終了する。
まだ選択していない保管場所D91があり、選択済の保管場所D91の数がまだ所定の数に達していない場合、保管場所候補抽出部30は、まだ選択していない保管場所D91のなかから、対応づけられた適合度D92が最大である保管場所D91を選択する。
In the location selection step S53, the storage location
When all the storage locations D91 have been selected and there is no storage location D91 that has not yet been selected, or when the number of selected storage locations D91 reaches a predetermined number, the storage location
If there is a storage location D91 that has not yet been selected, and the number of selected storage locations D91 has not yet reached the predetermined number, the storage location
場所出力工程S54において、保管場所候補抽出部30は、場所選択工程S53で選択した保管場所D91と、その保管場所D91に対応づけられた適合度D92とを出力する。
保管場所候補抽出部30は、場所選択工程S53に処理を戻し、次の保管場所D91を選択する。
In the location output step S54, the storage location
The storage location
このように、ある保管場所に記憶されているファイルについて算出した類似度に基づいて、その保管場所の適合度を算出するので、類似するファイルを多く含む保管場所が、データを保管する保管場所の候補として抽出される。類似するファイルを多く含む保管場所を、データを保管する保管場所の候補として抽出するので、そのデータの内容に相応しい保管場所の候補を提示することができる。 As described above, the suitability of the storage location is calculated based on the similarity calculated for the file stored in a certain storage location. Therefore, the storage location that contains many similar files is the storage location that stores the data. Extracted as a candidate. Since a storage location containing many similar files is extracted as a storage location candidate for storing data, a storage location candidate suitable for the contents of the data can be presented.
なお、適合度算出部29は、それぞれの保管場所について、その保管場所に記憶されているすべてのファイルについて類似度算出部27が算出した類似度を平均して、その保管場所の適合度とする構成であってもよい。
The degree-of-
また、類似度算出部27は、ヒット割合ではなく、ヒット件数を類似度とする構成であってもよい。
Further, the
なお、同じ保管場所には、近い関係にあるファイルであると利用者が判断したファイルが置かれる場合が多い。このため、一致する見出し語の数が少ないファイルであっても、同じ保管場所に類似度の高いファイルが多く記憶されている場合、そのファイルも、何らかの関係を有するファイルである可能性が高い。したがって、場所検索指示に対して保管場所候補抽出部30が出力した保管場所は、利用者がデータを保管する保管場所を決めるためだけでなく、近い関係にあるファイルを探したいときにも利用できる。
In many cases, files that the user has determined to be closely related files are placed in the same storage location. For this reason, even if the number of matching headwords is small, if many files with high similarity are stored in the same storage location, it is highly likely that the file is also a file having some relationship. Therefore, the storage location output by the storage location
また、類似検索指示に対して、類似出力部28は、類似度算出部27が算出した類似度が低いファイルであっても、適合度算出部29が算出した適合度が高い保管場所に記憶されているファイルを、データ入力部21が入力したデータに類似するファイルとして出力する構成であってもよい。例えば、類似出力部28は、適合度算出部29が算出した適合度に所定の係数(例えば、0.1)を乗じた積と、類似度算出部27が算出した類似度との和を算出し、算出した和が大きい順に、ファイルを出力する。
これにより、類似度が低くても近い関係にあるファイルを見つけることができる。
Further, in response to the similarity search instruction, the
This makes it possible to find files that are close to each other even if the degree of similarity is low.
以上、各実施の形態で説明した構成は、一例であり、他の構成であってもよい。例えば、異なる実施の形態で説明した構成を組み合わせた構成であってもよいし、本質的でない部分の構成を、他の構成で置き換えた構成であってもよい。 As described above, the configuration described in each embodiment is an example, and another configuration may be used. For example, the structure which combined the structure demonstrated in different embodiment may be sufficient, and the structure which replaced the structure of the non-essential part with the other structure may be sufficient.
以上説明した類似検索装置(ファイル記憶装置12)は、データを記憶する記憶装置(94)と、ファイル記憶部(20)と、見出し語記憶部(25)と、データ入力部(21)と、見出し語抽出部(24)と、検索部(26)と、類似度算出部(27)とを有する。
上記ファイル記憶部は、上記記憶装置を用いて、複数のファイルを記憶する。
上記見出し語記憶部は、上記記憶装置を用いて、上記ファイル記憶部が記憶したファイルそれぞれについて、上記ファイルから抽出した見出し語を記憶する。
上記データ入力部は、データを入力する。
上記見出し語抽出部は、上記データ入力部が入力したデータから見出し語を抽出する。
上記検索部は、上記インデックス記憶部が記憶した見出し語のなかから、上記見出し語抽出部が抽出した見出し語と一致する見出し語を検索する。
上記類似度算出部は、上記検索部が抽出した見出し語に基づいて、上記ファイル記憶部が記憶したファイルそれぞれについて、上記データ入力部が入力したデータとの類似度を算出する。
The similarity search device (file storage device 12) described above includes a storage device (94) for storing data, a file storage unit (20), a headword storage unit (25), a data input unit (21), The headword extraction unit (24), the search unit (26), and the similarity calculation unit (27) are included.
The file storage unit stores a plurality of files using the storage device.
The headword storage unit stores headwords extracted from the file for each file stored in the file storage unit using the storage device.
The data input unit inputs data.
The headword extraction unit extracts headwords from the data input by the data input unit.
The search unit searches for a headword that matches the headword extracted by the headword extraction unit from the headwords stored in the index storage unit.
The similarity calculation unit calculates the similarity between each file stored in the file storage unit and the data input by the data input unit, based on the headword extracted by the search unit.
データ入力部が入力したデータとファイルとの類似度を算出するので、データを保存する適正な保管場所を提示することができる。 Since the similarity between the data input by the data input unit and the file is calculated, an appropriate storage location for storing the data can be presented.
上記類似検索装置(12)は、更に、適合度算出部(29)と、保管場所候補抽出部(30)とを有する。
上記ファイル記憶部(20)は、上記複数のファイルそれぞれを、複数の保管場所のいずれかに記憶する。
上記適合度算出部は、上記複数の保管場所それぞれについて、上記ファイル記憶部が上記保管場所に記憶したファイルについて上記類似度算出部(27)が算出した類似度に基づいて、上記データ入力部が入力したデータに対する上記保管場所の適合度を算出する。
上記保管場所候補抽出部は、上記保管場所適合度算出部が算出した適合度に基づいて、上記複数の保管場所のなかから、上記データ入力部(21)が入力したデータの保管場所の候補を抽出する。
The similarity search device (12) further includes a fitness calculation unit (29) and a storage location candidate extraction unit (30).
The file storage unit (20) stores each of the plurality of files in any of a plurality of storage locations.
For each of the plurality of storage locations, the fitness calculation unit is configured so that the data input unit determines whether the file storage unit stores the file stored in the storage location based on the similarity calculated by the similarity calculation unit (27). Calculate the suitability of the storage location for the entered data.
The storage location candidate extraction unit selects a storage location candidate of the data input by the data input unit (21) from the plurality of storage locations based on the fitness calculated by the storage location fitness calculation unit. Extract.
類似度に基づいて適合度を算出するので、データを保存する適正な保管場所を提示することができる。 Since the fitness is calculated based on the similarity, an appropriate storage location for storing data can be presented.
上記適合度算出部(29)は、上記保管場所に記憶されたファイルについて上記類似度算出部(27)が算出した類似度の合計または平均を算出して、上記保管場所の適合度とする。 The fitness level calculation unit (29) calculates the total or average of the similarities calculated by the similarity level calculation unit (27) for the files stored in the storage location to obtain the fitness level of the storage location.
類似度の合計または平均を適合度とするので、データを保存する適正な保管場所を提示することができる。 Since the relevance is the sum or average of the similarities, an appropriate storage location for storing data can be presented.
上記類似度算出部(27)は、上記ファイル記憶部(20)が記憶したファイルから抽出した見出し語のうち、上記データ入力部(21)が入力したデータから上記見出し語抽出部(24)が抽出した見出し語と一致する見出し語の数または割合を算出して、上記ファイルと上記データとの類似度とする。 The similarity calculation unit (27) is configured so that the headword extraction unit (24) uses the data input by the data input unit (21) among the headwords extracted from the file stored in the file storage unit (20). The number or ratio of headwords that match the extracted headwords is calculated and used as the similarity between the file and the data.
一致する見出し語の数または割合を類似度とするので、データを保存する適正な保管場所を提示することができる。 Since the number or ratio of matching headwords is the similarity, an appropriate storage location for storing data can be presented.
10 ファイル蓄積システム、11 ファイル編集装置、12 ファイル記憶装置、20 ファイル記憶部、21 データ入力部、22 指示入力部、23 ファイル出力部、24 見出し語抽出部、25 見出し語記憶部、26 検索部、27 類似度算出部、28 類似出力部、29 適合度算出部、30 保管場所候補抽出部、90 コンピュータ、91 処理装置、92 入力装置、93 出力装置、94 記憶装置、D20 ファイル情報、D21,D52,D61,D71,D81 ファイル識別子、D22,D82 ファイル名、D23,D83,D91 保管場所、D24 内容データ、D40,D51 見出し語、D50 インデックス情報、D60 見出し語数情報、D62 総見出し語数、D70 類似度情報、D72,D84 ヒット件数、D73,D85 ヒット割合、D80 類似出力情報、D90 適合度情報、D92 適合度、S11 指示入力工程、S12 書込み処理、S13 読出し処理、S14 類似検索処理、S15 場所検索処理、S21 上書き判定工程、S22 見出し語削除工程、S23,S41 データ入力工程、S24 ファイル記憶工程、S25,S42 見出し語抽出工程、S26 見出し語記憶工程、S27 見出し語計数工程、S28 見出し語数記憶工程、S40 初期化工程、S43 見出し語検索工程、S44,S46,S51 ファイル選択工程、S45 一致計数工程、S47 割合算出工程、S48 集計工程、S50 並べ替え工程、S52 類似出力工程、S53 場所選択工程、S54 場所出力工程。 10 file storage system, 11 file editing device, 12 file storage device, 20 file storage unit, 21 data input unit, 22 instruction input unit, 23 file output unit, 24 headword extraction unit, 25 headword storage unit, 26 search unit , 27 Similarity calculation unit, 28 Similar output unit, 29 Conformity calculation unit, 30 Storage location candidate extraction unit, 90 Computer, 91 Processing device, 92 Input device, 93 Output device, 94 Storage device, D20 File information, D21, D52, D61, D71, D81 File identifier, D22, D82 File name, D23, D83, D91 Storage location, D24 Content data, D40, D51 Headword, D50 Index information, D60 Headword number information, D62 Total headword number, D70 Similar Degree information, D72, D84 hits , D73, D85 hit ratio, D80 similarity output information, D90 fitness information, D92 fitness, S11 instruction input process, S12 write process, S13 read process, S14 location search process, S15 location search process, S21 overwrite determination process, S22 Headword deletion step, S23, S41 Data input step, S24 File storage step, S25, S42 Headword extraction step, S26 Headword storage step, S27 Headword count step, S28 Headword count storage step, S40 Initialization step, S43 Heading Word search step, S44, S46, S51 File selection step, S45 coincidence counting step, S47 ratio calculation step, S48 tabulation step, S50 rearrangement step, S52 similar output step, S53 place selection step, S54 place output step.
Claims (7)
上記ファイル記憶部は、上記記憶装置を用いて、複数のファイルを記憶し、
上記見出し語記憶部は、上記記憶装置を用いて、上記ファイル記憶部が記憶したファイルそれぞれについて、上記ファイルから抽出した見出し語を記憶し、
上記データ入力部は、データを入力し、
上記見出し語抽出部は、上記データ入力部が入力したデータから見出し語を抽出し、
上記検索部は、上記見出し語記憶部が記憶した見出し語のなかから、上記見出し語抽出部が抽出した見出し語と一致する見出し語を検索し、
上記類似度算出部は、上記検索部が検索した見出し語に基づいて、上記ファイル記憶部が記憶したファイルそれぞれについて、上記データ入力部が入力したデータとの類似度を算出する
ことを特徴とする類似検索装置。 A storage device for storing data, a file storage unit, a headword storage unit, a data input unit, a headword extraction unit, a search unit, and a similarity calculation unit;
The file storage unit stores a plurality of files using the storage device,
The headword storage unit stores headwords extracted from the file for each file stored by the file storage unit using the storage device,
The data input unit inputs data,
The headword extraction unit extracts headwords from the data input by the data input unit,
The search unit searches for a headword that matches the headword extracted by the headword extraction unit from the headwords stored in the headword storage unit,
The similarity calculation unit calculates a similarity between each file stored in the file storage unit and data input by the data input unit based on an entry word searched by the search unit. Similarity search device.
上記ファイル記憶部は、上記複数のファイルそれぞれを、複数の保管場所のいずれかに記憶し、
上記適合度算出部は、上記複数の保管場所それぞれについて、上記ファイル記憶部が上記保管場所に記憶したファイルについて上記類似度算出部が算出した類似度に基づいて、上記データ入力部が入力したデータに対する上記保管場所の適合度を算出し、
上記保管場所候補抽出部は、上記保管場所適合度算出部が算出した適合度に基づいて、上記複数の保管場所のなかから、上記データ入力部が入力したデータの保管場所の候補を抽出する
ことを特徴とする請求項1に記載の類似検索装置。 The similarity search device further includes a fitness calculation unit and a storage location candidate extraction unit,
The file storage unit stores each of the plurality of files in any of a plurality of storage locations,
For each of the plurality of storage locations, the fitness calculation unit is configured to receive data input by the data input unit based on the similarity calculated by the similarity calculation unit for the files stored in the storage location by the file storage unit. Calculate the suitability of the above storage location for
The storage location candidate extraction unit extracts a storage location candidate for the data input by the data input unit from the plurality of storage locations based on the fitness calculated by the storage location suitability calculation unit. The similarity search apparatus according to claim 1.
上記類似ファイル抽出部は、上記類似度算出部が算出した類似度に基づいて、上記複数のファイルのなかから、上記データ入力部が入力したデータと類似したファイルを抽出する
ことを特徴とする請求項1乃至請求項3のいずれかに記載の類似検索装置。 The similar search device further includes a similar file extraction unit,
The similar file extraction unit extracts a file similar to the data input by the data input unit from the plurality of files based on the similarity calculated by the similarity calculation unit. The similarity search device according to any one of claims 1 to 3.
上記記憶装置が、記憶したファイルそれぞれについて、上記ファイルから抽出した見出し語を記憶し、
入力装置が、データを入力し、
処理装置が、入力装置が入力したデータから見出し語を抽出し、
処理装置が、記憶装置が記憶した見出し語のなかから、抽出した見出し語と一致する見出し語を検索し、
処理装置が、検索した見出し語に基づいて、記憶装置が記憶したファイルそれぞれについて、入力装置が入力したデータとの類似度を算出する
ことを特徴とする類似検索方法。 A storage device stores a plurality of files,
The storage device stores the headword extracted from the file for each stored file,
The input device inputs the data,
The processing device extracts headwords from the data input by the input device,
The processing device searches for a headword that matches the extracted headword from the headwords stored in the storage device,
A similarity search method, wherein the processing device calculates a similarity between each file stored in the storage device and data input by the input device based on the searched entry word.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012061609A JP2013196264A (en) | 2012-03-19 | 2012-03-19 | Similarity search device and computer program and similarity search method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012061609A JP2013196264A (en) | 2012-03-19 | 2012-03-19 | Similarity search device and computer program and similarity search method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013196264A true JP2013196264A (en) | 2013-09-30 |
JP2013196264A5 JP2013196264A5 (en) | 2014-12-11 |
Family
ID=49395163
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012061609A Pending JP2013196264A (en) | 2012-03-19 | 2012-03-19 | Similarity search device and computer program and similarity search method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2013196264A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10124524A (en) * | 1996-10-23 | 1998-05-15 | Toshiba Corp | Device for retrieving document and method therefor |
JP2007188134A (en) * | 2006-01-11 | 2007-07-26 | Yafoo Japan Corp | Method of document retrieval using index file |
JP2009110260A (en) * | 2007-10-30 | 2009-05-21 | Hitachi Ltd | File sharing system in cooperation with search engine |
-
2012
- 2012-03-19 JP JP2012061609A patent/JP2013196264A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10124524A (en) * | 1996-10-23 | 1998-05-15 | Toshiba Corp | Device for retrieving document and method therefor |
JP2007188134A (en) * | 2006-01-11 | 2007-07-26 | Yafoo Japan Corp | Method of document retrieval using index file |
JP2009110260A (en) * | 2007-10-30 | 2009-05-21 | Hitachi Ltd | File sharing system in cooperation with search engine |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10929603B2 (en) | Context-based text auto completion | |
CN108804642A (en) | Search method, device, computer equipment and storage medium | |
CN102541989B (en) | The sane automatic correction of data retrieval | |
WO2016095645A1 (en) | Stroke input method, device and system | |
US9158758B2 (en) | Retrieval of prefix completions by way of walking nodes of a trie data structure | |
US12013903B2 (en) | System and method for search discovery | |
JP6434162B2 (en) | Data management system, data management method and program | |
JP2013041385A (en) | Document retrieval method, document retrieval device, and document retrieval program | |
CN110738042B (en) | Error correction dictionary creation method, device, terminal and computer storage medium | |
JP2020160494A (en) | Information processing apparatus, document management system and program | |
CN105630837A (en) | Media record searching method and device | |
JP5162215B2 (en) | Data processing apparatus, data processing method, and program | |
JP2013196264A (en) | Similarity search device and computer program and similarity search method | |
JP5868262B2 (en) | Image search apparatus and image search method | |
JP5494066B2 (en) | SEARCH DEVICE, SEARCH METHOD, AND SEARCH PROGRAM | |
JP5954742B2 (en) | Apparatus and method for retrieving documents | |
JP5585489B2 (en) | Search support apparatus, program and method | |
JP5199968B2 (en) | Keyword type determination device, keyword type determination method, and keyword type determination program | |
JP5601116B2 (en) | Transposed index generation method and generation apparatus for N-gram search, search method and search apparatus using the inverted index, and computer program | |
JP2008243074A (en) | Device, method, and program for retrieving document | |
JP2001101184A (en) | Method and device for generating structurized document and storage medium with structurized document generation program stored therein | |
US9230013B1 (en) | Suffix searching on documents | |
JP5601123B2 (en) | Transposed index generation method and generation apparatus for N-gram search, search method and search apparatus using the inverted index, and computer program | |
JP2013145448A (en) | Document retrieval system and document retrieval method | |
JP2009301511A (en) | Index information preparing device, index information preparing method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20141027 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20141027 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150702 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150707 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20151110 |