Information Retrieval. Danushka Bollegala

Similar documents
Index construction CE-324: Modern Information Retrieval Sharif University of Technology

Index construction CE-324: Modern Information Retrieval Sharif University of Technology

Information Retrieval

Querying Introduction to Information Retrieval INF 141 Donald J. Patterson. Content adapted from Hinrich Schütze

Introduction to Information Retrieval

Index construction CE-324: Modern Information Retrieval Sharif University of Technology

index construct Overview Overview Recap How to construct index? Introduction Index construction Introduction to Recap

CSE 7/5337: Information Retrieval and Web Search Introduction and Boolean Retrieval (IIR 1)

Index Construction 1

CS105 Introduction to Information Retrieval

3-2. Index construction. Most slides were adapted from Stanford CS 276 course and University of Munich IR course.

Information Retrieval

Introduction to Information Retrieval

Index Construction Introduction to Information Retrieval INF 141 Donald J. Patterson

Introduction to Information Retrieval

CSE 7/5337: Information Retrieval and Web Search Index construction (IIR 4)

PV211: Introduction to Information Retrieval

boolean queries Inverted index query processing Query optimization boolean model September 9, / 39

Introduction to Information Retrieval

CSCI 5417 Information Retrieval Systems Jim Martin!

Information Retrieval

Introduction to Information Retrieval

Index Construction Introduction to Information Retrieval INF 141/ CS 121 Donald J. Patterson

Information Retrieval

Information Retrieval Tutorial 1: Boolean Retrieval

Index Construction. Slides by Manning, Raghavan, Schutze

Information Retrieval

Data-analysis and Retrieval Boolean retrieval, posting lists and dictionaries

Information Retrieval

Introduction to. CS276: Information Retrieval and Web Search Christopher Manning and Prabhakar Raghavan. Lecture 4: Index Construction

Introduc)on to. CS60092: Informa0on Retrieval

Introduction to Information Retrieval

Information Retrieval. Chap 8. Inverted Files

Information Retrieval

Boolean Retrieval. Manning, Raghavan and Schütze, Chapter 1. Daniël de Kok

Information Retrieval and Text Mining

Boolean retrieval & basics of indexing CE-324: Modern Information Retrieval Sharif University of Technology

Introduction to Information Retrieval

Index Construction. Dictionary, postings, scalable indexing, dynamic indexing. Web Search

