1 CS 430: Information Discovery Lecture 3 Inverted Files and Boolean Operations.

Slides:



Advertisements
Similar presentations
Information Retrieval in Practice
Advertisements

Chapter 5: Introduction to Information Retrieval
Indexing. Efficient Retrieval Documents x terms matrix t 1 t 2... t j... t m nf d 1 w 11 w w 1j... w 1m 1/|d 1 | d 2 w 21 w w 2j... w 2m 1/|d.
CS 430 / INFO 430 Information Retrieval
CS 430 / INFO 430 Information Retrieval
1 File Structures Information Retrieval: Data Structures and Algorithms by W.B. Frakes and R. Baeza-Yates (Eds.) Englewood Cliffs, NJ: Prentice Hall, 1992.
1 CS 430 / INFO 430 Information Retrieval Lecture 5 Searching Full Text 5.
Database Systems: A Practical Approach to Design, Implementation and Management International Computer Science S. Carolyn Begg, Thomas Connolly Lecture.
1 CS 430 / INFO 430 Information Retrieval Lecture 4 Searching Full Text 4.
Inverted Indices. Inverted Files Definition: an inverted file is a word-oriented mechanism for indexing a text collection in order to speed up the searching.
Modern Information Retrieval Chapter 2 Modeling. Can keywords be used to represent a document or a query? keywords as query and matching as query processing.
1 CS 430: Information Discovery Lecture 4 Data Structures for Information Retrieval.
CS/Info 430: Information Retrieval
1 CS 430: Information Discovery Lecture 20 The User in the Loop.
Web Search – Summer Term 2006 II. Information Retrieval (Basics) (c) Wolfgang Hürst, Albert-Ludwigs-University.
1 CS 430: Information Discovery Lecture 2 Introduction to Text Based Information Retrieval.
1 CS 430 / INFO 430 Information Retrieval Lecture 4 Searching Full Text 4.
1 CS 502: Computing Methods for Digital Libraries Lecture 11 Information Retrieval I.
Chapter 5: Information Retrieval and Web Search
Overview of Search Engines
Chapter 17 Methodology – Physical Database Design for Relational Databases Transparencies © Pearson Education Limited 1995, 2005.
Team Dosen UMN Physical DB Design Connolly Book Chapter 18.
Chapter 13 File Structures. Understand the file access methods. Describe the characteristics of a sequential file. After reading this chapter, the reader.
Chapter. 8: Indexing and Searching Sections: 8.1 Introduction, 8.2 Inverted Files 9/13/ Dr. Almetwally Mostafa.
Lecture 9 Methodology – Physical Database Design for Relational Databases.
1 CS 430 / INFO 430 Information Retrieval Lecture 2 Text Based Information Retrieval.
Chapter 16 Methodology – Physical Database Design for Relational Databases.
Recap Preprocessing to form the term vocabulary Documents Tokenization token and term Normalization Case-folding Lemmatization Stemming Thesauri Stop words.
Chapter 11 Arrays Continued
CS 430: Information Discovery
Xiaoying Gao Computer Science Victoria University of Wellington Intelligent Agents COMP 423.
1 CS 350 Data Structures Chaminade University of Honolulu.
Introduction n How to retrieval information? n A simple alternative is to search the whole text sequentially n Another option is to build data structures.
1 CS 430: Information Discovery Lecture 3 Inverted Files.
Chapter 6: Information Retrieval and Web Search
Search Engines. Search Strategies Define the search topic(s) and break it down into its component parts What terms, words or phrases do you use to describe.
10/10/2012ISC239 Isabelle Bichindaritz1 Physical Database Design.
CS246 Data & File Structures Lecture 1 Introduction to File Systems Instructor: Li Ma Office: NBC 126 Phone: (713)
1 CS 430 / INFO 430 Information Retrieval Lecture 5 Searching Full Text 5.
Data Structures and Algorithms Lecture 1 Instructor: Quratulain Date: 1 st Sep, 2009.
Introduction to Information Retrieval Introduction to Information Retrieval CS276 Information Retrieval and Web Search Pandu Nayak and Prabhakar Raghavan.
Methodology – Physical Database Design for Relational Databases.
1 CS 430: Information Discovery Lecture 4 Files Structures for Inverted Files.
1 CS 430: Information Discovery Sample Midterm Examination Notes on the Solutions.
1 Information Retrieval LECTURE 1 : Introduction.
Information Retrieval
Evidence from Content INST 734 Module 2 Doug Oard.
Evidence from Content INST 734 Module 2 Doug Oard.
FILE ORGANIZATION.
Xiaoying Gao Computer Science Victoria University of Wellington COMP307 NLP 4 Information Retrieval.
1 Discussion Class 1 Inverted Files. 2 Discussion Classes Format: Question Ask a member of the class to answer Provide opportunity for others to comment.
1 CS 430: Information Discovery Lecture 3 Inverted Files.
Information Retrieval Inverted Files.. Document Vectors as Points on a Surface Normalize all document vectors to be of length 1 Define d' = Then the ends.
Information Retrieval in Practice
Why indexing? For efficient searching of a document
Course Developer/Writer: A. J. Ikuomola
Lecture 1: Introduction and the Boolean Model Information Retrieval
Text Based Information Retrieval
CS 430: Information Discovery
Methodology – Physical Database Design for Relational Databases
Implementation Issues & IR Systems
CS 430: Information Discovery
Multimedia Information Retrieval
國立臺北科技大學 課程:資料庫系統 fall Chapter 18
CSCE 561 Information Retrieval System Models
FILE ORGANIZATION.
Searching and Indexing
CS 430: Information Discovery
CS 430: Information Discovery
CS 430: Information Discovery
Presentation transcript:

