Advanced Retrieval Information Analysis Boolean Retrieval

Similar documents
Information Retrieval

Information Retrieval

Information Retrieval

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

Information Retrieval

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

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

Information Retrieval

Information Retrieval

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

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

Introduction to Information Retrieval

CS105 Introduction to Information Retrieval

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

Introduction to Information Retrieval

Part 2: Boolean Retrieval Francesco Ricci

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

Information Retrieval

Search: the beginning. Nisheeth

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

CS60092: Informa0on Retrieval. Sourangshu Bha<acharya

Information Retrieval

Introduction to Information Retrieval

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

Classic IR Models 5/6/2012 1

CSCI 5417 Information Retrieval Systems! What is Information Retrieval?

Information Retrieval and Text Mining

Introduction to Information Retrieval

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

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

Informa(on Retrieval

Information Retrieval and Organisation

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

Preliminary draft (c)2006 Cambridge UP

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

Information Retrieval

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

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

Lecture 1: Introduction and the Boolean Model

Introduction to Information Retrieval IIR 1: Boolean Retrieval

Introduction to Information Retrieval

PV211: Introduction to Information Retrieval

Lecture 1: Introduction and Overview

CS347. Lecture 2 April 9, Prabhakar Raghavan

A brief introduction to Information Retrieval

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

Information Retrieval. Chap 8. Inverted Files

Text Retrieval and Web Search IIR 1: Boolean Retrieval

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

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

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

Recap: lecture 2 CS276A Information Retrieval

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

Models for Document & Query Representation. Ziawasch Abedjan

Information Retrieval Tutorial 1: Boolean Retrieval

CSCI 5417 Information Retrieval Systems Jim Martin!

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

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

Information Retrieval

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

Introduction to Information Retrieval

COSC572 GUEST LECTURE - PROF. GRACE HUI YANG INTRODUCTION TO INFORMATION RETRIEVAL NOV 2, 2016

Information Retrieval

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

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

60-538: Information Retrieval

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

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

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

Index Construction. Slides by Manning, Raghavan, Schutze

Information Retrieval

Course structure & admin. CS276A Text Information Retrieval, Mining, and Exploitation. Dictionary and postings files: a fast, compact inverted index

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

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

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

Index Construction 1

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

Corso di Biblioteche Digitali

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

Introduction to Computational Advertising. MS&E 239 Stanford University Autumn 2010 Instructors: Andrei Broder and Vanja Josifovski

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

Introduction to Information Retrieval

Introduc)on to. CS60092: Informa0on Retrieval

A Closeup View. Class Overview CSE 454. Relevance. Retrieval Model Overview. 10/19 IR & Indexing 10/21 Google & Alta.

Information Retrieval CSCI

Information Retrieval

Information Retrieval

2018 EE448, Big Data Mining, Lecture 8. Search Engines. Weinan Zhang Shanghai Jiao Tong University

Data Modelling and Multimedia Databases M

Outline of the course

Information Retrieval and Web Search

Information Technology for Documentary Data Representation

Information Retrieval

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

Information Retrieval. Information Retrieval and Web Search

CS 572: Information Retrieval. Lecture 1: Course Overview and Introduction 11 January 2016

Introduction to Information Retrieval

Transcription:

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 for Education and Management (DCISTEM), Universitas Padjadjaran 2) Center of e-learning e Development, Universitas Padjadjaran 3) Department of Physics, Faculty of Mathematics and Natural Sciences, es, Universitas Padjadjaran 4) Faculty of Nursing, Universitas Padjadjaran

Sources Introduction to Information Retrieval,, Manning, Raghavan, Schuetze.. Cambridge University Press, 2008 Information Extraction:Algorithms and Prospects in a Retrieval Context, Moens,, Springer 2006

Definition Information retrieval (IR) is finding material (usually documents) of an unstructured nature (usually text) that satisfies an information need from within large collections (usually stored on computers). Used to be an activity for librarians, paralegals and similar professional searchers

New Trends Hundreds of millions of people engage in information retrieval every day when they use a web search engine or search their email. Information retrieval is fast becoming the dominant form of information access, overtaking traditional database style searching IR = search

Field of IR Cover supporting users in browsing or filtering documents collections or further processing a set of retrieved documents given a set of documents, clustering is the task of coming up with a good grouping of the documents based on their contents Similar to arranging books on a books shelf according to their topic given a set of topics, standing information needs, or other categories

Unstructured data in 1860 Which plays of Shakespeare contain the words Brutus AND Caesar but NOT Calpurnia? One could grep all of Shakespeare s s plays for Brutus and Caesar, then strip out lines containing Calpurnia? Why is that not the answer? Slow (for large corpora) NOT Calpurnia is non-trivial Other operations (e.g., find the word Romans near countrymen) ) not feasible Ranked retrieval (best documents to return)

Term document incidence Antony and Cleopatra Julius Caesar The Tempest Hamlet Othello Macbeth Antony 1 1 0 0 0 1 Brutus 1 1 0 1 0 0 Caesar 1 1 0 1 1 1 Calpurnia 0 1 0 0 0 0 Cleopatra 1 0 0 0 0 0 mercy 1 0 1 1 1 1 worser 1 0 1 1 1 0 Brutus AND Caesar BUT NOT Calpurnia 1 if play contains word,, 0 otherwise

Incidence Vector So we have a 0/1 vector for each term. To answer query: take the vectors for Brutus, Caesar and Calpurnia (complemented) bitwise AND. 110100 AND 110111 AND 101111 = 100100.

