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

Size: px
Start display at page:

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

Transcription

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

2 Boolean query model Pose a query as a boolean query: Terms Operations: AND, OR, NOT Example: Brutus AND Caesar AND NOT Calpuria Return documents in which the terms (do not) appear. Each document viewed as a set of words.

3 Terminology Document: basic unit of information that we want to return as a result of a query. For example: Newspaper article Wikipedia page A Shakespeare book Collection: the group of documents that we will perform retrieval on. For example: Newspaper archive Wikipedia Shakespeare s collected works Term: the smallest unit of information in a query. For example: Token Lemma Compound (e.g. New York)

4 Relation to set theory In information retrieval, these operators are strongly related to set theory. When: T : the set of terms C: the document collection D : T P, where P C t T, t 1 T, t 2 T Then: t 1 AND t 2 : D(t 1 ) D(t 2 ) t 1 OR t 2 : D(t 1 ) D(t 2 ) NOT t: C \ D(t) t 1 AND NOT t 2 : D(t 1 ) \ D(t 2 )

5 Example: search

6 Example: library search

7 Example: library search

8 Why not use grep? Why don t we just use a tool such as grep? $ egrep -r '(Brutus Caesar)' docs egrep -v 'Calpuria'

9 Why not use grep? Why don t we just use a tool such as grep? $ egrep -r '(Brutus Caesar)' docs egrep -v 'Calpuria' Disadvantages for information retrieval: Slow: linear in the number of lines in the document collection. Inflexible matching: does not support more flexible matching operations. Inflexible ranking: does not support ranking of documents.

10 Incidence matrices

11 Incidence matrix Anthony and Cleopatra Julius Caesar The Tempest Hamlet Othello Macbeth... Anthony Brutus Caesar Calpurnia Cleopatra mercy worser

12 Incidence matrix Anthony and Cleopatra Julius Caesar The Tempest Hamlet Othello Macbeth... Anthony Brutus Caesar Calpurnia Cleopatra mercy worser Brutus AND Caesar AND NOT Calpurnia:

13 Incidence matrix Anthony and Cleopatra Julius Caesar The Tempest Hamlet Othello Macbeth... Anthony Brutus Caesar Calpurnia Cleopatra mercy worser Brutus AND Caesar AND NOT Calpurnia: & & ~010000

14 Incidence matrix Anthony and Cleopatra Julius Caesar The Tempest Hamlet Othello Macbeth... Anthony Brutus Caesar Calpurnia Cleopatra mercy worser Brutus AND Caesar AND NOT Calpurnia: & & ~ & & =

15 Incidence matrix Anthony and Cleopatra Julius Caesar The Tempest Hamlet Othello Macbeth... Anthony Brutus Caesar Calpurnia Cleopatra mercy worser Brutus AND Caesar AND NOT Calpurnia: & & ~ & & = Result: {Anthony and Cleopatra, Hamlet}

16 Incidence matrix The use of a small incidence matrix is fast: Look up the bit vector of the relevant terms. Apply bitwise operators that correspond with the search operators.

17 Incidence matrix The use of a small incidence matrix is fast: Look up the bit vector of the relevant terms. Apply bitwise operators that correspond with the search operators. Not practical for large document collections. Consider for instance the following collection: N = 1, 000, 000 documents M = 500, 000 distinct terms Requires an incidence matrix {0, 1} M N

18 Incidence matrix The use of a small incidence matrix is fast: Look up the bit vector of the relevant terms. Apply bitwise operators that correspond with the search operators. Not practical for large document collections. Consider for instance the following collection: N = 1, 000, 000 documents M = 500, 000 distinct terms Requires an incidence matrix {0, 1} M N Too large: half a trillion cells! Linear time processing of boolean operators: O(N)

19 Observation Suppose that the average document size is 1000 terms. We expect the number of unique terms per document to be (much) smaller than The incidence matrix is very sparse: mostly zeroes. Suggests that a better representation is possible.

20 Inverted indices

21 The inverted index Brutus Caesar Calpurnia Dictionary Postings

22 The inverted index Brutus Caesar Calpurnia Dictionary Postings Every term in a dictionary has a pointer to a postings list. A postings list is a sorted list of document identifiers without duplicates. A document identifier is an integer that we assign to a document while creating the inverted index. The set of all postings lists is sometimes referred to as postings.

23 Advantages of an inverted index Brutus Caesar Calpurnia Dictionary Postings

24 Advantages of an inverted index Brutus Caesar Calpurnia Dictionary Postings Smaller size: the dictionary is of size M. However, the size of a postings list for a term is the number of documents in which the term occurs. Faster: evaluation of boolean expressions is not O(N) for most interesting query terms.

25 Data structure for postings list Candidate data structures for postings lists: Sorted linked list Sorted dynamic-length array Balanced binary search tree Hash set

26 Sorted linked list Advantages: Easily extended with skip lists Disadvantages: O(n) search O(n) insertion Pointer-heavy Non-trivial memory disk mapping Not fit for compression

27 Sorted dynamic-length array Advantages: O(log(n)) search No pointers Non-trivial memory disk mapping Easy compression Disadvantages: O(n) average/worst-case insertion

28 Balanced binary search tree Advantages: O(log(n)) search O(log(n)) insertion Disadvantages: Pointer-heavy Not easily extended with skip lists Non-trivial memory disk mapping Not fit for compression

29 Hash set Advantages: O(1) search O(1) amortized insertion Disadvantages: Pointer-heavy (separate chaining). Not easily extended with skip lists Non-trivial memory disk mapping Not fit for compression

30 Query processing

31 Boolean model recap Pose a query as a boolean query: Terms Operators: AND, OR, NOT Example: Brutus AND Caesar AND NOT Calpuria

32 Looking up a term Query: Brutus