1 CS 430: Information Discovery Lecture 3 Inverted Files and Boolean Operations

2 Course Administration Assignment 1 will be posted during the next couple of days. It is due on Friday, September 21 at 5 p.m.

3 Inverted File (Basic Definition) Inverted file: a list of the words in a set of documents and the documents in which they appear. Word Document abacus actor aspen 5 atoll Stop words are removed before building the index.

4 Inverted List Inverted list: All the entries in an inverted file that apply to a specific word, e.g. abacus Posting: Entry in an inverted list, e.g., the postings for "abacus" are documents 3, 19, 22.

5 Keywords and Controlled Vocabulary Keyword: A term that is used to describe the subject matter in a document. It is sometimes called an index term. Keywords can be extracted automatically from a document or assigned by a human cataloguer or indexer. Controlled vocabulary: A list of words that can be used as keywords, e.g., in a medical system, a list of medical terms. Inverted file (more complete definition): A list of the keywords that apply to a set of documents and the documents in which they appear.

6 Enhancements to Inverted Files Location: The inverted file holds information about the location of each term within the document. Uses adjacency and near operators user interface design -- highlight location of search term Frequency: The inverted file includes the number of postings for each term. Uses term weighting query processing optimization user interface design

7 Inverted File (Enhanced) WordPostings DocumentLocation abacus actor aspen atoll

8 Example: Boolean Queries Boolean query: two or more search terms, related by logical operators, e.g., andornot Examples: abacus and actor abacus or actor (abacus and actor) or (abacus and atoll) not actor

9 Boolean Diagram A B A and B A or B not (A or B)

10 Evaluating a Boolean Query To evaluate the and operator, merge the two inverted lists with a logical AND operation. Examples: abacus and actor Postings for abacus Postings for actor Document 19 is the only document that contains both terms, "abacus" and "actor".

11 Adjacent and Near Operators abacus adj actor Terms abacus and actor are adjacent to each other as in the string "abacus actor" abacus near 4 actor Terms abacus and actor are near to each other as in the string "the actor has an abacus" Some systems support other operators, such as with (two terms in the same sentence) or same (two terms in the same paragraph).

12 Evaluating an Adjacency Operation Examples: abacus adj actor Postings for abacus Postings for actor Document 19, locations 212 and 213, is the only occurrence of the terms "abacus" and "actor" adjacent

13 Evaluation of Boolean Operators Precedence of operators must be defined: adj, nearhigh and, not or low Example A and B or C and B is evaluated as (A and B) or (C and B)

14 SetRecordsUnique Terms A2,6535,123 B38,304c.25,000 Sizes of Inverted Files Set A has an average of 14 postings per term and a maximum of over 2,000 postings per term. Set B has an average of 88 postings per record. Examples from Harman and Candela, 1990

15 Representation of Inverted Files Index (vocabulary) file: Stores list of terms (keywords). Designed for rapid searching and processing range queries. Often held in memory. Postings file: Stores a list of postings for each term. Designed for rapid merging of lists. Each list may be stored sequentially. Document file: [Repositories for the storage of document collections are covered in CS 502.]

16 Organization of Inverted Files TermPointer to postings ant bee cat dog elk fox gnu hog Inverted lists Index (vocabulary) filePostings file Documents file

17 Decisions in Building Inverted Files Underlying character set, e.g., printable ASCII, Unicode, UTF8. Whether to use a controlled vocabulary. If so, what words to include. List of stopwords. Rules to decide the beginning and end of words, e.g., spaces or punctuation. Character sequences not to be indexed, e.g., sequences of numbers.

18 Efficiency Criteria Storage Inverted files are big, typically 10% to 100% the size of the collection of documents. Update performance It must be possible, with a reasonable amount of computation, to: (a) Add a large batch of documents (b) Add a single document Retrieval performance Retrieval must be fast enough to satisfy users and not use excessive resource.

19 Index File If an index is held on disk, search time is dominated by the number of disk accesses. Suppose that an index has 1,000,000 distinct terms. Each index entry consists of the term and a pointer to the inverted list, average 100 characters. Size of index is 100 megabytes, which can easily be held in memory.

20 Postings File Since inverted lists may be very long, it is important to match postings efficiently. Usually, the inverted lists will be held on disk. Therefore algorithms for matching posting use sequential file processing. For efficient matching, the inverted lists should all be sorted in the same sequence, usually alphabetic order, "lexicographic index". Merging inverted lists is the most computationally intensive task in many information retrieval systems.

21 Efficiency and Query Languages Some query options may require huge computation, e.g., Regular expressions If inverted files are stored in alphabetical order, comp* can be processed efficiently *comp cannot be processed efficiently Boolean terms If A and B are search terms A or B can be processed by comparing two moderate sized lists (not A) or (not B) requires two very large lists

22 Index File Structures: Linear Index TermPointer to list of postings ant bee cat dog elk fox gnu hog Inverted lists

23 Linear Index Advantages Can be searched quickly, e.g., by binary search, O(log n) Good for sequential processing, e.g., comp* Convenient for batch updating Economical use of storage Disadvantages Index must be rebuilt if an extra term is added