Answer to Query Antony and Cleopatra, Act III, Scene ii Agrippa [Aside to DOMITIUS ENOBARBUS]: Why, Enobarbus, When Antony found Julius Caesar dead, He cried almost to roaring; and he wept When at Philippi he found Brutus slain. Hamlet, Act III, Scene ii Lord Polonius:I I did enact Julius Caesar I was killed i' the Capitol; Brutus killed me.

Basic Assumptions of Information Retrieval Collection: : Fixed set of documents Goal: : Retrieve documents with information that is relevant to the user s information need and helps the user complete a task

Classic Search Model TASK Info Need Verbal form Query Misconception? Mistranslation? Misformulation? Get rid of mice in a politically correct way Info about removing mice without killing them How do I trap mice alive? mouse trap SEARCH ENGINE Query Refinement Results Corpus

How Good are Retrieved Docs Precision : Fraction of retrieved docs that are relevant to user s s information need Recall : Fraction of relevant docs in collection that are retrieved

Bigger Collections Consider N = 1 million documents, each with about 1000 words. Avg 6 bytes/word including spaces/punctuation 6GB of data in the documents. Say there are M = 500K distinct terms among these.

Can t t build the Matrix 500K x 1M matrix has half-a-trillion 0 s 0s and 1 s. But it has no more than one billion 1 s. 1 matrix is extremely sparse. What s s a better representation? We only record the 1 positions.

Inverted Index For each termt, we must store a list of all documents that contain t. Identify each by a docid,, a document serial number Can we used fixed-size arrays for this? Brutus Caesar 1 2 4 5 6 16 57 132 Calpurnia 1 2 4 11 31 45 173174 2 31 54101 What happens if the word Caesar is added to document 14?

Inverted Index We need variable-size postings lists On disk, a continuous run of postings is normal and best In memory, can use linked lists or variable length arrays Brutus Some tradeoffs in size/ease of insertion Caesar 1 2 4 5 6 16 57 132 Calpurnia 1 2 4 11 31 45 173174 2 31 54101 Dictionary Postings Sorted by docid

Inverted Index Construction Documents to be indexed. Friends, Romans, countrymen. Tokenizer Token stream. Friends Romans Countrymen Linguistic modules Modified tokens. friend roman countryman Inverted index. Indexer friend roman countryman 2 4 1 2 13 16

Indexer Step : Token Sequence Sequence of (Modified token, Document ID) pairs. Doc 1 I did enact Julius Caesar I was killed i' the Capitol; Brutus killed me. Doc 2 So let it be with Caesar. The noble Brutus hath told you Caesar was ambitious

Indexer Step : Sort Sort by terms And then docid Core indexing step

Indexer Steps : Dictionary and Postings Multiple term entries in a single document are merged. Split into Dictionary and Postings Doc. frequency information is added.

Where do we pay in Storage? Lists of docids Terms and counts Pointers Later in the course: How do we index efficiently? How much storage do we need? 21

Query Processing : AND Consider processing the query: Brutus AND Caesar Locate Brutus in the Dictionary; Retrieve its postings. Locate Caesar in the Dictionary; Retrieve its postings. Merge the two postings: 2 4 8 16 32 64 1 2 3 5 8 13 21 128 34 Brutus Caesar

The Merge Walk through the two postings simultaneously, in time linear in the total number of postings entries 2 8 2 4 8 16 32 64 1 2 3 5 8 13 21 128 34 If the list lengths are x and y, the merge takes O(x+y) operations. Crucial: postings sorted by docid.

Intersecting two posting lists (merge algorithm)

Boolean Queries : Exact Match The Boolean retrieval model is being able to ask a query that is a Boolean expression: Boolean Queries are queries using AND, OR and NOT to join query terms Views each document as a set of words Is precise: document matches condition or not. Perhaps the simplest model to build an IR system on Primary commercial retrieval tool for 3 decades. Many search systems you still use are Boolean: Email, library catalog, Mac OS X Spotlight

Boolean Queries : More general Merges Exercise: : Adapt the merge for the queries: Brutus AND NOT Caesar Brutus OR NOT Caesar Can we still run through the merge in time O(x+y x+y)? What can we achieve?

Merging What about an arbitrary Boolean formula? (Brutus OR Caesar) AND NOT (Antony OR Cleopatra) Can we always merge in linear time? Linear in what? Can we do better?

Query Optimization What is the best order for query processing? Consider a query that is an AND ofn terms. For each of then terms, get its postings, then AND them together. Brutus Caesar Calpurnia 2 4 8 16 32 64 128 1 2 3 5 8 16 21 34 13 16 Query: Brutus AND Calpurnia AND Caesar

Example Process in order of increasing freq: start with smallest set, then keep cutting further. This is why we kept document freq. in dictionary Brutus Caesar Calpurnia 2 4 8 16 32 64 128 1 2 3 5 8 16 21 34 13 16 Execute the query as (Calpurnia AND Brutus) AND Caesar.

More General Optimization e.g., (madding OR crowd) ) AND (ignoble( OR strife) Get doc. freq. s for all terms. Estimate the size of each OR by the sum of its doc. freq. s (conservative). Process in increasing order of OR sizes.

Query Processing Exercise Exercise: : If the query is friends AND romans AND (NOT countrymen), how could we use the freq of countrymen? Exercise: : Extend the merge to an arbitrary Boolean query. Can we always guarantee execution in time linear in the total postings size? Hint: : Begin with the case of a Boolean formula query: in this, each query term appears only once in the query.