Slide 1Information RetrievalSlide 3Unstructured (text) vs. structured (database) data todayBasic assumptions of Information RetrievalThe classic search modelHow good are the retrieved docs?Slide 8Slide 9Unstructured data in 1620Term-document incidence matricesIncidence vectorsAnswers to queryBigger collectionsCan’t build the matrixSlide 16Slide 17Inverted indexInverted indexInverted index constructionInitial stages of text processingIndexer steps: Token sequenceIndexer steps: SortIndexer steps: Dictionary & PostingsWhere do we pay in storage?Slide 27Slide 28The index we just builtQuery processing: ANDThe mergeIntersecting two postings lists (a “merge” algorithm)Slide 34Slide 35Boolean queries: Exact matchExample: WestLaw http://www.westlaw.com/Example: WestLaw http://www.westlaw.com/Boolean queries: More general mergesMergingQuery optimizationQuery optimization exampleMore general optimizationExerciseQuery processing exercisesExerciseSlide 47Slide 48Phrase queriesA first attempt: Biword indexesLonger phrase queriesIssues for biword indexesSolution 2: Positional indexesPositional index exampleProcessing a phrase queryProximity queriesPositional index sizePositional index sizeRules of thumbCombination schemesSlide 62Slide 63IR vs. databases: Structured vs unstructured dataUnstructured dataSemi-structured dataSlide 72Introduction to Information RetrievalIntroduction to Information Retrieval Introduction toInformation RetrievalIntroducing Information Retrieval and Web SearchIntroduction to Information RetrievalIntroduction to Information Retrieval Information RetrievalInformation 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).These days we frequently think first of web search, but there are many other cases:E-mail searchSearching your laptopCorporate knowledge basesLegal information retrieval2Introduction to Information RetrievalIntroduction to Information Retrieval Unstructured (text) vs. structured (database) data in the mid-nineties3Data volume Market Cap050100150200250Un-struc-turedStructuredIntroduction to Information RetrievalIntroduction to Information Retrieval Unstructured (text) vs. structured (database) data today4Data volume Market Cap050100150200250Un-struc-turedStructuredIntroduction to Information RetrievalIntroduction to Information Retrieval Basic assumptions of Information RetrievalCollection: A set of documentsAssume it is a static collection for the momentGoal: Retrieve documents with information that is relevant to the user’s information need and helps the user complete a task5Sec. 1.1Introduction to Information RetrievalIntroduction to Information Retrieval how trap mice alivehow trap mice aliveThe classic search modelCollectionUser task Info needQueryResultsSearchengineQueryrefinement Get rid of mice in a politically correct wayInfo about removing micewithout killing them Misconception?Misformulation?SearchSearchIntroduction to Information RetrievalIntroduction to Information Retrieval How good are the retrieved docs?Precision : Fraction of retrieved docs that are relevant to the user’s information needRecall : Fraction of relevant docs in collection that are retrievedMore precise definitions and measurements to follow later7Sec. 1.1Introduction to Information RetrievalIntroduction to Information Retrieval Introduction toInformation RetrievalIntroducing Information Retrieval and Web SearchIntroduction to Information RetrievalIntroduction to Information Retrieval Introduction toInformation RetrievalTerm-document incidence matricesIntroduction to Information RetrievalIntroduction to Information Retrieval Unstructured data in 1620Which plays of Shakespeare contain the words Brutus AND Caesar but NOT Calpurnia?One could grep all of Shakespeare’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-trivialOther operations (e.g., find the word Romans near countrymen) not feasibleRanked retrieval (best documents to return)Later lectures10Sec. 1.1Introduction to Information RetrievalIntroduction to Information Retrieval Term-document incidence matrices1 if play contains word, 0 otherwiseBrutus AND Caesar BUT NOT CalpurniaSec. 1.1Antony and Cleopatra J ulius Caesar The Tempest Hamlet Othello MacbethAntony1 1 0 0 0 1Brutus1 1 0 1 0 0Caesar1 1 0 1 1 1Calpurnia0 1 0 0 0 0Cleopatra1 0 0 0 0 0mercy1 0 1 1 1 1worser1 0 1 1 1 0Introduction to Information RetrievalIntroduction to Information Retrieval Incidence vectorsSo we have a 0/1 vector for each term.To answer query: take the vectors for Brutus, Caesar and Calpurnia (complemented) bitwise AND.110100 AND110111 AND101111 = 10010012Sec. 1.1Antony and Cleopatra J ulius Caesar The Tempest Hamlet Othello MacbethAntony 1 1 0 0 0 1Brutus 1 1 0 1 0 0Caesar 1 1 0 1 1 1Calpurnia 0 1 0 0 0 0Cleopatra 1 0 0 0 0 0mercy 1 0 1 1 1 1worser 1 0 1 1 1 0Introduction to Information RetrievalIntroduction to Information Retrieval Answers to queryAntony and Cleopatra, Act III, Scene iiAgrippa [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 iiLord Polonius: I did enact Julius Caesar I was killed i’ the Capitol; Brutus killed me.13Sec. 1.1Introduction to Information RetrievalIntroduction to Information Retrieval Bigger collectionsConsider 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.14Sec. 1.1Introduction to Information RetrievalIntroduction to Information Retrieval Can’t build the matrix500K x 1M matrix has half-a-trillion 0’s and 1’s.But it has no more than one billion 1’s.matrix is extremely sparse.What’s a better representation?We only record the 1 positions.15Why?Sec. 1.1Introduction to Information RetrievalIntroduction to Information Retrieval Introduction toInformation RetrievalTerm-document incidence matricesIntroduction to Information RetrievalIntroduction to Information Retrieval Introduction toInformation RetrievalThe Inverted IndexThe key
View Full Document