33 Looking up a term Query: Brutus Look up Brutus in the inverted index. Return the associated postings list.

34 term1 AND term2 Query: Brutus AND Caesar

35 term1 AND term2 Query: Brutus AND Caesar Retrieve the postings list for Brutus. Retrieve the postings list for Caesar. Compute the intersection of the posting lists. (How?)

36 AND of two posting lists (naive) The AND operator should produce the intersection of two postings lists. This is easy to do using a naive algorithm: let mut inter = Vec::new(); for doc1 in &self.docs { for doc2 in &other.docs { if doc1 == doc2 { inter.push(*doc1); break; } } }

37 AND of two posting lists (naive) The AND operator should produce the intersection of two postings lists. This is easy to do using a naive algorithm: let mut inter = Vec::new(); for doc1 in &self.docs { for doc2 in &other.docs { if doc1 == doc2 { inter.push(*doc1); break; } } } Complexity: O(nm), where n and m are the postings lists sizes of the operands.

38 AND of two postings lists (better) Given that the postings lists are sorted, we can easily do better. Traverse both lists synchronously.

39 AND of two postings lists let mut inter = Vec::new(); let mut p1i = 0; let mut p2i = 0; while p1i!= self.docs.len() && p2i!= other.docs.len() { let doc1 = self.docs[p1i]; let doc2 = other.docs[p2i]; } if doc1 == doc2 { inter.push(doc1); p1i += 1; p2i += 1; } else if doc1 < doc2 { p1i += 1; } else { p2i += 1; }

40 AND of two postings lists let mut inter = Vec::new(); let mut p1i = 0; let mut p2i = 0; while p1i!= self.docs.len() && p2i!= other.docs.len() { let doc1 = self.docs[p1i]; let doc2 = other.docs[p2i]; } if doc1 == doc2 { inter.push(doc1); p1i += 1; p2i += 1; } else if doc1 < doc2 { p1i += 1; } else { p2i += 1; } Complexity: O(n + m)

41 AND of two postings lists (D(t 1 ) D(t 2 )) What if D(t 1 ) D(t 2 )? Consider the following lists: Postings list 1: 8 Postings list 2:

42 AND of two postings lists (D(t 1 ) D(t 2 )) What if D(t 1 ) D(t 2 )? Consider the following lists: Postings list 1: 8 Postings list 2: Not senseful to traverse the second list: use binary search. Complexity: O(n + n log(m))

43 AND of two postings lists (D(t 1 ) D(t 2 )) let mut inter = Vec::new(); let (smaller, larger) = min_max_posting(self, other); let mut offset = 0; for doc in &smaller.docs { offset = match larger.docs[offset..].binary_search(doc) { Ok(idx) => { inter.push(*doc); idx } Err(idx) => idx, } } Posting { docs: inter }

44 term1 OR term2 Query: Brutus OR Caesar

45 term1 OR term2 Query: Brutus OR Caesar Retrieve the postings list for Brutus. Retrieve the postings list for Caesar. Compute the union of the postings lists.

46 term1 OR term2 Query: Brutus OR Caesar Retrieve the postings list for Brutus. Retrieve the postings list for Caesar. Compute the union of the postings lists. Note: The intersection should be ordered again. consider: (Brutus OR Caesar) AND Calpuria

47 OR of two postings lists let mut result = Vec::new(); let mut p1i = 0; let mut p2i = 0; while p1i!= self.docs.len() && p2i!= other.docs.len() { let doc1 = self.docs[p1i]; let doc2 = other.docs[p2i]; } if doc1 == doc2 { result.push(doc1); p1i += 1; p2i += 1; } else if doc1 < doc2 { result.push(doc1); p1i += 1; } else { result.push(doc2); p2i += 1; }

48 OR of two postings lists (continued) if p1i!= self.docs.len() { result.extend_from_slice(&self.docs[p1i..]); } if p2i!= other.docs.len() { result.extend_from_slice(&other.docs[p2i..]); }

49 NOT term Query: NOT Caesar

50 NOT term Query: NOT Caesar Retrieve the postings list for Caesar. Construct a list with all documents. Remove the postings for Caesar from the list of all documents.

51 NOT term Query: NOT Caesar Retrieve the postings list for Caesar. Construct a list with all documents. Remove the postings for Caesar from the list of all documents. Inefficient! Not frequently used in isolation.

52 NOT term Query: Brutus AND NOT Caesar

53 NOT term Query: Brutus AND NOT Caesar Evaluation: Retrieve the postings list for Brutus. Retrieve the postings list for Caesar. Compute the difference between the postings lists for Brutus and Caesar

54 Difference of two postings lists let mut result = Vec::new(); let mut p1i = 0; let mut p2i = 0; while p1i!= self.docs.len() && p2i!= other.docs.len() { let doc1 = self.docs[p1i]; let doc2 = other.docs[p2i]; } if doc1 == doc2 { p1i += 1; p2i += 1; } else if doc1 < doc2 { result.push(doc1); p1i += 1; } else { p2i += 1; }

55 Difference of two postings lists (continued) if p1i!= self.docs.len() { result.extend_from_slice(&self.docs[p1i..]); }

56 Difference of two postings lists (binary search) let mut inter = Vec::new(); let mut offset = 0; for doc in &self.docs { offset = match other.docs[offset..].binary_search(doc) { Ok(idx) => idx, Err(idx) => { inter.push(*doc); idx } } } Posting { docs: inter }

57 Query optimization

58 Introduction A query can often be processed more quickly by: Changing the processing order; and/or rewriting the query.

59 Processing order Consider the query: Brutus AND Caesar AND Calpuria The AND operator is associative and commutative