Reuters collection example (approximate # s)

Information Retrieval

CSCI 5417 Information Retrieval Systems! What is Information Retrieval?

INDEX CONSTRUCTION 1

Administrative. Distributed indexing. Index Compression! What I did last summer lunch talks today. Master. Tasks

Information Retrieval

DB-retrieval: I m sorry, I can only look up your order, if you give me your OrderId.

EECS 395/495 Lecture 3 Scalable Indexing, Searching, and Crawling

Indexing. UCSB 290N. Mainly based on slides from the text books of Croft/Metzler/Strohman and Manning/Raghavan/Schutze

INFO 4300 / CS4300 Information Retrieval. slides adapted from Hinrich Schütze s, linked from

Indexing. Lecture Objectives. Text Technologies for Data Science INFR Learn about and implement Boolean search Inverted index Positional index

Part 2: Boolean Retrieval Francesco Ricci

Text Analytics. Index-Structures for Information Retrieval. Ulf Leser

Informa(on Retrieval

Introduction to Information Retrieval

Information Retrieval and Organisation

Information Retrieval

Recap: lecture 2 CS276A Information Retrieval

Introduction to Information Retrieval

Lecture 1: Introduction and the Boolean Model

More on indexing CE-324: Modern Information Retrieval Sharif University of Technology

Efficiency. Efficiency: Indexing. Indexing. Efficiency Techniques. Inverted Index. Inverted Index (COSC 488)

Document Representation : Quiz

Unstructured Data Management. Advanced Topics in Database Management (INFSCI 2711)

Corso di Biblioteche Digitali

Advanced Retrieval Information Analysis Boolean Retrieval

Information Retrieval

Index construc-on. Friday, 8 April 16 1

Introduction to Information Retrieval and Boolean model. Reference: Introduction to Information Retrieval by C. Manning, P. Raghavan, H.

Text Analytics. Index-Structures for Information Retrieval. Ulf Leser

Search: the beginning. Nisheeth

Introduction to Information Retrieval IIR 1: Boolean Retrieval

Preliminary draft (c)2006 Cambridge UP

Models for Document & Query Representation. Ziawasch Abedjan

Boolean retrieval & basics of indexing CE-324: Modern Information Retrieval Sharif University of Technology

The Anatomy of a Large-Scale Hypertextual Web Search Engine

Introduction to Information Retrieval (Manning, Raghavan, Schutze)

Information Retrieval and Organisation

n Tuesday office hours changed: n 2-3pm n Homework 1 due Tuesday n Assignment 1 n Due next Friday n Can work with a partner

Boolean retrieval & basics of indexing CE-324: Modern Information Retrieval Sharif University of Technology

Lecture 3 Index Construction and Compression. Many thanks to Prabhakar Raghavan for sharing most content from the following slides

Introducing Information Retrieval and Web Search. borrowing from: Pandu Nayak

PV211: Introduction to Information Retrieval

Information Retrieval

Logistics. CSE Case Studies. Indexing & Retrieval in Google. Review: AltaVista. BigTable. Index Stream Readers (ISRs) Advanced Search

Efficient Implementation of Postings Lists

IR System Components. Lecture 2: Data structures and Algorithms for Indexing. IR System Components. IR System Components

60-538: Information Retrieval

Classic IR Models 5/6/2012 1

Information Retrieval

Text Pre-processing and Faster Query Processing

Document indexing, similarities and retrieval in large scale text collections

Information Retrieval

CS 572: Information Retrieval. Lecture 2: Hello World! (of Text Search)

CS347. Lecture 2 April 9, Prabhakar Raghavan

Today s topics CS347. Inverted index storage. Inverted index storage. Processing Boolean queries. Lecture 2 April 9, 2001 Prabhakar Raghavan

Multimedia Information Extraction and Retrieval Term Frequency Inverse Document Frequency

Information Retrieval II

Introduction to Information Retrieval

Query Answering Using Inverted Indexes

CS60092: Informa0on Retrieval. Sourangshu Bha<acharya

Transcription:

Information Retrieval Danushka Bollegala

Anatomy of a Search Engine Document Indexing Query Processing Search Index Results Ranking 2

Document Processing Format detection Plain text, PDF, PPT, Text extraction Convert to plain text Language detection Tokenisation Indexing 3

Language Detection How to detect the language of a document? Check for specific characters such as kanji characters for Chinese, and Hiragana/Katakana for Japanese, Hangul for Korean etc. Not always perfect Some documents might contain multiple languages e.g. Japanese web site that teaches English Character-based statistical approaches are used If we get the language wrong, we will use a wrong tokeniser 4

Tokenisation If we do not tokenise properly, then we cannot search for those terms! Tokens vs. Words Token refers to a single unit of text that we can search for the burger i ate was an awesome burger tokens = the, burger, i, ate, was, an, awesome, burger Tokens might not necessarily be words in English Repeating tokens are counted separately note the two burger tokens in the previous example 5

Is tokenisation simple? Simple! Just split at spaces to get tokens s.split() What about the following? Dr. D. T. Bollegala Should we consider Dr,., D,., T,., Bollegala or Dr., D., T., Bollegala? Japanese and Chinese languages do not use spaces at all! Tokens: / / / / /. 6

Indexing Search engines create an inverted index from tokens to documents for efficient retrieval Similar to the indexes you find at the end of a text book Support Vector Machines p. 13, p. 56, p. 124 Index is a large table between tokens and unique document ids 7

Inverted Index D 1 = I went to school D 2 = The school was closed D 3 = Tomorrow is a holiday I D 1 went school tomorrow D 1 D 1 D 3 D 2 The list of document IDs for a particular token is called a posting list holiday D 3 closed D 2 to D 1 8

Notes We can assign integer IDs to documents so that we can sort the posting lists. By doing so we can quickly answer AND queries. We can assign integer ids to terms (tokens) as well. This will save space. We only need to store one entry for a word in a document. (multiple entries can be ignored, bag-of-words model). We need to store the length of a posting list as meta data. AND queries Start with the shorter posting list. Find the document ids in the shorter list in the longer list. 9

Example Query = Brutus AND Calpurnia Results = 2, 31 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 Start with the posting list for Calpurnia (shorter list), and check for 2, 31. No point checking any further than 173. We will not find 54 and 101 in Brutus. 10

AND query processing INTERSECT(p 1, p 2 ) 1 answer 2 while p 1 = NIL and p 2 = NIL 3 do if docid(p 1 )=docid(p 2 ) 4 then ADD(answer, docid(p 1 )) 5 p 1 next(p 1 ) 6 p 2 next(p 2 ) 7 else if docid(p 1 ) < docid(p 2 ) 8 then p 1 next(p 1 ) 9 else p 2 next(p 2 ) 10 return answer 11

Skip pointers The previous version of answering AND queries is inefficient. O(n+m) if the length of the two posting lists are n and m. We can add skip pointers to speed up the search. If the value to be searched for is larger than the skip pointer then we can directly skip over all the values under the skip pointer. How to find skip points? (square root heuristic) Trade-off: number of skips vs. skip range 12

Example After matching up to 8, and when we want to match 41 next, we note that at 16 we have a skip of 28. This means that we will not observe 41 during this skip range. We can skip over 19 and 23, and resume the search process from 28. We cannot skip to 72 because 51 is in between 28 and 72. 13

Disk access vs. Memory access Disk seek time = 5ms disk read per 1b = 2x10-8 s memory read per 1b = 10-9 s Reading from memory is faster compared to disk. We need to read in blocks (ca. 64kb) when we read from the disk because of the seek overhead. Main memory is limited (10~100GB) vs. disk space (1~10TB) 14

Blocked Sort-Based Indexing BSBI (Blocked Sort-based Indexing) Segment the document collection into parts of equal size Sort the termid-docid pairs for each block in memory Store intermediate sorted results on disk Merge all intermediate results into the final index 15

BSBI BSBINDEXCONSTRUCTION() 1 n 0 2 while (all documents have not been processed) 3 do n n + 1 4 block PARSENEXTBLOCK() 5 BSBI-INVERT(block) 6 WRITEBLOCKTODISK(block, f n ) 7 MERGEBLOCKS( f 1,..., f n ; f merged ) 16

Example: BSBI brutus caesar noble with d1,d3 d1,d2,d4 d5 d1,d2,d3,d5 postings lists to be merged brutus caesar julius killed d6,d7 d8,d9 d10 d8 brutus caesar julius killed noble with d1,d3,d6,d7 d1,d2,d4,d8,d9 d10 d8 d5 d1,d2,d3,d5 merged postings lists disk 17

Web scale indexing Most large documents collections (e.g. Web) result in indexes that cannot be stored in a single machine Distributed indexing methods are required Methods based on MapReduce are used. splits assign master assign postings parser a-f g-p q-z inverter a-f parser a-f g-p q-z inverter g-p parser a-f g-p q-z inverter q-z map phase segment files reduce phase 18

Ranking Often there are hundreds of documents that contain a particular query We must rank the search results according to their relevance to a query There are numerous factors that need to be considered when computing f(q,d), the relevance of a document d to a query q. 19

Static Ranking The ranking of a document independent of the query PageRank is a famous example of a static ranking algorithm Discussed later in our Graph Mining lecture 20

Dynamic Ranking The rank of a document depends on the query Features term frequency PageRank novelty of the document position of the query within the document title, anchor text, links, etc. f(q,d) is computed as the linear combination of numerous features that indicate relevance f(q,d) = wt ψ(q,d) 21

How to learn the relevance weights? Clickthrough data are collected by the search engines Assume that we entered a query q and obtained a ranked list of documents d 1, d 2, d 3. If we skip d 1 and clicked on d 2, then the search engine creates a training instance indicating that f(q,d 2 ) > f(q,d 1 ) Billions of people are using search engines and clicking on documents, giving a large and cheap training dataset to learn the relevance function f. 22

References PDF available here. http://www-nlp.stanford.edu/ir-book/ 23