Web-based Information Architecture 01: Boolean Retrieval Hongfei Yan School of EECS, Peking University 2/27/2013.

Slides:



Advertisements
Similar presentations
Advanced topics in Computer Science Jiaheng Lu Department of Computer Science Renmin University of China
Advertisements

Introduction to Information Retrieval Introduction to Information Retrieval Hinrich Schütze and Christina Lioma Lecture 1: Boolean Retrieval 1.
CS276A Text Retrieval and Mining Lecture 1. Query Which plays of Shakespeare contain the words Brutus AND Caesar but NOT Calpurnia? One could grep all.
Adapted from Information Retrieval and Web Search
Srihari-CSE535-Spring2008 CSE 535 Information Retrieval Lecture 2: Boolean Retrieval Model.
Boolean Retrieval Lecture 2: Boolean Retrieval Web Search and Mining.
CpSc 881: Information Retrieval
Information Retrieval
CS276 Information Retrieval and Web Search Lecture 1: Boolean retrieval.
Information Retrieval using the Boolean Model. Query Which plays of Shakespeare contain the words Brutus AND Caesar but NOT Calpurnia? Could grep all.
Srihari-CSE535-Spring2008 CSE 535 Information Retrieval Chapter 1: Introduction to IR.
PrasadL3InvertedIndex1 Inverted Index Construction Adapted from Lectures by Prabhakar Raghavan (Yahoo and Stanford) and Christopher Manning (Stanford)
Introducing Information Retrieval and Web Search
PrasadL3InvertedIndex1 Inverted Index Construction Adapted from Lectures by Prabhakar Raghavan (Yahoo and Stanford) and Christopher Manning (Stanford)
Introduction to Information Retrieval (Manning, Raghavan, Schutze) Chapter 1 Boolean retrieval.
Information Retrieval and Data Mining (AT71. 07) Comp. Sc. and Inf
Introduction to Information Retrieval Introduction to Information Retrieval cs458 Introduction David Kauchak adapted from:
LIS618 lecture 2 the Boolean model Thomas Krichel
Introduction to Information Retrieval Introduction to Information Retrieval Modified from Stanford CS276 slides Chap. 1: Boolean retrieval.
Modern Information Retrieval Lecture 3: Boolean Retrieval.
Information retrieval 1 Boolean retrieval. Information retrieval (IR) is finding material (usually documents) of an unstructured nature (usually text)
Introduction to Information Retrieval Introduction to Information Retrieval COMP4201 Information Retrieval and Search Engines Lecture 1 Boolean retrieval.
IR Paolo Ferragina Dipartimento di Informatica Università di Pisa.
ITCS 6265 IR & Web Mining ITCS 6265/8265: Advanced Topics in KDD --- Information Retrieval and Web Mining Lecture 1 Boolean retrieval UNC Charlotte, Fall.
Text Retrieval and Text Databases Based on Christopher and Raghavan’s slides.
Introduction to Information Retrieval Introduction to Information Retrieval CS276 Information Retrieval and Web Search Pandu Nayak and Prabhakar Raghavan.
Introduction to Information Retrieval Introduction to Information Retrieval CS276 Information Retrieval and Web Search Christopher Manning and Prabhakar.
CES 514 – Data Mining Lec 2, Feb 10 Spring 2010 Sonoma State University.
1 CS276 Information Retrieval and Web Search Lecture 1: Introduction.
Introduction to Information Retrieval CSE 538 MRS BOOK – CHAPTER I Boolean Model 1.
Information Retrieval Lecture 1. Query Which plays of Shakespeare contain the words Brutus AND Caesar but NOT Calpurnia? Could grep all of Shakespeare’s.
Introduction to Information Retrieval Introduction to Information Retrieval CS276 Information Retrieval and Web Search Christopher Manning and Prabhakar.
1 Information Retrieval Tanveer J Siddiqui J K Institute of Applied Physics & Technology University of Allahabad.
1. L01: Corpuses, Terms and Search Basic terminology The need for unstructured text search Boolean Retrieval Model Algorithms for compressing data Algorithms.
1 Information Retrieval LECTURE 1 : Introduction.
Introduction to Information Retrieval Introduction to Information Retrieval Modified from Stanford CS276 slides Chap. 1: Boolean retrieval.
Introduction to Information Retrieval Introduction to Information Retrieval cs160 Introduction David Kauchak adapted from:
Introduction to Information Retrieval Boolean Retrieval.
CS276 Information Retrieval and Web Search Lecture 1: Boolean retrieval.
Introduction to Information Retrieval Introduction to Information Retrieval Lecture 1: Boolean retrieval.
Information Retrieval and Web Search Boolean retrieval Instructor: Rada Mihalcea (Note: some of the slides in this set have been adapted from a course.
Web Information Retrieval Textbook by Christopher D. Manning, Prabhakar Raghavan, and Hinrich Schutze Notes Revised by X. Meng for SEU May 2014.
Introduction to Information Retrieval Introduction to Information Retrieval Introducing Information Retrieval and Web Search.
Introduction to Information Retrieval Introducing Information Retrieval and Web Search.
Module 2: Boolean retrieval. Introduction to Information Retrieval Information Retrieval  Information Retrieval (IR) is finding material (usually documents)
CS315 Introduction to Information Retrieval Boolean Search 1.
CS 6633 資訊檢索 Information Retrieval and Web Search Lecture 1: Boolean retrieval Based on a ppt file by HinrichSchütze.
Introduction to Information Retrieval Introduction to Information Retrieval CS276 Information Retrieval and Web Search Christopher Manning and Prabhakar.
Take-away Administrativa
Information Retrieval : Intro
Large Scale Search: Inverted Index, etc.
CS122B: Projects in Databases and Web Applications Winter 2017
Lecture 1: Introduction and the Boolean Model Information Retrieval
Introduction to Information Retrieval
COIS 442 Foundations on IR Information Retrieval and Web Search
Slides from Book: Christopher D
정보 검색 특론 Information Retrieval and Web Search
Boolean Retrieval.
Information Retrieval and Data Mining (AT71. 07) Comp. Sc. and Inf
Boolean Retrieval.
Information Retrieval and Web Search Lecture 1: Boolean retrieval
Information Retrieval
Boolean Retrieval.
Introduction to Information Retrieval
Introducing Information Retrieval and Web Search
CS276 Information Retrieval and Web Search
Introducing Information Retrieval and Web Search
INFORMATION RETRIEVAL TECHNIQUES BY DR. ADNAN ABID
Inverted Index Construction
Introducing Information Retrieval and Web Search
Presentation transcript:

Web-based Information Architecture 01: Boolean Retrieval Hongfei Yan School of EECS, Peking University 2/27/2013

Contents 01 Boolean retrieval 02 The term vocabulary & postings lists 03 Dictionaries and tolerant retrieval 04 Index construction 05 Index compression 06 Scoring, term weighting & the vector space model 07 Computing scores in a complete search system 08 Evaluation in information retrieval 09 Relevance feedback & query expansion 10 XML retrieval 11 Probabilistic information retrieval 12 Language models for information retrieval 13 Text classification & Naive Bayes 14 Vector space classification 15 Support vector machines & machine learning on documents 16 Flat clustering 17 Hierarchical clustering 18 Matrix decompositions & latent semantic indexing 19 Web search basics 20 Web crawling and indexes 21 Link analysis

01: Boolean retrieval 1.1 An example information retrieval problem 1.2 A first take at building an inverted index 1.3 Processing Boolean queries 1.4 The extended Boolean model versus ranked retrieval

Definition of information retrieval 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).

