Ανάκληση Πληροφορίας. Information Retrieval. Διδάσκων Δημήτριος Κατσαρός

Σχετικά έγγραφα
Ανάκληση Πληποφοπίαρ. Information Retrieval. Διδάζκων Δημήηριος Καηζαρός

Ανάκληση Πληποφοπίαρ. Information Retrieval. Διδάζκων Δημήηριος Καηζαρός

Information Retrieval

The Simply Typed Lambda Calculus

Εύρεση & ιαχείριση Πληροφορίας στον Παγκόσµιο Ιστό. Ανεκτική αναζήτηση. ηµιουργία Ευρετηρίου. ιδάσκων ηµήτριος Κατσαρός, Ph.D.

Εύρεση & ιαχείριση Πληροφορίας στον Παγκόσµιο Ιστό

3. Λεξικά & Ανάκτηση Ανεκτική σε Σφάλματα

2 Composition. Invertible Mappings

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

ΜΥΕ003-ΠΛΕ70: Ανάκτηση Πληροφορίας Διδάσκουσα: Ευαγγελία Πιτουρά. Κεφάλαιο 3: Δομές για Λεξικά. Ανάκτηση Ανεκτική στα Σφάλματα.

Homework 3 Solutions

Galatia SIL Keyboard Information

ΜΥΕ003-ΠΛΕ70: Ανάκτηση Πληροφορίας Διδάσκουσα: Ευαγγελία Πιτουρά. Κεφάλαιο 3: Δομές για Λεξικά. Ανάκτηση Ανεκτική στα Σφάλματα.

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Section 8.3 Trigonometric Equations

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

ΜΥΕ003-ΠΛΕ70: Ανάκτηση Πληροφορίας Διδάσκουσα: Ευαγγελία Πιτουρά. Κεφάλαιο 3: Δομές για Λεξικά. Ανάκτηση Ανεκτική στα Σφάλματα.

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

Finite Field Problems: Solutions

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

Information Retrieval

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

derivation of the Laplacian from rectangular to spherical coordinates

EE512: Error Control Coding

Approximation of distance between locations on earth given by latitude and longitude

Every set of first-order formulas is equivalent to an independent set

C.S. 430 Assignment 6, Sample Solutions

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

Instruction Execution Times

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

Inverse trigonometric functions & General Solution of Trigonometric Equations

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

Fractional Colorings and Zykov Products of graphs

Lecture 2. Soundness and completeness of propositional logic

The challenges of non-stable predicates

Μηχανική Μάθηση Hypothesis Testing

Example Sheet 3 Solutions

Math 6 SL Probability Distributions Practice Test Mark Scheme

Section 7.6 Double and Half Angle Formulas

Concrete Mathematics Exercises from 30 September 2016

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.

Matrices and Determinants

Information Retrieval

Elements of Information Theory

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Advanced Subsidiary Unit 1: Understanding and Written Response

Areas and Lengths in Polar Coordinates

Συστήματα Διαχείρισης Βάσεων Δεδομένων

Other Test Constructions: Likelihood Ratio & Bayes Tests

Math221: HW# 1 solutions

Homework 8 Model Solution Section

ST5224: Advanced Statistical Theory II

9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr

Solutions to Exercise Sheet 5

PARTIAL NOTES for 6.1 Trigonometric Identities

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής

Right Rear Door. Let's now finish the door hinge saga with the right rear door

Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1

Problem Set 3: Solutions

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

Areas and Lengths in Polar Coordinates