60 Processing order Consider the query: Brutus AND Caesar AND Calpuria The AND operator is associative and commutative Different evaluation orders possible: (Brutus AND Caesar) AND Calpuria Brutus AND (Caesar AND Calpuria) (Brutus AND Calpuria) AND Caesar

61 Processing order Consider the query: Brutus AND Caesar AND Calpuria The AND operator is associative and commutative Different evaluation orders possible: (Brutus AND Caesar) AND Calpuria Brutus AND (Caesar AND Calpuria) (Brutus AND Calpuria) AND Caesar The different orders evaluate to the same result, but could not be equally efficient.

62 Processing order Consider the query: Brutus AND Caesar AND Calpurnia Should we process this as: (Brutus AND Caesar) AND Calpurnia; or (Calpurnia AND Brutus) AND Caesar?

63 (Brutus AND Caesar) AND Calpurnia Brutus Caesar Calpurnia Dictionary Postings Let s assume that there are 20 documents containing Caesar. Documents processed: 1. (Brutus AND Caesar): steps = 28 steps 2. 1 AND Calpurnia: up to 8 steps + 4 steps = up to 12 steps Total: up to 40 steps

64 (Calpurnia AND Brutus) AND Caesar Brutus Caesar Calpurnia Dictionary Postings Documents processed: 1. (Calpurnia AND Brutus): steps = 12 steps 2. 1 AND Caesar: up to 4 steps + 20 steps = up to 24 steps Total: up to 36 steps

65 General rule for intersection Process postings lists from small to large. Leads to the smallest intermediate postings lists and therefore likely the least amount of work. If the intermediate postings lists are small, intersection with a binary search pays off.

66 Estimating processing with ORs Consider the query: (madding OR crowd) AND (ignoble OR strife) AND (killed OR slain). In what order can we process the conjuncts? Approximate the disjunction sizes by summing the size of the disjuncts.

67 Query rewriting Consider the query (Exercise 1.5): (Brutus OR Caesar) AND NOT (Antony OR Cleopatra)

68 Query rewriting Consider the query (Exercise 1.5): (Brutus OR Caesar) AND NOT (Antony OR Cleopatra) Not ideal: we first form the larger sets for: Brutus OR Caesar and Antony OR Cleopatra before computing set differences

69 Query rewriting General heuristic: Disjunction high in the expresion tree. Conjunction low in the expression tree. Use De Morgan and distributive laws: (Brutus OR Caesar) AND NOT (Antony OR Cleopatra)

70 Query rewriting General heuristic: Disjunction high in the expresion tree. Conjunction low in the expression tree. Use De Morgan and distributive laws: (Brutus OR Caesar) AND NOT (Antony OR Cleopatra) (Brutus OR Caesar) AND NOT Antony AND NOT Cleopatra

71 Query rewriting General heuristic: Disjunction high in the expresion tree. Conjunction low in the expression tree. Use De Morgan and distributive laws: (Brutus OR Caesar) AND NOT (Antony OR Cleopatra) (Brutus OR Caesar) AND NOT Antony AND NOT Cleopatra (Brutus AND NOT Antony AND NOT Cleopatra) OR (Caesar AND NOT Antony AND NOT Cleopatra)

Information Retrieval

Information Retrieval Introduction to Information Retrieval CS276 Information Retrieval and Web Search Christopher Manning and Prabhakar Raghavan Lecture 1: Boolean retrieval Information Retrieval Information Retrieval (IR)

More information

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

Boolean retrieval & basics of indexing CE-324: Modern Information Retrieval Sharif University of Technology Boolean retrieval & basics of indexing CE-324: Modern Information Retrieval Sharif University of Technology M. Soleymani Fall 2016 Most slides have been adapted from: Profs. Manning, Nayak & Raghavan lectures

More information

Information Retrieval and Organisation

Information Retrieval and Organisation Information Retrieval and Organisation Dell Zhang Birkbeck, University of London 2016/17 IR Chapter 01 Boolean Retrieval Example IR Problem Let s look at a simple IR problem Suppose you own a copy of Shakespeare

More information

CS105 Introduction to Information Retrieval

CS105 Introduction to Information Retrieval CS105 Introduction to Information Retrieval Lecture: Yang Mu UMass Boston Slides are modified from: http://www.stanford.edu/class/cs276/ Information Retrieval Information Retrieval (IR) is finding material

More information

Introduction to Information Retrieval

Introduction to Information Retrieval Introduction to Information Retrieval http://informationretrieval.org IIR 1: Boolean Retrieval Hinrich Schütze Center for Information and Language Processing, University of Munich 2014-04-09 Schütze: Boolean

More information

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

Unstructured Data Management. Advanced Topics in Database Management (INFSCI 2711) Unstructured Data Management Advanced Topics in Database Management (INFSCI 2711) Textbooks: Database System Concepts - 2010 Introduction to Information Retrieval - 2008 Vladimir Zadorozhny, DINS, SCI,

More information

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

boolean queries Inverted index query processing Query optimization boolean model September 9, / 39 boolean model September 9, 2014 1 / 39 Outline 1 boolean queries 2 3 4 2 / 39 taxonomy of IR models Set theoretic fuzzy extended boolean set-based IR models Boolean vector probalistic algebraic generalized

More information

Advanced Retrieval Information Analysis Boolean Retrieval

Advanced Retrieval Information Analysis Boolean Retrieval Advanced Retrieval Information Analysis Boolean Retrieval Irwan Ary Dharmawan 1,2,3 iad@unpad.ac.id Hana Rizmadewi Agustina 2,4 hagustina@unpad.ac.id 1) Development Center of Information System and Technology

More information

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