5 5

6 6

Boolean retrieval The Boolean model is arguably the simplest model to base an information retrieval system on. Queries are Boolean expressions, e.g., CAESAR AND BRUTUS The search engine returns all documents that satisfy the Boolean expression Does Google use the Boolean model?

William Shakespeare (26 April 1564 (baptised) – 23 April 1616) An English poet and playwright. His early plays were mainly comedies and histories, then wrote mainly tragedies until about In his last phase, he wrote tragicomedies, also known as romances.

Unstructured data in 1650 Which plays of Shakespeare contain the words BRUTUS AND CAESAR AND NOT CALPURNIA? One could grep all of Shakespeare’s plays for BRUTUS and CAESAR, then strip out lines containing CALPURNIA Why is grep not the solution? Slow (for large collections) grep is line-oriented, IR is document-oriented “NOT CALPURNIA” is non-trivial Other operations (e.g., find the word ROMANS near COUNTRYMAN ) not feasible

Term-document incidence matrix Anthony and Cleopatra Julius Caesar The Tempest HamletOthelloMacbeth... ANTHONY BRUTUS CAESAR CALPURNIA CLEOPATRA MERCY WORSER Entry is 1 if term occurs. Example: CALPURNIA occurs in Julius Caesar. Entry is 0 if term doesn’t occur. Example: CALPURNIA doesn’t occur in The tempest.