Assalamu `alaikum wr. wb.

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

Ευρετηρίαση ΜΕΡΟΣ ΙΙ

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Partial Differential Equations in Biology The boundary element method. March 26, 2013

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

Statistical Inference I Locally most powerful tests

department listing department name αχχουντσ ϕανε βαλικτ δδσϕηασδδη σδηφγ ασκϕηλκ τεχηνιχαλ αλαν ϕουν διξ τεχηνιχαλ ϕοην µαριανι

Συντακτικές λειτουργίες

LESSON 14 (ΜΑΘΗΜΑ ΔΕΚΑΤΕΣΣΕΡΑ) REF : 202/057/34-ADV. 18 February 2014

Notes on the Open Economy

CRASH COURSE IN PRECALCULUS

Chapter 2 * * * * * * * Introduction to Verbs * * * * * * *

TMA4115 Matematikk 3

Srednicki Chapter 55

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 5: Component Adaptation Environment (COPE)

Block Ciphers Modes. Ramki Thurimella

( ) 2 and compare to M.

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

Section 9.2 Polar Equations and Graphs

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in

Bayesian statistics. DS GA 1002 Probability and Statistics for Data Science.

FSM Toolkit Exercises

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation

Variational Wavefunction for the Helium Atom

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Review Test 3. MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

5.4 The Poisson Distribution.

Section 1: Listening and responding. Presenter: Niki Farfara MGTAV VCE Seminar 7 August 2016

Ανάκληση Πληροφορίας. Information Retrieval. Διδάσκων Δημήτριος Κατσαρός

IIT JEE (2013) (Trigonomtery 1) Solutions

Capacitors - Capacitance, Charge and Potential Difference

Strain gauge and rosettes

Transcript:

Ανάκληση Πληροφορίας Information Retrieval Διδάσκων Δημήτριος Κατσαρός Διάλεξη 6η: 05/03/2014 1

WILD-CARD QUERIES 2

Sec. 3.2 Wild-card queries: * mon*: find all docs containing any word beginning 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? 3

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. 4

Sec. 3.2 B-trees handle * s at the end of a query term How can we handle * s in the middle of query term? co*tion We could look up co* AND *tion in a B-tree and intersect the two term sets Expensive The solution: transform wild-card queries so that the * s occur at the end This gives rise to the Permuterm Index. 5

Sec. 3.2.1 Permuterm index For term hello, index under: hello$, ello$h, llo$he, lo$hel, o$hell where $ is a special symbol. Queries: X lookup on X$ X* lookup on $X* *X lookup on X$* *X* lookup on X* X*Y lookup on Y$X* X*Y*Z??? Exercise! Query = hel*o X=hel, Y=o Lookup o$hel* 6

Sec. 3.2.1 Permuterm query processing Rotate query wild-card to the right Now use B-tree lookup as before. Permuterm problem: quadruples lexicon size Empirical observation for English. 7

Sec. 3.2.2 Bigram (k-gram) indexes Enumerate all k-grams (sequence of k chars) occurring in any term e.g., from text April is the cruelest month we get the 2-grams (bigrams) $a,ap,pr,ri,il,l$,$i,is,s$,$t,th,he,e$,$c,cr,ru, ue,el,le,es,st,t$, $m,mo,on,nt,h$ $ is a special word boundary symbol Maintain a second inverted index from bigrams to dictionary terms that match each bigram. 8

Sec. 3.2.2 Bigram index example The k-gram index finds terms based on a query consisting of k-grams (here k=2). $m mace madden mo on among among amortize around 9

Sec. 3.2.2 Processing wild-cards Query mon* can now be run as $m AND mo AND on Gets terms that match AND version of our wildcard query. But we d enumerate moon. Must post-filter these terms against query. Surviving enumerated terms are then looked up in the term-document inverted index. Fast, space efficient (compared to permuterm). 10

Sec. 3.2.2 Processing wild-card queries As before, we must execute a Boolean query for each enumerated, filtered term. Wild-cards can result in expensive query execution (very large disjunctions ) pyth* AND prog* If you encourage laziness people will respond! Type your search terms, use * if you need to. E.g., Alex* will match Alexander. Search Which web search engines allow wildcard queries? 11

SPELLING CORRECTION 12

Sec. 3.3 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. 13

Sec. 3.3 Document correction Especially needed for OCR ed documents Correction algorithms are tuned for this: rn/m Can use domain-specific knowledge E.g., OCR can confuse O and D more often than it would confuse O and I (adjacent on the QWERTY keyboard, so more likely interchanged in typing). But also: web pages and even printed material has typos Goal: the dictionary contains fewer misspellings But often we don t change the documents but aim to fix the query-document mapping 14

Sec. 3.3 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? 15

Sec. 3.3.2 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) 16

Sec. 3.3.2 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 n-gram overlap 17

Sec. 3.3.3 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 from cat to dog is 3. (Just 1 with transpose.) Generally found by dynamic programming. See http://www.merriampark.com/ld.htm for a nice example plus an applet. 18

Sec. 3.3.3 Weighted edit distance As above, but the weight of an operation depends on the character(s) involved Meant to capture OCR or keyboard errors, e.g. 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 19

Sec. 3.3.4 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 20

Sec. 3.3.4 Edit distance to all dictionary terms? Given a (mis-spelled) query do we compute its edit distance to every dictionary term? Expensive and slow Alternative? How do we cut the set of candidate dictionary terms? One possibility is to use n-gram overlap for this This can also be used by itself for spelling correction. 21

Sec. 3.3.4 n-gram overlap Enumerate all the n-grams in the query string as well as in the lexicon Use the n-gram index (recall wild-card search) to retrieve all lexicon terms matching any of the query n- grams Threshold by number of matching n-grams Variants weight by keyboard layout, etc. 22

Sec. 3.3.4 Example with trigrams Suppose the text is november Trigrams are nov, ove, vem, emb, mbe, ber. The query is december Trigrams are dec, ece, cem, emb, mbe, ber. So 3 trigrams overlap (of 6 in each term) How can we turn this into a normalized measure of overlap? 23

Sec. 3.3.4 One option Jaccard coefficient A commonly-used measure of overlap Let X and Y be two sets; then the J.C. is X Y / X Y Equals 1 when X and Y have the same elements and zero when they are disjoint X and Y don t have to be of the same size Always assigns a number between 0 and 1 Now threshold to decide if you have a match E.g., if J.C. > 0.8, declare a match 24

Sec. 3.3.4 Matching trigrams Consider the query lord we wish to identify words matching 2 of its 3 bigrams (lo, or, rd) lo or rd alone lord sloth border lord morbid ardent border card Standard postings merge will enumerate Adapt this to using Jaccard (or another) measure. 25

Sec. 3.3.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. 26

Sec. 3.3.5 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. 27

Sec. 3.3.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? 28

Sec. 3.3.5 Another approach Break phrase query into a conjunction of biwords (Lecture 2). Look for biwords that need only one term corrected. Enumerate phrase matches and rank them! 29

Sec. 3.3.5 General issues in spell correction We enumerate multiple alternatives for Did you mean? Need to figure out which to present to the user Use heuristics The alternative hitting most docs Query log analysis + tweaking For especially popular, topical queries Spell-correction is computationally expensive Avoid running routinely on every query? Run only on queries that matched few docs 30

SOUNDEX 31

Sec. 3.4 Soundex Class of heuristics to expand a query into phonetic equivalents Language specific mainly for names E.g., chebyshev tchebycheff Invented for the U.S. census in 1918 32

Sec. 3.4 Soundex typical algorithm Turn every token to be indexed into a 4-character reduced form Do the same with query terms Build and search an index on the reduced forms (when the query calls for a soundex match) http://www.creativyst.com/doc/articles/soundex1/soundex1.htm#top 33

Sec. 3.4 Soundex typical algorithm 1. Retain the first letter of the word. 2. Change all occurrences of the following letters to '0' (zero): 'A', E', 'I', 'O', 'U', 'H', 'W', 'Y'. 3. Change letters to digits as follows: B, F, P, V 1 C, G, J, K, Q, S, X, Z 2 D,T 3 L 4 M, N 5 R 6 34

Sec. 3.4 Soundex continued 4. Remove all pairs of consecutive digits. 5. Remove all zeros from the resulting string. 6. Pad the resulting string with trailing zeros and return the first four positions, which will be of the form <uppercase letter> <digit> <digit> <digit>. E.g., Herman becomes H655. Will hermann generate the same code? 35

Sec. 3.4 Soundex Soundex is the classic algorithm, provided by most databases (Oracle, Microsoft, ) How useful is soundex? Not very for information retrieval Okay for high recall tasks (e.g., Interpol), though biased to names of certain nationalities Zobel and Dart (1996) show that other algorithms for phonetic matching perform much better in the context of IR 36

What queries can we process? We have Positional inverted index with skip pointers Wild-card index Spell-correction Soundex Queries such as (SPELL(moriset) /3 toron*to) OR SOUNDEX(chaikofski) 37