Boolean retrieval & basics of indexing CE-324: Modern Information Retrieval Sharif University of Technology Boolean retrieval & basics of indexing CE-324: Modern Information Retrieval Sharif University of Technology M. Soleymani Fall 2013 Most slides have been adapted from: Profs. Manning, Nayak & Raghavan (CS-276,

More information

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

Introduction to Information Retrieval and Boolean model. Reference: Introduction to Information Retrieval by C. Manning, P. Raghavan, H. Introduction to Information Retrieval and Boolean model Reference: Introduction to Information Retrieval by C. Manning, P. Raghavan, H. Schutze 1 Unstructured (text) vs. structured (database) data in late

More information

Introduction to Information Retrieval

Introduction to Information Retrieval Introduction to Information Retrieval http://informationretrieval.org IIR 1: Boolean Retrieval Hinrich Schütze Institute for Natural Language Processing, University of Stuttgart 2011-05-03 1/ 36 Take-away

More information

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

Boolean retrieval & basics of indexing CE-324: Modern Information Retrieval Sharif University of Technology Boolean retrieval & basics of indexing CE-324: Modern Information Retrieval Sharif University of Technology M. Soleymani Fall 2015 Most slides have been adapted from: Profs. Manning, Nayak & Raghavan lectures

More information

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

CSE 7/5337: Information Retrieval and Web Search Introduction and Boolean Retrieval (IIR 1) CSE 7/5337: Information Retrieval and Web Search Introduction and Boolean Retrieval (IIR 1) Michael Hahsler Southern Methodist University These slides are largely based on the slides by Hinrich Schütze

More information

Search: the beginning. Nisheeth

Search: the beginning. Nisheeth Search: the beginning Nisheeth Interdisciplinary area Information retrieval NLP Search Machine learning Human factors Outline Components Crawling Processing Indexing Retrieval Evaluation Research areas

More information

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

INFO 4300 / CS4300 Information Retrieval. slides adapted from Hinrich Schütze s, linked from INFO 4300 / CS4300 Information Retrieval slides adapted from Hinrich Schütze s, linked from http://informationretrieval.org/ IR 1: Boolean Retrieval Paul Ginsparg Cornell University, Ithaca, NY 27 Aug

More information

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

CS 572: Information Retrieval. Lecture 2: Hello World! (of Text Search) CS 572: Information Retrieval Lecture 2: Hello World! (of Text Search) 1/13/2016 CS 572: Information Retrieval. Spring 2016 1 Course Logistics Lectures: Monday, Wed: 11:30am-12:45pm, W301 Following dates

More information

Part 2: Boolean Retrieval Francesco Ricci

Part 2: Boolean Retrieval Francesco Ricci Part 2: Boolean Retrieval Francesco Ricci Most of these slides comes from the course: Information Retrieval and Web Search, Christopher Manning and Prabhakar Raghavan Content p Term document matrix p Information

More information

Information Retrieval

Information Retrieval Introduction to Information Retrieval CS276 Information Retrieval and Web Search Pandu Nayak and Prabhakar Raghavan Lecture 1: Boolean retrieval Information Retrieval Information Retrieval (IR) is finding

More information

Introduction to Information Retrieval

Introduction to Information Retrieval Introduction Inverted index Processing Boolean queries Course overview Introduction to Information Retrieval http://informationretrieval.org IIR 1: Boolean Retrieval Hinrich Schütze Institute for Natural

More information

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

Introducing Information Retrieval and Web Search. borrowing from: Pandu Nayak Introducing Information Retrieval and Web Search borrowing from: Pandu Nayak Information Retrieval Information Retrieval (IR) is finding material (usually documents) of an unstructured nature (usually

More information

Information Retrieval

Information Retrieval Information Retrieval Suan Lee - Information Retrieval - 01 Boolean Retrieval 1 01 Boolean Retrieval - Information Retrieval - 01 Boolean Retrieval 2 Introducing Information Retrieval and Web Search -

More information

Information Retrieval

Information Retrieval Introduction to Information Retrieval Information Retrieval and Web Search Lecture 1: Introduction and Boolean retrieval Outline ❶ Course details ❷ Information retrieval ❸ Boolean retrieval 2 Course details

More information

Web Information Retrieval Exercises Boolean query answering. Prof. Luca Becchetti

Web Information Retrieval Exercises Boolean query answering. Prof. Luca Becchetti Web Information Retrieval Exercises Boolean query answering Prof. Luca Becchetti Material rif 3. Christopher D. Manning, Prabhakar Raghavan and Hinrich Schueze, Introduction to Information Retrieval, Cambridge

More information

Information Retrieval and Text Mining

Information Retrieval and Text Mining Information Retrieval and Text Mining http://informationretrieval.org IIR 1: Boolean Retrieval Hinrich Schütze & Wiltrud Kessler Institute for Natural Language Processing, University of Stuttgart 2012-10-16

More information

Lecture 1: Introduction and the Boolean Model

Lecture 1: Introduction and the Boolean Model Lecture 1: Introduction and the Boolean Model Information Retrieval Computer Science Tripos Part II Helen Yannakoudakis 1 Natural Language and Information Processing (NLIP) Group helen.yannakoudakis@cl.cam.ac.uk

More information

Introduction to Information Retrieval

Introduction to Information Retrieval Mustafa Jarrar: Lecture Notes on Information Retrieval University of Birzeit, Palestine 2014 Introduction to Information Retrieval Dr. Mustafa Jarrar Sina Institute, University of Birzeit mjarrar@birzeit.edu

More information

Introduction to Information Retrieval

Introduction to Information Retrieval Introduction to Information Retrieval http://informationretrieval.org IIR 1: Boolean Retrieval Hinrich Schütze Institute for Natural Language Processing, Universität Stuttgart 2008.04.22 Schütze: Boolean

More information

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

Indexing. Lecture Objectives. Text Technologies for Data Science INFR Learn about and implement Boolean search Inverted index Positional index Text Technologies for Data Science INFR11145 Indexing Instructor: Walid Magdy 03-Oct-2017 Lecture Objectives Learn about and implement Boolean search Inverted index Positional index 2 1 Indexing Process

More information

Information Retrieval

Information Retrieval Introduction to Information Retrieval Lecture 6-: Scoring, Term Weighting Outline Why ranked retrieval? Term frequency tf-idf weighting 2 Ranked retrieval Thus far, our queries have all been Boolean. Documents

More information

Information Retrieval

Information Retrieval Information Retrieval Natural Language Processing: Lecture 12 30.11.2017 Kairit Sirts Homework 4 things that seemed to work Bidirectional LSTM instead of unidirectional Change LSTM activation to sigmoid

More information

Information Retrieval

Information Retrieval Introduction to Information Retrieval Boolean retrieval Basic assumptions of Information Retrieval Collection: Fixed set of documents Goal: Retrieve documents with information that is relevant to the user

More information

Classic IR Models 5/6/2012 1

Classic IR Models 5/6/2012 1 Classic IR Models 5/6/2012 1 Classic IR Models Idea Each document is represented by index terms. An index term is basically a (word) whose semantics give meaning to the document. Not all index terms are

More information

Information Retrieval

Information Retrieval Introduction to Information Retrieval CS3245 Information Retrieval Lecture 2: Boolean retrieval 2 Blanks on slides, you may want to fill in Last Time: Ngram Language Models Unigram LM: Bag of words Ngram

More information

Introduction to Information Retrieval

Introduction to Information Retrieval Introduction to Information Retrieval http://informationretrieval.org IIR 5: Index Compression Hinrich Schütze Center for Information and Language Processing, University of Munich 2014-04-17 1/59 Overview

More information

Information Retrieval

Information Retrieval Introduction to Information Retrieval Introducing Information Retrieval and Web Search Information Retrieval Information Retrieval (IR) is finding material (usually documents) of an unstructurednature

More information

Ges$one Avanzata dell Informazione Part A Full- Text Informa$on Management. Full- Text Indexing

Ges$one Avanzata dell Informazione Part A Full- Text Informa$on Management. Full- Text Indexing Ges$one Avanzata dell Informazione Part A Full- Text Informa$on Management Full- Text Indexing Contents } Introduction } Inverted Indices } Construction } Searching 2 GAvI - Full- Text Informa$on Management:

