Recap of the previous lecture. This lecture. A naïve dictionary. Introduction to Information Retrieval. Dictionary data structures Tolerant retrieval

Similar documents
Dictionaries and tolerant retrieval. Slides by Manning, Raghavan, Schutze

Dictionaries and Tolerant retrieval

3-1. Dictionaries and Tolerant Retrieval. Most slides were adapted from Stanford CS 276 course and University of Munich IR course.

Dictionaries and tolerant retrieval CE-324 : Modern Information Retrieval Sharif University of Technology

Dictionaries and tolerant retrieval CE-324 : Modern Information Retrieval Sharif University of Technology

Information Retrieval

Tolerant Retrieval. Searching the Dictionary Tolerant Retrieval. Information Retrieval & Extraction Misbhauddin 1

Recap of last time CS276A Information Retrieval

OUTLINE. Documents Terms. General + Non-English English. Skip pointers. Phrase queries

Natural Language Processing and Information Retrieval

Information Retrieval

Information Retrieval

Information Retrieval

Overview. Lecture 3: Index Representation and Tolerant Retrieval. Type/token distinction. IR System components

Web Information Retrieval. Lecture 4 Dictionaries, Index Compression

Text Technologies for Data Science INFR Indexing (2) Instructor: Walid Magdy

Text Technologies for Data Science INFR Indexing (2) Instructor: Walid Magdy

Introduction to Information Retrieval (Manning, Raghavan, Schutze)

Part 2: Boolean Retrieval Francesco Ricci

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


CSCI 5417 Information Retrieval Systems Jim Martin!

Information Retrieval

Information Retrieval

Recap: lecture 2 CS276A Information Retrieval

Information Retrieval

Information Retrieval

Introduction to Information Retrieval

Index Compression. David Kauchak cs160 Fall 2009 adapted from:

Information Retrieval

Information Retrieval

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

Corso di Biblioteche Digitali

Indexing and Searching

Lecture 2: Encoding models for text. Many thanks to Prabhakar Raghavan for sharing most content from the following slides

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

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

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

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

Introduction to Information Retrieval

Indexing and Searching

Introduction to Information Retrieval

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

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

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

INDEX CONSTRUCTION 1

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

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

Outline of the course

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

Informa(on Retrieval

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

Digital Libraries: Language Technologies

CS60092: Informa0on Retrieval

Index Construction. Slides by Manning, Raghavan, Schutze

Lecture 5: Information Retrieval using the Vector Space Model

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

Search Engines. Gertjan van Noord. September 17, 2018

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

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

Elementary IR: Scalable Boolean Text Search. (Compare with R & G )

Indexing and Query Processing. What will we cover?

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

Multimedia Information Extraction and Retrieval Term Frequency Inverse Document Frequency

Course work. Today. Last lecture index construc)on. Why compression (in general)? Why compression for inverted indexes?

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

Lecture 3: Phrasal queries and wildcards

Chapter 2. Architecture of a Search Engine

Information Retrieval

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

Boolean Queries. Keywords combined with Boolean operators:

Informa(on Retrieval

This lecture: IIR Sections Ranked retrieval Scoring documents Term frequency Collection statistics Weighting schemes Vector space scoring

Symbol Tables. ASU Textbook Chapter 7.6, 6.5 and 6.3. Tsan-sheng Hsu.

Indexing: Part IV. Announcements (February 17) Keyword search. CPS 216 Advanced Database Systems

Search: the beginning. Nisheeth

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

230 Million Tweets per day

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

UNIT-4 (COMPILER DESIGN)

Lecture Notes on Tries

Information Retrieval (IR) Introduction to Information Retrieval. Lecture Overview. Why do we need IR? Basics of an IR system.

ΕΠΛ660. Ανάκτηση µε το µοντέλο διανυσµατικού χώρου

Basic Tokenizing, Indexing, and Implementation of Vector-Space Retrieval

IN4325 Indexing and query processing. Claudia Hauff (WIS, TU Delft)

Introduction to Information Retrieval

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

Indexing. CS6200: Information Retrieval. Index Construction. Slides by: Jesse Anderton

Part 3: The term vocabulary, postings lists and tolerant retrieval Francesco Ricci

Web Information Retrieval. Lecture 2 Tokenization, Normalization, Speedup, Phrase Queries

Information Retrieval CS-E credits

LCP Array Construction

Assignment No. 1. Abdurrahman Yasar. June 10, QUESTION 1

Tables. The Table ADT is used when information needs to be stored and acessed via a key usually, but not always, a string. For example: Dictionaries

Preliminary draft (c)2008 Cambridge UP

Introduc)on to. CS60092: Informa0on Retrieval

Birkbeck (University of London)

Introduction to Information Retrieval

Information Retrieval. (M&S Ch 15)

Transcription:

Ch. 2 Recap of the previous lecture Introduction to Information Retrieval Lecture 3: Dictionaries and tolerant retrieval The type/token distinction Terms are normalized types put in the dictionary Tokenization problems: Hyphens, apostrophes, p compounds, CJK Term equivalence classing: Numbers, case folding, stemming, lemmatization Skip pointers Encoding a tree like structure in a postings list Biword indexes for phrases Positional indexes for phrases/proximity queries 2 This lecture Dictionary data structures Tolerant retrieval Wild card queries Spelling correction Ch. 3 Dictionary data structures for inverted indexes The dictionary data structure stores the term vocabulary, document frequency, pointers to each postings list in what data structure? 3 4 A naïve dictionary Dictionary data structures An array of struct: Two main choices: Hashtables Trees Some IR systems use hashtables, some trees char[20] int Postings * 20 bytes 4/8 bytes 4/8 bytes How do we store a dictionary in memory efficiently? How do we quickly look up elements at query time? 5 6 1

