Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
特徴ベクトルを用いた全文検索について(2)
Search
masaya82
February 14, 2018
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
特徴ベクトルを用いた全文検索について(2)
masaya82
February 14, 2018
More Decks by masaya82
See All by masaya82
文献紹介 : More is not always better: balancing sense distributions for all-words
masaya82
0
170
文献紹介:Enhancing Modern Supervised Word Sense Disambiguation Models
masaya82
0
180
文献紹介:The Word Sense Disambiguation Test Suite at WMT18
masaya82
0
120
文献紹介:Preposition Sense Disambiguation and Representation
masaya82
0
150
文献紹介:Word Sense Disambiguation Based on Word Similarity Calculation Using Word Vector Representation from a Knowledge-based Graph
masaya82
0
170
Distributional Lesk: Effective Knowledge-Based Word Sense Disambiguation
masaya82
0
140
Japanese all-words WSD system using the Kyoto Text Analysis ToolKit
masaya82
0
150
Improving Word Sense Disambiguation in Neural Machine Translation with Sense Embeddings
masaya82
0
160
Learning_to_Identify_the_Best_Contexts_for_Knowledge-based_WSD
masaya82
0
160
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
From π to Pie charts
rasagy
1
370
Testing 201, or: Great Expectations
jmmastey
46
8.3k
New Earth Scene 8
popppiees
4
2.6k
Writing Fast Ruby
sferik
630
63k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Test your architecture with Archunit
thirion
2
2.4k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Transcript
特徴ベクトルを用いた 全文検索について(2) 自然言語処理研究室 B3 福嶋 真也
参考文献 北 研二、津田 和彦、獅々堀 正幹 著 「情報検索アルゴリズム」 2002年 共立出版株式会社 6章
p139-160
特徴ベクトル法 流れ 文書集合のすべての文書から単語シグネチャー、文書シグネ チャーを作成 検索単語についても単語シグネチャーを作成 検索単語シグネチャーと文書シグネチャーを用いて検索を行う 単語シグネチャー・・・索引語となる単語の特徴を表すビット列 文書シグネチャー・・・文書の特徴を表すビット列
特徴ベクトルによる検索 ・複数の検索単語である場合 1つの場合は単に検索単語シグネチャーと文書シグネチャーで 論理積をとることで判定 複数の場合は前処理として複数の検索単語を論理演算子 (AND、OR、NOT)と組み合わせて1つのクエリとする 例 “search”,”algorithm”→”search AND algorithm”
”search OR algorithm”
特徴ベクトルによる検索 1つのクエリにしたら・・・ 論理演算子にしたがって処理を行い、検索を行う 基本的な流れは検索単語が1つのときと同じ AND演算子による検索 検索単語の単語シグネチャーについて論理和をとり、これと文 書シグネチャーの論理積をとる。これを検索単語シグネチャー と比較する 一致する文書なら逐次検索を行い、すべての検索単語が出現 しているなら条件を満たしていると考える
特徴ベクトルによる検索 例:key=“search AND algorithm” 1 =full text search 2 =inverted
index file 3=sequential search algorithm 4=index search algorithm 5=information retrieval algorithm
特徴ベクトルによる検索 _ 1 =1 1 0 0 0 0 0
1 _ 2 =0 1 0 1 1 0 0 0 _ 3 =1 1 0 0 0 0 1 0 _ 4 =1 0 0 1 0 0 1 0 _ 5 =0 0 0 1 0 1 1 0 “ℎ” =0 0 0 0 0 0 1 0 “ℎ” =1 0 0 0 0 0 0 0 =1 0 0 0 0 0 1 0 3 , 4 が一致 →逐次検索で3 , 4 が条件に当てはまることを確認
特徴ベクトルによる検索 OR演算子による検索 単語シグネチャーの処理はANDと同じ 単語シグネチャーをビット反転させ、それと文書シグネチャーの 論理積をとり検索単語シグネチャーと比較 →不一致なら逐次検索し、検索単語のうち一つでも検出される なら条件を満たすと考える NOT演算子による検索 単語シグネチャーの処理は一つの検索単語のときと同じ 文書シグネチャーの論理積をとり検索単語シグネチャーと比較
→不一致か一致後の逐次検索で検索単語が未検出であれば 条件を満たすと考える
特徴ベクトルによる検索 例:key1=“search OR algorithm” key2=“NOT sequential”, 1 =full text search
2 =inverted index file 3=sequential search algorithm 4=index search algorithm 5=information retrieval algorithm “ℎ” =0 0 0 0 0 0 1 0 “ℎ” =1 0 0 0 0 0 0 0 1 =1 0 0 0 0 0 1 0 "" =0 1 0 0 0 0 0 0
特徴ベクトルによる検索 _ 1 =1 1 0 0 0 0 0
1 _ 2 =0 1 0 1 1 0 0 0 _ 3 =1 1 0 0 0 0 1 0 _ 4 =1 0 0 1 0 0 1 0 _ 5 =0 0 0 1 0 1 1 0 1 =1 0 0 0 0 0 1 0 ~ 1 =0 1 1 1 1 1 0 1 2 =0 1 0 0 0 0 0 0 key1では2 が一致(他の文書は不一致) → 2 以外を逐次検索し、1 , 2 , 3 , 4 が条件に当てはまることを確認 key2では4 , 5 が不一致(他の文祖は一致) → 4 , 5 以外を逐次検索し、1 , 2 が条件に当てはまることを確認
特徴ベクトルによる検索 ・クラス分け 検索単語シグネチャーと文書シグネチャーの照合結果により、 3つの文書集合に分類する →演算子が使われているときの逐次検索の回数を減らせる TRUEクラス:クエリを満足する文書 UNDEFクラス:クエリを満足するか否か未確定な文書 FALSEクラス:クエリを満たさない文書 AND F
U T F F F F U F U U T F U T OR F U T F F U T U U U T T T T T NOT F T U U T F
特徴ベクトルによる検索 例:key1=“NOT sequential(1 )” key2=“search(2) OR algorithm()” key3=key1 AND key2
1 =full text search 2 =inverted index file 3=sequential search algorithm 4=index search algorithm 5=information retrieval algorithm 文書 NOT s1 s2 OR a D1 U U D2 U F D3 U U D4 T U D5 T U
特徴ベクトルによる検索 文書 NOT s1 s2 OR a D1 U U
D2 U F D3 U U D4 T U D5 T U AND F U T F F F F U F U U T F U T 文書 (NOT s1) AND(s2 OR a) D1 U D2 F D3 U D4 U D5 U
分割管理による特徴ベクトルの構成法 文書中の索引語が多くなると文書シグネチャーのほとんどの ビットが1に →文書の特徴が分かりにくく、フォルスドロップが増加 例 1 =full text search 2
=inverted index file 3=sequential search algorithm 4=index search algorithm 5=information retrieval algorithm =full text search inverted index file sequential search algorithm index search algorithm information retrieval algorithm _ = 1 1 0 1 1 1 1 1
分割管理による特徴ベクトルの構成法 ・逐次シグネチャーファイル(sequential signature file;SSF) 文書をあらかじめいくつかのブロックに分割して、ブロックごとに ブロック・シグネチャーを作成し、これらを連結させて文書シグ ネチャーにしたもの 数式で表すと・・・ D =
{1 , 2 , … , , … , } = {_ 1 , _ 2 , … _ , … _ } :単語 :文書 :ブロック _:ブロック・シグネチャー
分割管理による特徴ベクトルの構成法 例 1 =full text search 2 =inverted index file
3=sequential search algorithm 4=index search algorithm 5=information retrieval algorithm _ 1 =1 1 0 0 0 0 0 1 _ 2 =0 1 0 1 1 0 0 0 _ 3 =1 1 0 0 0 0 1 0 _ 4 =1 0 0 1 0 0 1 0 _ 5 =0 0 0 1 0 1 1 0 =full text search inverted index file sequential search algorithm index search algorithm information retrieval algorithm ={1 1 0 0 0 0 0 1, 0 1 0 1 1 0 0 0, 1 1 0 0 0 0 1 0, 1 0 0 1 0 0 1 0, 0 0 0 1 0 1 1 0 }
分割管理による特徴ベクトルの構成法 SSFによって検索単語がどこにあるかは分かりやすくなった しかし… このままではブロックごとに検索単語との照合を行う必要あり つまり、検索に時間かかる →特徴ベクトルを分割して管理することで検索しやすく (1)ビット・スライスト・シグネチャー・ファイル (2)FP分割シグネチャーファイル
分割管理による特徴ベクトルの構成法 (1)ビット・スライスト・シグネチャー・ファイル 各ブロック・シグネチャーのビット位置ごとにビットスライスと呼 ばれる単位でシグネチャーを格納 例 1 1 0 0 0
0 0 1 0 1 0 1 1 0 0 0 1 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 0 0 0 1 0 1 1 0 _1=1 0 1 1 0 _2=1 1 1 0 0 _3=0 0 0 0 0 _4=0 1 0 1 1 _5=0 1 0 0 0 _6=0 0 0 0 1 _7=0 0 1 1 1 _8=1 0 0 0 0 _ 1 _ 2 _ 3 _ 4 _ 5
分割管理による特徴ベクトルの構成法 検索例 key=“full” ( “” =0 0 0 0 0
0 0 1) _8 に注目して検索単語シグネチャーと比較 左から1ビット目のみ一致 →1 のみを逐次検索すればOK →検索量を減らせる 検索単語シグネチャーの1となっている ビットが増えても同様のことができる _1=1 0 1 1 0 _2=1 1 1 0 0 _3=0 0 0 0 0 _4=0 1 0 1 1 _5=0 1 0 0 0 _6=0 0 0 0 1 _7=0 0 1 1 1 _8=1 0 0 0 0
分割管理による特徴ベクトルの構成法 (2)FP分割シグネチャーファイル 各ブロック・シグネチャーの先頭数ビット(接頭ビット)でブロッ ク・シグネチャーをグループ化し、分割管理を行う方法(フィック スト・プレフィックス)を用いてブロック・シグネチャー分割管理す る 例 接頭ビット ブロック・シグネチャー 0
0 0 0 1 0 1 1 0 _ 5 0 1 0 1 1 0 0 0 _ 2 1 1 0 0 1 0 0 1 0 _ 4 1 1 0 0 0 0 0 1 _ 1 1 1 0 0 0 0 1 0 _ 3
今回の発表内容 特徴ベクトルによる検索 複数の検索ワードの場合の検索 ・演算子を用いた検索方法 ・クラス分け 分割管理による特徴ベクトルの構成法 ・逐次シグネチャーファイル ・ビット・スライスト・シグネチャー・ファイル ・FP分割シグネチャーファイル