Incidence vectors So we have a 0/1 vector for each term. To answer the query BRUTUS AND CAESAR AND NOT CALPURNIA: Take the vectors for BRUTUS, CAESAR and CALPURNIA Complement the vector of CALPURNIA Do a (bitwise) and on the three vectors AND AND =

0/1 vector for BRUTUS Anthony and Cleopatra Julius Caesar The Tempest HamletOthelloMacbeth... ANTHONY BRUTUS CAESAR CALPURNIA CLEOPATRA MERCY WORSER result:100100

Answers to query Anthony 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 did enact Julius Caesar: I was killed i’ the Capitol; Brutus killed me.

Bigger collections Consider N = 10 6 documents, each with about 1000 tokens ⇒ total of 10 9 tokens On average 6 bytes per token, including spaces and punctuation ⇒ size of document collection is about 6 ・ 10 9 = 6 GB Assume there are M = 500,000 distinct terms in the collection Notice that we are making a term/token distinction.

Can’t build the incidence matrix M = 500,000 × 10 6 = half a trillion 0s and 1s. But the matrix has no more than one billion 1s. Matrix is extremely sparse What is a better representations? We only record the 1s.

Concepts (1/2) Document: by documents we mean whatever units we have decide to build a retrieval system over. Colleciton/corpus: refer to the group of documents over which we perform retrieval as the (document) collection. Ad hoc retrieval: a system aims to provide documents from within the collection that are relevant to an arbitrary user information need, communicated to the system by means of a one-off, user-initiated query. Information need: is the topic about which the user desires to know more, and is differentiated from a query. Query: what the user conveys to the computer in an attempt to communicate the information need. Free text queries: that is just typing one or more words rather than using a precise language with operators for building up query expressions.

Concepts (2/2) Relevance: if it is one that the user perceives as containing information of value with respect to their personal information need. Precision: What fraction of the returned results are relevant to the information need? Recall: What fraction of the relevant documents in the collection where returned by the system? Inverted index: map back from terms to the parts of a document where they occur.

Inverted Index For each term t, we store a list of all documents that contain t. dictionary postings A posting A postings list

01: Boolean retrieval 1.1 An example information retrieval problem 1.2 A first take at building an inverted index 1.3 Processing Boolean queries 1.4 The extended Boolean model versus ranked retrieval

Inverted index construction ❶ Collect the documents to be indexed: ❷ Tokenize the text, turning each document into a list of tokens: ❸ Do linguistic preprocessing, producing a list of normalized tokens, which are the indexing terms: ❹ Index the documents that each term occurs in by creating an inverted index, consisting of a dictionary and postings.

Tokenizing and preprocessing

Generate posting

Sort postings

Create postings lists, determine document frequency

Split the result into dictionary and postings file dictionary postings