Hashtables Each vocabulary term is hashed to an integer (We assume you ve seen hashtables before) Pros: Lookup is faster than for a tree: O(1) Cons: No easy way to find minor variants: judgment/judgement No prefix search [tolerant retrieval] If vocabulary keeps growing, need to occasionally do the expensive operation of rehashing everything Tree: binary tree Root a-m n-z a-hu hy-m n-sh si-z 7 8 Tree: B tree Trees a-hu hy-m n-z Definition: Every internal nodel has a number of children in the interval [a,b] where a, b are appropriate natural numbers, e.g., [2,4]. Simplest: binary tree More usual: B trees Trees require a standard ordering of characters and hence strings but we typically have one Pros: Solves the prefix problem (terms starting with hyp) Cons: Slower: O(log M) [and this requires balanced tree] Rebalancing binary trees is expensive But B trees mitigate the rebalancing problem 9 10 Sec. 3.2 Wild card queries: * WILD CARD QUERIES mon*: find all docs containing any word beginning with mon. Easy with binary tree (or B tree) lexicon: retrieve all words in range: mon w < moo *mon: find words ending in mon : harder Maintain an additional B tree for terms backwards. Can retrieve all words in range: nom w < non. Exercise: from this, how can we enumerate all terms meeting the wild-card query pro*cent? 11 12 2

Sec. 3.2 Query processing At this point, we have an enumeration of all terms in the dictionary that match the wild card query. We still have to look up the postings for each enumerated term. E.g., consider the query: se*ate AND fil*er This may result in the execution of many Boolean AND queries. SPELLING CORRECTION 13 14 Spell correction Two principal uses Correcting document(s) being indexed Correcting user queries to retrieve right answers Two main flavors: Isolated word Check each word on its own for misspelling Will not catch typos resulting in correctly spelled words e.g., from form Context sensitive Look at surrounding words, e.g., I flew form Heathrow to Narita. Document correction Especially needed for OCR ed documents Correction algorithms are tuned for this Can use domain specific knowledge E.g., OCR can confuse O and D more often than it would confuse O and I (adjacent (dj on the QWERTY keyboard, so more likely l interchanged in typing). But also: web pages and even printed material have typos Goal: the dictionary contains fewer misspellings But often we don t change the documents and instead fix the query document mapping 15 16.2 Query mis spellings Our principal focus here E.g., the query Alanis Morisett We can either Retrieve documents indexed by the correct spelling, OR Return several suggested alternative queries with the correct spelling Did you mean? Isolated word correction Fundamental premise there is a lexicon from which the correct spellings come Two basic choices for this A standard lexicon such as Webster s English Dictionary An industry specific lexicon hand maintained The lexicon of the indexed corpus E.g., all words on the web All names, acronyms etc. (Including the mis spellings) 17 18 3

.2.3 Isolated word correction Given a lexicon and a character sequence Q, return the words in the lexicon closest to Q What s closest? We ll study several alternatives Edit distance (Levenshtein distance) Weighted edit distance Edit distance Given two strings S 1 and S 2, the minimum number of operations to convert one to the other Operations are typically character level Insert, Delete, Replace, (Transposition) E.g., the edit distance from dof to dog is 1 From cat to act is 2 (Just 1 with transpose.) from cat to dog is 3. Generally found by dynamic programming. See http://www.merriampark.com/ld.htm for a nice example plus an applet. 19 20.3.4 Weighted edit distance As above, but the weight of an operation depends on the character(s) involved Meant to capture OCR or keyboard errors Example: m more likely to be mis typed as n than as q Therefore, replacing m by n is a smaller edit distance than by q This may be formulated as a probability model Requires weight matrix as input Modify dynamic programming to handle weights 21 Using edit distances Given query, first enumerate all character sequences within a preset (weighted) edit distance (e.g., 2) Intersect this set with list of correct words Show terms you found to user as suggestions Alternatively, We can look up all possible corrections in our inverted index and return all docs slow We can run with a single most likely correction The alternatives disempower the user, but save a round of interaction with the user 22.5.5 Context sensitive spell correction Text: I flew from Heathrow to Narita. Consider the phrase query flew form Heathrow We d like to respond Did you mean flew from Heathrow?? because no docs matched the query phrase. Context sensitive correction Need surrounding context to catch this. First idea: retrieve dictionary terms close (in weighted edit distance) to each query term Now try all possible resulting phrases with one word fixed at a time flew from heathrow fled form heathrow flea form heathrow Hit based spelling correction: Suggest the alternative that has lots of hits. 23 24 4

.5 Exercise Suppose that for flew form Heathrow we have 7 alternatives for flew, 19 for form and 3 for heathrow. How many corrected phrases will we enumerate in this scheme? What queries can we process? We have Positional inverted index with skip pointers Wild card index Spell correction 25 26 Sec. 3.5 Resources IIR 3, MG 4.2 Efficient spell retrieval: K. Kukich. Techniques for automatically correcting words in text. ACM Computing Surveys 24(4), Dec 1992. J. Zobel and P. Dart. Finding approximate matches in large lexicons. Software practice and experience 25(3), March 1995. http://citeseer.ist.psu.edu/zobel95finding.html Mikael Tillenius: Efficient Generation and Ranking of Spelling Error Corrections. Master s thesis at Sweden s Royal Institute of Technology. http://citeseer.ist.psu.edu/179155.html Nice, easy reading on spell correction: Peter Norvig: How to write a spelling corrector http://norvig.com/spell correct.html 27 5