Introduction to Information Retrieval Chapter 10
- 2. 10.0 ! !
10.1 ! XML !
10.2 !XML !
10.3 !XML !
10.4 !XML !
!
!
h,p://nlp.stanford.edu/IR=book/ppt/10xml.pptx
- 3. 10.0 ! !
10.1 ! XML !
10.2 !XML !
10.3 !XML !
10.4 !XML
- 4. RDB
• RDB !
• IR
!
• RDB !
– !
•
!
- 6. RDB
• 3 !
– (DB)
!
– !−!
!
• tours!AND!(COUNTRY:!VaJcan!OR!
• LANDMARK:!Coliseum)?!
• tour!AND!(STATE:!VaJcan!OR!BUILDING:!Coliseum)?!
–
!
• !
– !
- 7. •
XML!
– ! !→!XML !
– (HTML,!SGML,!…)
- 8. 10.0 ! !
10.1 ! XML !
10.2 !XML !
10.3 !XML !
10.4 !XML
- 9. XML
! ! !<play>!
! XML / !<author>Shakespeare</author>!
(e.g.!<Jtle… !<Jtle>Macbeth</Jtle>!
>,!</Jtle…>)!!
!<act!number=“I”>!
! XML
(e.g.!number)! !<scene!!number=”vii”>!
! (e.g.!vii)! !<Jtle>Macbeth’s!castle</Jtle>!
! !(e.g.! !<verse>Will!I!with!wine!
Jtle,!verse)! !…</verse>!
!</scene>!
!</act>!
!</play>!
- 10. XML
root!element!
play!
!element! !element! !element!
author! act! )tle!
!text! !text!
Shakespeare! Macbeth!
!a,ribute! element!
number=“I”! scene!
!a,ribute! !element! !element!
number=“vii”! verse! )tle!
!text! !text!
Shakespeare! Macbeth’s!castle!
10! 10!
- 11. XML
root!element!
play!
!element! !element! !element!
author! act! )tle!
!text! !text!
Shakespeare! Macbeth!
!a,ribute! element!
number=“I”! scene!
!a,ribute! !element! !element!
number=“vii”! verse! )tle!
!text! !text!
Shakespeare! Macbeth’s!castle!
- 12. XML
root!element!
play!
!element! !element! !element!
author! act! )tle!
!text! !text!
Shakespeare! Macbeth!
!a,ribute! element!
number=“I”! scene!
!a,ribute! !element! !element!
number=“vii”! verse! )tle!
!text! !text!
Shakespeare! Macbeth’s!castle!
12! 12!
- 14. 10.0 ! !
10.1 ! XML !
10.2 !XML !
10.3 !XML !
10.4 !XML
- 16. ! !
• /XML :!
(i.e.,!XML )
!
!
Macbeth’s!castle
!scene act! !
– scene !
– Macbeth
play !
•
- 17. !
!
!
•
!
• E.g.!
query:Jtle:Macbeth! Macbeth
tragedy,!Macbeth Jtle,!Act!I,!Scene!vii,!Macbetch’s!
castle Jtle 10.2 !
– tragedy Jtle
!
–
- 18. !
•
!
–
!
–
!
1. !
2. !
3. !
4.
- 20. • !
1.
E.g.! book! !
2.
!
• book
- 22. • :!
:!
– XML E.g.!ISBN!!
–
!
!
Macbeth’s!castle! Macbeth’s!castle
play,!act,!scene,!)tle
!
•
!
- 23. ! !
•
!
– !
–
XML !
–
!
–
!
•
- 24. ! !
!
•
!
•
!
! 1:!
!
! 2:!
!
- 25. • (idf)
!
!
author Gates gate
Gates !
!
XML=context/term( / ) !
• XML=context
df !
• x
x
- 26. 10.0 ! !
10.1 ! XML !
10.2 !XML !
10.3 !XML !
10.4 !XML
- 27. • :! XML
Microso.$ Bill$ Gates$
Book!
Title! Author! Author!
Title! Author!
Microso.$ Bill$ Gates$
Microso.$ Bill$ Gates$ Book! Book!
.!.!.!!
Title! Author!
Microso.$ Bill$ 27! Gates$
- 28. 1.
Bill!Gates Bill Gates !
2.
!
Microso.$ Bill$ Gates$
Book!
Title! Author! Author!
Title! Author!
Microso.$ Bill$ Gates$
Microso.$ Bill$ Gates$ Book! Book!
.!.!.!!
Title! Author!
Microso.$ Bill$ 28! Gates$
- 29. •
E.g.!
$vs.$ $
XML
!
- 30. •
!
–
e.g.!author
Jtle Gates !
–
!
•
XML=context/term
XML=context/term
(structural!term) <c,!t>!
XML context c
(term)t !
- 34. • SIMNOMERGE!
!
SIMNOMERGE(q,!d)!=!
!
!
• V !
• B XML !
• weight!(q,!t,!c),!weight(d,!t,!c)! !q! !d! XML
!c! !t! ( E.g.!idft!*!wft,d!:!idft!
dft! )!!
• SIMNOMERGE(q,!d)! 1.0
!
- 36. 10.0 ! !
10.1 ! XML !
10.2 !XML !
10.3 !XML !
10.4 !XML
- 37. XML (INEX)
• INEX:!XML
INEX2002 IEEE 12,000
2006 Wikipedia
INEX$2002$collec@on$sta@s@cs$
12,107! number!of!documents!
494!MB! size!
1995—2002! Jme!of!publicaJon!of!arJcles!
1,532! average!number!of!XML!nodes!per!document!
6.9! average!depth!of!a!node!
30! number!of!CAS!topics!
30! number!of!CO!topics!
- 38. INEX
• 2 / !
1. (CO )!
2. (CAS )!
CAS
!
- 39. INEX
• :!
1. Content=only!or!CO :!
!
2. Content=and=structure!or!CAS :!
!
CAS
!
- 41. INEX
•
(3) (2)
(1) (0)
$
(ex.!3E!→! (3)
(E) ) 2S
3E
3N !
- 43. INEX
• 2
!
$
• INEX ! !
• INEX
!
- 44. XML
XML
• !
– XML!
• XML
!
• !
1. !
2. !
3. !
– XML!
• !
• → !
– !
• XML XQuery!(W3C)
- 45. • ( )XML IR
!
• ex.!
!
• 10
!