Later in this course Index construction: how can we create inverted indexes for large collections? How much space do we need for dictionary and index? Index compression: how can we efficiently store and process indexes for large collections? Ranked retrieval: what does the inverted index look like when we want the “best” answer?

01: Boolean retrieval 1.1 An example information retrieval problem 1.2 A first take at building an inverted index 1.3 Processing Boolean queries 1.4 The extended Boolean model versus ranked retrieval

Simple conjunctive query (two terms) Consider the query: BRUTUS AND CALPURNIA To find all matching documents using inverted index: ❶ Locate B RUTUS in the dictionary ❷ Retrieve its postings list from the postings file ❸ Locate C ALPURNIA in the dictionary ❹ Retrieve its postings list from the postings file ❺ Intersect the two postings lists ❻ Return intersection to user

Intersecting two posting lists This is linear in the length of the postings lists. Note: This only works if postings lists are sorted.

Intersecting two posting lists

Query optimization Consider a query that is an and of n terms, n > 2 For each of the terms, get its postings list, then and them together Example query: BRUTUS AND CALPURNIA AND CAESAR What is the best order for processing this query?

Query optimization Example query: BRUTUS AND CALPURNIA AND CAESAR Simple and effective optimization: Process in order of increasing frequency Start with the shortest postings list, then keep cutting further In this example, first CAESAR, then CALPURNIA, then BRUTUS

More general optimization Example query: (MADDING OR CROWD) and (IGNOBLE OR STRIFE) Get frequencies for all terms Estimate the size of each OR by the sum of its frequencies (conservative) Process in increasing order of or sizes

Optimized intersection algorithm for conjunctive queries

01: Boolean retrieval 1.1 An example information retrieval problem 1.2 A first take at building an inverted index 1.3 Processing Boolean queries 1.4 The extended Boolean model versus ranked retrieval

Boolean queries The Boolean retrieval model can answer any query that is a Boolean expression. Boolean queries are queries that use AND, OR and NOT to join query terms. Views each document as a set of terms. Is precise: Document matches condition or not. Primary commercial retrieval tool for 3 decades Many professional searchers (e.g., lawyers) still like Boolean queries. You know exactly what you are getting. Many search systems you use are also Boolean: spotlight, , intranet etc.

Commercially successful Boolean retrieval: Westlaw Largest commercial legal search service in terms of the number of paying subscribers Over half a million subscribers performing millions of searches a day over tens of terabytes of text data The service was started in In 2005, Boolean search (called “Terms and Connectors” by Westlaw) was still the default, and used by a large percentage of users although ranked retrieval has been available since 1992.

Westlaw: Example queries Information need: Information on the legal theories involved in preventing the disclosure of trade secrets by employees formerly employed by a competing company Query: “trade secret” /s disclos! /s prevent /s employe! Information need: Requirements for disabled people to be able to access a workplace Query: disab! /p access! /s work-site work-place (employment /3 place) Information need: Cases about a host’s responsibility for drunk guests Query: host! /p (responsib! liab!) /p (intoxicat! drunk!) /p guest

Westlaw: Comments Proximity operators: /3 = within 3 words, /s = within a sentence, /p = within a paragraph Space is disjunction, not conjunction! (This was the default in search pre-Google.) Long, precise queries: incrementally developed, not like web search Why professional searchers often like Boolean search: precision, transparency, control When are Boolean queries the best way of searching? Depends on: information need, searcher, document collection,...

A few of the main additional things Determine the set of terms in the dictionary and to provide retrieval that is tolerant to spelling mistakes and inconsistent choice of words. Compounds and phrases that denote a concept E.g., “operating system” Accumulate evidence, giving more weight to documents that have a term several times as opposed to ones that contain it only once. Need term frequency Determine a document score to order the returned results.

Summary We have looked at the structure and construction of a basic inverted index. We introduced the Boolean retrieval model. And how to do efficient retrieval via linear time merges and simple query optimization.