資料庫索引法 - LIPS/語言資訊處理系統實驗室

Download Report

Transcript 資料庫索引法 - LIPS/語言資訊處理系統實驗室

資料庫結構、組織與檢索
黃慕萱,Chap. 2-3
Harter, Chap. 3
1
資料庫結構

資料庫組織方式



indexed-sequential
hierarchical
relational

資料庫組成元素




Database 
Records 
Fields 
Subfields
2
資料庫基本名詞定義

Record(紀錄)




儲存資訊的物件
e.g.一本書、一篇文章
Field(欄位)



用來描述屬性質的一串字
元
Subfield(次欄位)
Data(資料)
Attribute(屬性)


用來儲存以供檢索之文件
描述
Entity(實體)


可用來描述實體的特性
Value(屬性質)

用來描述實體特性的內容
3
屬性與屬性值—以書為例
Attributes(屬性)
Attribute Values(屬性值)
作者(Author)
吳政叡
書名(Title)
都柏林核心集與圖書著錄
出版商(Publisher)
臺灣學生
出版地(city of publication)
臺北市
出版年(date of publication)
2000[民89]
頁數(number of pages)
218
4
資料組成元素
Data
Element
Bit
Byte
Subfield
field
Record
Example
Text represented
1 or 0
0100110
&
Place of publication
Chicago, Illinois
Publication statement Chicago, Illinois:
Academic Press,
1985
An ERIC index record 大於 983,000
Database The ERIC database
Library
All Dialog databases
>200個databases
5
基本檔案結構

Linear file(線性檔)--Print file


依每一筆資料的編號連續儲存
Inverted file(倒置檔)-- Index file



將線形檔中每一個可供檢索的字依字母順序排列,並指出此
字在線形檔中的位置
可知此字出現在哪些紀錄,且方便直接調閱該紀錄
常見倒置檔
 基本索引檔 (basic index file)
 附加索引檔 (additional index file)
 索引典檔 (thesaurus index file)
 訊息檔(Posting file)
6
書目記錄結構與欄位—
以ERIC為例

DIALOG BlueSheet 所提供之資料


Resources in Education (RIE)


http://library.dialog.com/bluesheets/html/bl0001.html
14,000 documents each year
Current Index to Journals in Education (CIJE).

20,000 journal articles, extracted from more than 750
serials
7
DIALOG—ERIC 線形檔
8
DIALOG—ERIC 基本索引檔
9
DIALOG—ERIC 附加索引檔
10
DIALOG—MathSCi 索引典
11
ERIC -- OCLC
12
ERIC – EBSCO
13
ERIC – ProQuest
14
資料庫索引法

常見索引法




單字索引法(word
indexing)
片語索引法(phrase
indexing)
單字與片語混合索引法
(word and phrase
indexing)
數字索引法(numeric
indexing)

輔助索引法





布林邏輯運算元
(Boolean logic operator)
切截法(truncation)
相近運算元(proximity
operator)
特定限制欄位檢索法
檢索用法查證法
15
求全率v.s.求準率

相關
不相
關
總數
檢出
a
b
a+b
未檢
出
c
d
c+d
總數
a+c
b+d
a+b+
c+d
求全率 recall ratio


成功檢索到相關資料的
比率
a
=
a+c

求準率 precision ratio


沒有檢索到不相關文獻
的比率
a
=
a+b
16
單字索引法(word indexing)


將欄位中所有可供檢索的字逐一索引,鍵入倒置檔
通常用於主題相關欄位,以非控制詞彙表示


剔除停用字(Stop word)



如題名、摘要、全文
DIALOG的停用字: as 、and 、by 、for 、from 、 of 、the 、
to、with
可透過後組合(post-coordination)方式,以布林邏輯
運算元組合查詢
the evaluation of databases evaluation、databases
17
片語索引法(phrase indexing)


或稱複合語索引法
以一個獨立款目為單位進行檢索,包含空白與
標點符號



作者、資料型態、期刊名稱、出版語言
檢索者在檢索時,必須以系統製作時的著錄方
式檢索,甚至所有的標點符號和空格都需一致,
方能檢索到資料
如Bush, George Herbert Walker
18
單字與片語混合索引法(word
and phrase indexing)





多出現於與主題標目相關欄位
保有單字索引法的組合彈性和片語索引法的精確
檢索者知道控制語彙時採用片語檢索,以提高確性
檢索者不知道控制語彙時利用單字組合檢索,提高
檢索的回現率
檢索點較多,如consumer attitudes




以單字索引法 “consumer”、”attitudes”
使用片語索引法”consumer attitudes”
使用混合索引法 “consumer”、”attitudes”、 “consumer
attitudes”
缺點為佔用資料庫儲存空間
19
數字索引法(numeric indexing)

常用於欄位內所包含的內容均為數字時



商情名錄資料庫之公司基本資料公司資本額、人
數、銷售數據
統計資料庫
可依據數字大小排列,進行各項排序、比較、
計算
20
前組合索引v.s.後組合索引--1

前組合索引(pre-coordinate indexing),又通
稱為非操作型索引(non-manipulate indexing)



索引者,在索引階段即進行字詞組合的檢索方式
紙本索引常用方法,並利用系統輪迴法(systematic
rotation)方式,將可能出現的詞彙列出
後組合索引(post-coordinate indexing),又通
稱為操作型索引(manipulate indexing)

檢索者,在檢索階段自行組合字詞的檢索方式
21
前組合索引v.s.後組合索引--2
索引詞彙
後組合
資料庫
使用者
檢索策略
資料庫
使用者
檢索策略
利用指導
前組合
利用指導
資料庫
使用者
檢索策略
利用指導
22
布林邏輯--1



AND  intersection 交集
OR  union 集合
NOT  difference 差別
AND
OR
NOT
23
布林邏輯--2

優先順序


括弧優先執行
NOT  AND  OR
(cats OR dogs) NOT pets
cats
pets
dogs
24
切截法


在設定字根後,加上各種特殊符合 ”?”、”#”、”$”,
則可檢索到全部字根相同的字
範例






librar?
horse??
librar???
?computer
wom?n
用於複合語欄位檢索更能彰顯其功能
 如Bush, George Herbert Walker
 可不必擔心標點符號或空格
 但若切截過廣,會檢索出許多不相關的資料
25
相近運算元

w限制單字出現的順序


n不限制單字出現的順序,但利用阿拉伯數字限制
二字之間的間隔



cancer (l) prevention
s限制其前後字詞必須出現在同一個副欄位中


Ronald (n) Reagan
Marilyn (2n) White
l限制其前後字詞必須屬於同一個敘述語


information (w) theory
information (w) theory
優先順序:wnsl
26