More information

CSCI 5417 Information Retrieval Systems! What is Information Retrieval?

CSCI 5417 Information Retrieval Systems! What is Information Retrieval? CSCI 5417 Information Retrieval Systems! Lecture 1 8/23/2011 Introduction 1 What is Information Retrieval? Information retrieval is the science of searching for information in documents, searching for

More information

1Boolean retrieval. information retrieval. term search is quite ambiguous, but in context we use the two synonymously.

1Boolean retrieval. information retrieval. term search is quite ambiguous, but in context we use the two synonymously. 1Boolean retrieval information retrieval The meaning of the term information retrieval (IR) can be very broad. Just getting a credit card out of your wallet so that you can type in the card number is a

More information

Preliminary draft (c)2006 Cambridge UP

Preliminary draft (c)2006 Cambridge UP It is a common fallacy, underwritten at this date by the investment of several million dollars in a variety of retrieval hardware, that the algebra of George Boole (1847) is the appropriate formalism for

More information

Informa(on Retrieval

Informa(on Retrieval Introduc)on to Informa(on Retrieval cs160 Introduction David Kauchak adapted from: h6p://www.stanford.edu/class/cs276/handouts/lecture1 intro.ppt Introduc)ons Name/nickname Dept., college and year One

More information

Information Retrieval

Information Retrieval Introduction to Information Retrieval Lecture 1: Boolean retrieval 1 Sec. 1.1 Unstructured data in 1680 Which plays of Shakespeare contain the words Brutus AND Caesar but NOT Calpurnia? One could grep

More information

Introduction to Information Retrieval IIR 1: Boolean Retrieval

Introduction to Information Retrieval IIR 1: Boolean Retrieval .. Introduction to Information Retrieval IIR 1: Boolean Retrieval Mihai Surdeanu (Based on slides by Hinrich Schütze at informationretrieval.org) Fall 2014 Boolean Retrieval 1 / 77 Take-away Why you should

More information

Lecture 1: Introduction and Overview

Lecture 1: Introduction and Overview Lecture 1: Introduction and Overview Information Retrieval Computer Science Tripos Part II Simone Teufel Natural Language and Information Processing (NLIP) Group Simone.Teufel@cl.cam.ac.uk Lent 2014 1

More information

Information Retrieval

Information Retrieval Information Retrieval Suan Lee - Information Retrieval - 06 Scoring, Term Weighting and the Vector Space Model 1 Recap of lecture 5 Collection and vocabulary statistics: Heaps and Zipf s laws Dictionary

More information

Behrang Mohit : txt proc! Review. Bag of word view. Document Named

Behrang Mohit : txt proc! Review. Bag of word view. Document  Named Intro to Text Processing Lecture 9 Behrang Mohit Some ideas and slides in this presenta@on are borrowed from Chris Manning and Dan Jurafsky. Review Bag of word view Document classifica@on Informa@on Extrac@on

More information

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

Data-analysis and Retrieval Boolean retrieval, posting lists and dictionaries Data-analysis and Retrieval Boolean retrieval, posting lists and dictionaries Hans Philippi (based on the slides from the Stanford course on IR) April 25, 2018 Boolean retrieval, posting lists & dictionaries

More information

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

INFO 4300 / CS4300 Information Retrieval. slides adapted from Hinrich Schütze s, linked from INFO 4300 / CS4300 Information Retrieval slides adapted from Hinrich Schütze s, linked from http://informationretrieval.org/ IR 6: Index Compression Paul Ginsparg Cornell University, Ithaca, NY 15 Sep

More information

PV211: Introduction to Information Retrieval https://www.fi.muni.cz/~sojka/pv211

PV211: Introduction to Information Retrieval https://www.fi.muni.cz/~sojka/pv211 PV211: Introduction to Information Retrieval https://www.fi.muni.cz/~sojka/pv211 IIR 1: Boolean Retrieval Handout version Petr Sojka, Hinrich Schütze et al. Faculty of Informatics, Masaryk University,

More information

Models for Document & Query Representation. Ziawasch Abedjan

Models for Document & Query Representation. Ziawasch Abedjan Models for Document & Query Representation Ziawasch Abedjan Overview Introduction & Definition Boolean retrieval Vector Space Model Probabilistic Information Retrieval Language Model Approach Summary Overview

More information

A brief introduction to Information Retrieval

A brief introduction to Information Retrieval 1/64 A brief introduction to Information Retrieval Mark Johnson Department of Computing Macquarie University 2/64 Readings for today s talk Natural Language Processing: Analyzing Text with Python and the

More information

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

Querying Introduction to Information Retrieval INF 141 Donald J. Patterson. Content adapted from Hinrich Schütze Introduction to Information Retrieval INF 141 Donald J. Patterson Content adapted from Hinrich Schütze http://www.informationretrieval.org Overview Boolean Retrieval Weighted Boolean Retrieval Zone Indices

More information

Information Retrieval. Chap 8. Inverted Files

Information Retrieval. Chap 8. Inverted Files Information Retrieval Chap 8. Inverted Files Issues of Term-Document Matrix 500K x 1M matrix has half-a-trillion 0 s and 1 s Usually, no more than one billion 1 s Matrix is extremely sparse 2 Inverted

More information

Text Retrieval and Web Search IIR 1: Boolean Retrieval

Text Retrieval and Web Search IIR 1: Boolean Retrieval Text Retrieval and Web Search IIR 1: Boolean Retrieval Mihai Surdeanu (Based on slides by Hinrich Schütze at informationretrieval.org) Spring 2017 Boolean Retrieval 1 / 88 Take-away Why you should take

More information

Introduction to Information Retrieval

Introduction to Information Retrieval Boolean model and Inverted index Processing Boolean queries Why ranked retrieval? Introduction to Information Retrieval http://informationretrieval.org IIR 1: Boolean Retrieval Hinrich Schütze Institute

More information

Recap: lecture 2 CS276A Information Retrieval

Recap: lecture 2 CS276A Information Retrieval Recap: lecture 2 CS276A Information Retrieval Stemming, tokenization etc. Faster postings merges Phrase queries Lecture 3 This lecture Index compression Space estimation Corpus size for estimates Consider

More information

CS347. Lecture 2 April 9, Prabhakar Raghavan

CS347. Lecture 2 April 9, Prabhakar Raghavan CS347 Lecture 2 April 9, 2001 Prabhakar Raghavan Today s topics Inverted index storage Compressing dictionaries into memory Processing Boolean queries Optimizing term processing Skip list encoding Wild-card

More information

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

Today s topics CS347. Inverted index storage. Inverted index storage. Processing Boolean queries. Lecture 2 April 9, 2001 Prabhakar Raghavan Today s topics CS347 Lecture 2 April 9, 2001 Prabhakar Raghavan Inverted index storage Compressing dictionaries into memory Processing Boolean queries Optimizing term processing Skip list encoding Wild-card

More information

FRONT CODING. Front-coding: 8automat*a1 e2 ic3 ion. Extra length beyond automat. Encodes automat. Begins to resemble general string compression.

FRONT CODING. Front-coding: 8automat*a1 e2 ic3 ion. Extra length beyond automat. Encodes automat. Begins to resemble general string compression. Sec. 5.2 FRONT CODING Front-coding: Sorted words commonly have long common prefix store differences only (for last k-1 in a block of k) 8automata8automate9automatic10automation 8automat*a1 e2 ic3 ion Encodes

More information

Information Retrieval CS Lecture 06. Razvan C. Bunescu School of Electrical Engineering and Computer Science

Information Retrieval CS Lecture 06. Razvan C. Bunescu School of Electrical Engineering and Computer Science Information Retrieval CS 6900 Lecture 06 Razvan C. Bunescu School of Electrical Engineering and Computer Science bunescu@ohio.edu Boolean Retrieval vs. Ranked Retrieval Many users (professionals) prefer

More information

Index extensions. Manning, Raghavan and Schütze, Chapter 2. Daniël de Kok

Index extensions. Manning, Raghavan and Schütze, Chapter 2. Daniël de Kok Index extensions Manning, Raghavan and Schütze, Chapter 2 Daniël de Kok Today We will discuss some extensions to the inverted index to accommodate boolean processing: Skip pointers: improve performance

More information

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

EECS 395/495 Lecture 3 Scalable Indexing, Searching, and Crawling EECS 395/495 Lecture 3 Scalable Indexing, Searching, and Crawling Doug Downey Based partially on slides by Christopher D. Manning, Prabhakar Raghavan, Hinrich Schütze Announcements Project progress report

More information

F INTRODUCTION TO WEB SEARCH AND MINING. Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University

F INTRODUCTION TO WEB SEARCH AND MINING. Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University F033583 INTRODUCTION TO WEB SEARCH AND MINING Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University KENNY Q. ZHU Research Interests: Degrees: Postdoc: Experiences: Data & Knowledge Engineering

More information

Informa(on Retrieval

Informa(on Retrieval Introduc)on to Informa)on Retrieval CS3245 Informa(on Retrieval Lecture 7: Scoring, Term Weigh9ng and the Vector Space Model 7 Last Time: Index Construc9on Sort- based indexing Blocked Sort- Based Indexing

More information

Information Retrieval. Danushka Bollegala

Information Retrieval. Danushka Bollegala 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

More information

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

More on indexing CE-324: Modern Information Retrieval Sharif University of Technology More on indexing CE-324: Modern Information Retrieval Sharif University of Technology M. Soleymani Fall 2014 Most slides have been adapted from: Profs. Manning, Nayak & Raghavan (CS-276, Stanford) Plan

More information

Overview of Information Retrieval and Organization. CSC 575 Intelligent Information Retrieval

Overview of Information Retrieval and Organization. CSC 575 Intelligent Information Retrieval Overview of Information Retrieval and Organization CSC 575 Intelligent Information Retrieval 2 How much information? Google: ~100 PB a day; 1+ million servers (est. 15-20 Exabytes stored) Wayback Machine

More information

Query Answering Using Inverted Indexes

Query Answering Using Inverted Indexes Query Answering Using Inverted Indexes Inverted Indexes Query Brutus AND Calpurnia J. Pei: Information Retrieval and Web Search -- Query Answering Using Inverted Indexes 2 Document-at-a-time Evaluation

More information

Data Modelling and Multimedia Databases M

Data Modelling and Multimedia Databases M ALMA MATER STUDIORUM - UNIERSITÀ DI BOLOGNA Data Modelling and Multimedia Databases M International Second cycle degree programme (LM) in Digital Humanities and Digital Knoledge (DHDK) University of Bologna

More information

The Web document collection

The Web document collection Web Data Management Part 1 Advanced Topics in Database Management (INFSCI 2711) Textbooks: Database System Concepts - 2010 Introduction to Information Retrieval - 2008 Vladimir Zadorozhny, DINS, SCI, University

More information

Information Retrieval

Information Retrieval Information Retrieval Suan Lee - Information Retrieval - 04 Index Construction 1 04 Index Construction - Information Retrieval - 04 Index Construction 2 Plan Last lecture: Dictionary data structures Tolerant

More information

- Content-based Recommendation -

- Content-based Recommendation - - Content-based Recommendation - Institute for Software Technology Inffeldgasse 16b/2 A-8010 Graz Austria 1 Content-based recommendation While CF methods do not require any information about the items,

More information

Information Retrieval

Information Retrieval Introduction to Information Retrieval Lecture 4: Index Construction 1 Plan Last lecture: Dictionary data structures Tolerant retrieval Wildcards Spell correction Soundex a-hu hy-m n-z $m mace madden mo

More information

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

Boolean retrieval & basics of indexing CE-324: Modern Information Retrieval Sharif University of Technology Boolean retrieval & basics of indexing CE-324: Modern Information Retrieval Sharif University of Technology M. Soleymani Fall 2014 Most slides have been adapted from: Profs. Manning, Nayak & Raghavan (CS-276,

More information

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

Efficiency. Efficiency: Indexing. Indexing. Efficiency Techniques. Inverted Index. Inverted Index (COSC 488) Efficiency Efficiency: Indexing (COSC 488) Nazli Goharian nazli@cs.georgetown.edu Difficult to analyze sequential IR algorithms: data and query dependency (query selectivity). O(q(cf max )) -- high estimate-

More information

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

Text Analytics. Index-Structures for Information Retrieval. Ulf Leser Text Analytics Index-Structures for Information Retrieval Ulf Leser Content of this Lecture Inverted files Storage structures Phrase and proximity search Building and updating the index Using a RDBMS Ulf

More information

60-538: Information Retrieval

60-538: Information Retrieval 60-538: Information Retrieval September 7, 2017 1 / 48 Outline 1 what is IR 2 3 2 / 48 Outline 1 what is IR 2 3 3 / 48 IR not long time ago 4 / 48 5 / 48 now IR is mostly about search engines there are

More information

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

Index construction CE-324: Modern Information Retrieval Sharif University of Technology Index construction CE-324: Modern Information Retrieval Sharif University of Technology M. Soleymani Fall 2014 Most slides have been adapted from: Profs. Manning, Nayak & Raghavan (CS-276, Stanford) Ch.

More information

Inverted Indexes. Indexing and Searching, Modern Information Retrieval, Addison Wesley, 2010 p. 5

Inverted Indexes. Indexing and Searching, Modern Information Retrieval, Addison Wesley, 2010 p. 5 Inverted Indexes Indexing and Searching, Modern Information Retrieval, Addison Wesley, 2010 p. 5 Basic Concepts Inverted index: a word-oriented mechanism for indexing a text collection to speed up the

More information

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

Introduction to. CS276: Information Retrieval and Web Search Christopher Manning and Prabhakar Raghavan. Lecture 4: Index Construction Introduction to Information Retrieval CS276: Information Retrieval and Web Search Christopher Manning and Prabhakar Raghavan Lecture 4: Index Construction 1 Plan Last lecture: Dictionary data structures

More information

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

Administrative. Distributed indexing. Index Compression! What I did last summer lunch talks today. Master. Tasks Administrative Index Compression! n Assignment 1? n Homework 2 out n What I did last summer lunch talks today David Kauchak cs458 Fall 2012 adapted from: http://www.stanford.edu/class/cs276/handouts/lecture5-indexcompression.ppt

More information

Corso di Biblioteche Digitali

Corso di Biblioteche Digitali Corso di Biblioteche Digitali Vittore Casarosa casarosa@isti.cnr.it tel. 050-315 3115 cell. 348-397 2168 Ricevimento dopo la lezione o per appuntamento Valutazione finale 70-75% esame orale 25-30% progetto

More information

CSE100. Advanced Data Structures. Lecture 21. (Based on Paul Kube course materials)

CSE100. Advanced Data Structures. Lecture 21. (Based on Paul Kube course materials) CSE100 Advanced Data Structures Lecture 21 (Based on Paul Kube course materials) CSE 100 Collision resolution strategies: linear probing, double hashing, random hashing, separate chaining Hash table cost

More information

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

3-2. Index construction. Most slides were adapted from Stanford CS 276 course and University of Munich IR course. 3-2. Index construction Most slides were adapted from Stanford CS 276 course and University of Munich IR course. 1 Ch. 4 Index construction How do we construct an index? What strategies can we use with

More information

This lecture. Introduction to information retrieval. Making money with information retrieval. Some technical basics. Link analysis.

This lecture. Introduction to information retrieval. Making money with information retrieval. Some technical basics. Link analysis. This lecture Introduction to information retrieval. Making money with information retrieval. Some technical basics. Link analysis. CSC401/2511 Spring 2017 2 Information retrieval systems Information retrieval

More information

An Introduction to Information Retrieval. Draft of April 15, Preliminary draft (c)2007 Cambridge UP

An Introduction to Information Retrieval. Draft of April 15, Preliminary draft (c)2007 Cambridge UP An Introduction to Information Retrieval Draft of April 15, 2007 An Introduction to Information Retrieval Christopher D. Manning Prabhakar Raghavan Hinrich Schütze Cambridge University Press Cambridge,

More information

Introduction to Information Retrieval

Introduction to Information Retrieval Introduction to Information Retrieval http://informationretrieval.org IIR 4: Index Construction Hinrich Schütze, Christina Lioma Institute for Natural Language Processing, University of Stuttgart 2010-05-04

More information

An Introduction to Information Retrieval. Draft of August 14, Preliminary draft (c)2007 Cambridge UP

An Introduction to Information Retrieval. Draft of August 14, Preliminary draft (c)2007 Cambridge UP An Introduction to Information Retrieval Draft of August 14, 2007 An Introduction to Information Retrieval Christopher D. Manning Prabhakar Raghavan Hinrich Schütze Cambridge University Press Cambridge,

More information

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

Index construction CE-324: Modern Information Retrieval Sharif University of Technology Index construction CE-324: Modern Information Retrieval Sharif University of Technology M. Soleymani Fall 2016 Most slides have been adapted from: Profs. Manning, Nayak & Raghavan (CS-276, Stanford) Ch.

More information

Introduction to Information Retrieval

Introduction to Information Retrieval Introduction to Information Retrieval http://informationretrieval.org IIR 4: Index Construction Hinrich Schütze Center for Information and Language Processing, University of Munich 2014-04-16 Schütze:

More information

Indexing and Searching

Indexing and Searching Indexing and Searching Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University References: 1. Modern Information Retrieval, chapter 8 2. Information Retrieval:

More information

Vector Space Models. Jesse Anderton

Vector Space Models. Jesse Anderton Vector Space Models Jesse Anderton CS6200: Information Retrieval In the first module, we introduced Vector Space Models as an alternative to Boolean Retrieval. This module discusses VSMs in a lot more

More information

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

Text Analytics. Index-Structures for Information Retrieval. Ulf Leser Text Analytics Index-Structures for Information Retrieval Ulf Leser Content of this Lecture Inverted files Storage structures Phrase and proximity search Building and updating the index Using a RDBMS Ulf

More information

Introduction to Information Retrieval

Introduction to Information Retrieval Introduction to Information Retrieval CS276: Information Retrieval and Web Search Pandu Nayak and Prabhakar Raghavan Hamid Rastegari Lecture 4: Index Construction Plan Last lecture: Dictionary data structures

More information

An Introduction to Information Retrieval. Draft of March 1, Preliminary draft (c)2007 Cambridge UP

An Introduction to Information Retrieval. Draft of March 1, Preliminary draft (c)2007 Cambridge UP An Introduction to Information Retrieval Draft of March 1, 2007 An Introduction to Information Retrieval Christopher D. Manning Prabhakar Raghavan Hinrich Schütze Cambridge University Press Cambridge,

More information

Information Retrieval Tutorial 1: Boolean Retrieval

Information Retrieval Tutorial 1: Boolean Retrieval Information Retrieval Tutorial 1: Boolean Retrieval Professor: Michel Schellekens TA: Ang Gao University College Cork 2012-10-26 Boolean Retrieval 1 / 19 Outline 1 Review 2 Boolean Retrieval 2 / 19 Definition

More information

Introduction to Information Retrieval (Manning, Raghavan, Schutze)

Introduction to Information Retrieval (Manning, Raghavan, Schutze) Introduction to Information Retrieval (Manning, Raghavan, Schutze) Chapter 3 Dictionaries and Tolerant retrieval Chapter 4 Index construction Chapter 5 Index compression Content Dictionary data structures

More information

Information Retrieval

Information Retrieval Information Retrieval Dictionaries & Tolerant Retrieval Gintarė Grigonytė gintare@ling.su.se Department of Linguistics and Philology Uppsala University Slides based on previous IR course given by Jörg

More information

An Introduction to Information Retrieval. Draft of March 5, Preliminary draft (c)2007 Cambridge UP

An Introduction to Information Retrieval. Draft of March 5, Preliminary draft (c)2007 Cambridge UP An Introduction to Information Retrieval Draft of March 5, 2007 An Introduction to Information Retrieval Christopher D. Manning Prabhakar Raghavan Hinrich Schütze Cambridge University Press Cambridge,

More information

Information Technology for Documentary Data Representation

Information Technology for Documentary Data Representation ALMA MATER STUDIORUM - UNIVERSITÀ DI BOLOGNA Information Technology for Documentary Data Representation Laurea Magistrale in Scienze del Libro e del Documento University of Bologna Textual Information

More information