Information-Retrieval: Einf uhrung fileWas ist IR? Boolesches Retrieval Groˇe Korpora Invertierter...
Transcript of Information-Retrieval: Einf uhrung fileWas ist IR? Boolesches Retrieval Groˇe Korpora Invertierter...
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Information-Retrieval:Einfuhrung
Claes NeuefeindFabian Steeg
22. Oktober 2009
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Themen des Seminars
I Boolesches Retrieval-Modell (IIR, Kapitel 1)
I Datenstrukturen (IIR 2)
I Tolerantes Retrieval (IIR 3)
I Vektorraum-Modell (IIR 6)
I Evaluation (IIR 8)
I Web-Retrieval (IIR 19-21)
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Was ist IR?
Boolesches Retrieval
Große Korpora
Invertierter Index
Literatur
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Definition (Manning et al.):
I IR is finding material (usually documents) of an unstructurednature (usually text) that satisfies an information need fromwithin large collections (usually stored on computers).
I Gegenmodell zu traditioneller Datenbanksuche
[Manning et al., 2008, S. 1]
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Definition (Manning et al.):
I IR is finding material (usually documents) of an unstructurednature (usually text) that satisfies an information need fromwithin large collections (usually stored on computers).
I Gegenmodell zu traditioneller Datenbanksuche
[Manning et al., 2008, S. 1]
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Definition (Manning et al.):
I IR is finding material (usually documents) of an unstructurednature (usually text) that satisfies an information need fromwithin large collections (usually stored on computers).
I Gegenmodell zu traditioneller Datenbanksuche
[Manning et al., 2008, S. 1]
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Definition (Manning et al.):
I IR is finding material (usually documents) of an unstructurednature (usually text) that satisfies an information need fromwithin large collections (usually stored on computers).
I Gegenmodell zu traditioneller Datenbanksuche
[Manning et al., 2008, S. 1]
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Definition (Manning et al.):
I IR is finding material (usually documents) of an unstructurednature (usually text) that satisfies an information need fromwithin large collections (usually stored on computers).
I Gegenmodell zu traditioneller Datenbanksuche
[Manning et al., 2008, S. 1]
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Definition (Manning et al.):
I IR is finding material (usually documents) of an unstructurednature (usually text) that satisfies an information need fromwithin large collections (usually stored on computers).
I Gegenmodell zu traditioneller Datenbanksuche
[Manning et al., 2008, S. 1]
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Unstrukturierte vs. Strukturierte Daten 1996
Abbildung: www.informationretrieval.org
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Unstrukturierte vs. Strukturierte Daten 2006
Abbildung: www.informationretrieval.org
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Strukturierte Daten
Begriff referiert auf Information in Tabellen:
Mitarbeiter Manager Gehalt
Muller Meier 60000
Schmidt Muller 50000
Schulz Muller 40000
Typische Features: “ranges”, exaktes Matchen
I z.B. “Gehalt ≤ 60000” und “Manager=Muller“
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Unstrukturierte Daten
I Begriff referiert auf FreitextI Gestattet:
I Keyword-Anfragen (mit Operatoren)I “konzeptuelle” AnfragenI z.B. “finde alle Websites zum Thema IR”
I Klassisches Modell fur Suche in Textdokumenten
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Semi-strukturierte Daten
I Textuelle Daten sind nie vollig unstrukturiert
I Bsp: Diese Folie enthalt FormatierungenI Nutzbar fur semi-strukturierte Suche
I Titel enthalt Daten, Unterpunkte enthalten SucheI nutzlich z.B. bei Web-Suche (Markup)
I Außerdem nutzbar: Latente linguistische Struktur
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Anwendungsdomanen
I InternetI Indexierung, Nutzung des Markup, Bewertungskriterien
I “Personalisiertes IR”I Im Betriebssystem, Mailprogramm
(Suche, Textklassifikation, etc.)
I Domanenspezifische SucheI v.a. in Firmen und Institutionen
(Bibliotheken, Expertensysteme etc.)
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Teilbereiche und Aufgaben
I Suche nach Informationen
I Datenaufbereitung, Reprasentation
I Filtern von Dokumentensammlungen
I Unterstutzung beim Browsen
I Weiterverarbeitung von Suchergebnissen
I Allgemein: Informationsmanagement
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Komplexere Aufgaben
I Cross-language IR
I Question Answering
I Automatisches Zusammenfassen
I . . .
→ Text-Mining
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Suchbeispiel
I Shakespeare-Korpus (ca. 1 Mio Worter)I Anfrage:
I Welche Stucke enthalten Brutus und Caesar aberNICHT Calpurnia?
I Welche Suchstrategie soll gewahlt werden?
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Der naive Ansatz:
I lineare Suche uber alle Stucke fur Brutus und Caesar,anschließend alle aussortieren, die Calpurnia enthalten
I Aber:
I sehr langsamI keine erweiterten Anfragen (z.B. Nahe)I keine Ranglisten
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Der naive Ansatz:
I lineare Suche uber alle Stucke fur Brutus und Caesar,anschließend alle aussortieren, die Calpurnia enthalten
I Aber:
I sehr langsamI keine erweiterten Anfragen (z.B. Nahe)I keine Ranglisten
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Der naive Ansatz:
I lineare Suche uber alle Stucke fur Brutus und Caesar,anschließend alle aussortieren, die Calpurnia enthalten
I Aber:I sehr langsam
I keine erweiterten Anfragen (z.B. Nahe)I keine Ranglisten
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Der naive Ansatz:
I lineare Suche uber alle Stucke fur Brutus und Caesar,anschließend alle aussortieren, die Calpurnia enthalten
I Aber:I sehr langsamI keine erweiterten Anfragen (z.B. Nahe)
I keine Ranglisten
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Der naive Ansatz:
I lineare Suche uber alle Stucke fur Brutus und Caesar,anschließend alle aussortieren, die Calpurnia enthalten
I Aber:I sehr langsamI keine erweiterten Anfragen (z.B. Nahe)I keine Ranglisten
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Term-Dokument-Matrix
Anthony Julius The Hamlet Othello Macbeth . . .and Caesar Tempest
CleopatraAnthony 1 1 0 0 0 1Brutus 1 1 0 1 0 0Caesar 1 1 0 1 1 1Calpurnia 0 1 0 0 0 0Cleopatra 1 0 0 0 0 0mercy 1 0 1 1 1 1worser 1 0 1 1 1 0...
Eintrag ist 1, wenn der Term auftritt.Eintrag ist 0, wenn der Term nicht auftritt
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Term-Dokument-Matrix
Anthony Julius The Hamlet Othello Macbeth . . .and Caesar Tempest
CleopatraAnthony 1 1 0 0 0 1Brutus 1 1 0 1 0 0Caesar 1 1 0 1 1 1Calpurnia 0 1 0 0 0 0Cleopatra 1 0 0 0 0 0mercy 1 0 1 1 1 1worser 1 0 1 1 1 0...
Eintrag ist 1, wenn der Term auftritt.Eintrag ist 0, wenn der Term nicht auftritt
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Term-Dokument-Matrix
Anthony Julius The Hamlet Othello Macbeth . . .and Caesar Tempest
CleopatraAnthony 1 1 0 0 0 1Brutus 1 1 0 1 0 0Caesar 1 1 0 1 1 1Calpurnia 0 1 0 0 0 0Cleopatra 1 0 0 0 0 0mercy 1 0 1 1 1 1worser 1 0 1 1 1 0...
Eintrag ist 1, wenn der Term auftritt.Eintrag ist 0, wenn der Term nicht auftritt
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Term-Dokument-Vektoren
I Fur jeden Term erhalten wir einen 0/1-VektorI Bearbeitung von Anfragen mittels Vergleich der Vektoren:
I berechne bitweise UND fur die Vektoren von Brutus, Caesarsowie fur den Komplement-Vektor von Calpurnia
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
0/1-Vektor fur Brutus
Anthony Julius The Hamlet Othello Macbeth . . .and Caesar Tempest
CleopatraAnthony 1 1 0 0 0 1Brutus 1 1 0 1 0 0Caesar 1 1 0 1 1 1Calpurnia 0 1 0 0 0 0Cleopatra 1 0 0 0 0 0mercy 1 0 1 1 1 1worser 1 0 1 1 1 0...
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
0/1-Vektor fur Brutus
Anthony Julius The Hamlet Othello Macbeth . . .and Caesar Tempest
CleopatraAnthony 1 1 0 0 0 1Brutus 1 1 0 1 0 0Caesar 1 1 0 1 1 1Calpurnia 0 1 0 0 0 0Cleopatra 1 0 0 0 0 0mercy 1 0 1 1 1 1worser 1 0 1 1 1 0...
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
0/1-Vektor fur Brutus
Anthony Julius The Hamlet Othello Macbeth . . .and Caesar Tempest
CleopatraAnthony 1 1 0 0 0 1Brutus 1 1 0 1 0 0Caesar 1 1 0 1 1 1Calpurnia 0 1 0 0 0 0Cleopatra 1 0 0 0 0 0mercy 1 0 1 1 1 1worser 1 0 1 1 1 0...
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
0/1-Vektor fur Brutus
Anthony Julius The Hamlet Othello Macbeth . . .and Caesar Tempest
CleopatraAnthony 1 1 0 0 0 1Brutus 1 1 0 1 0 0Caesar 1 1 0 1 1 1Calpurnia 0 1 0 0 0 0Cleopatra 1 0 0 0 0 0mercy 1 0 1 1 1 1worser 1 0 1 1 1 0...
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Suchergebnis
Anthony and Cleopatra, Act III, Scene iiAgrippa [Aside to Domitius Enobarbus]: Why, Enobarbus,
When Antony found Julius Caesar dead,He cried almost to roaring; and he weptWhen at Philippi he found Brutus slain.
Hamlet, Act III, Scene iiLord Polonius: I did enact Julius Caesar: I was killed
i’ the Capitol; Brutus killed me.
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Ergebnisbewertung
I Erfullung des Informationsbedarfs?I Frage nach der Relevanz
I Effektivitat des IR-Systems:I Precision:
Wie viele der gefundenen Dokumente sind relevant?I Recall:
Wie viele der relevanten Dokumente wurden gefunden?
→ Mehr dazu spater im Seminar!
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Wie ist das bei großeren Korpora?
I Seien N = 1 Mio. Dokumente, mit ca. 1000 Wortern jeDokument
I Korpus hat ca. 6 GB(bei Ø 6 Bytes/Wort, inkl. Leer- und Satzzeichen)
I Weitere Annahme:I m = 500K verschiedene Terme
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Wie ist das bei großeren Korpora?
I Matrix hat N x m = 500K x 1 Mio (= 500 Mrd.) EintrageI Aufbau der Matrix nicht moglich
I Aber:I Nur max. 1 Mrd davon sind EinsenI Die Matrix ist extrem “gestreut“: 99,8% sind leer
I Bessere Reprasentation?
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Invertierter Index
Notiere zu jedem Term alle Dokumente, die den Term enthalten→ nur Positionen, in denen Einsen stehen
Brutus −→ 1 2 4 11 31 45 173 174
Caesar −→ 1 2 4 5 6 16 57 132 . . .
Calpurnia −→ 2 31 54 101
...︸ ︷︷ ︸ ︸ ︷︷ ︸dictionary postings
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Invertierter Index
Notiere zu jedem Term alle Dokumente, die den Term enthalten→ nur Positionen, in denen Einsen stehen
Brutus −→ 1 2 4 11 31 45 173 174
Caesar −→ 1 2 4 5 6 16 57 132 . . .
Calpurnia −→ 2 31 54 101
...︸ ︷︷ ︸ ︸ ︷︷ ︸dictionary postings
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Invertierter Index
Notiere zu jedem Term alle Dokumente, die den Term enthalten→ nur Positionen, in denen Einsen stehen
Brutus −→ 1 2 4 11 31 45 173 174
Caesar −→ 1 2 4 5 6 16 57 132 . . .
Calpurnia −→ 2 31 54 101
...︸ ︷︷ ︸ ︸ ︷︷ ︸dictionary postings
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Invertierter Index
Welche Datenstruktur soll gewahlt werden?Weshalb?
Brutus −→ 1 2 4 11 31 45 173 174
Caesar −→ 1 2 4 5 6 16 57 132 . . .
Calpurnia −→ 2 31 54 101
...︸ ︷︷ ︸ ︸ ︷︷ ︸dictionary postings
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Wie geht es weiter?
I Datenstrukturen (IIR 2)
I Tolerantes Retrieval (IIR 3)
I Vektorraum-Modell (IIR 6)
I Evaluation (IIR 8)
I Web-Retrieval (IIR 19-21)
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Fur die Ubung:
I Lineare Suche
I Term-Dokument-Matrix
I Verkettete Liste
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln
Was ist IR? Boolesches Retrieval Große Korpora Invertierter Index Literatur
Manning, C. D., Raghavan, P., and Schutze, H. (2008).Introduction to Information Retrieval.Cambridge University Press.
Zum Nachlesen: Kapitel 1 (siehe www.informationretrieval.org)
Text-Engineering I - Information-Retrieval - Wintersemester 2009/2010 - Informationsverarbeitung - Universitat zu Koln