2010.02.01- SLIDE 1IS 240 – Spring 2010 Prof. Ray Larson University of California, Berkeley School of Information Principles of Information Retrieval Lecture.

Slides:



Advertisements
Similar presentations
Chapter 5: Introduction to Information Retrieval
Advertisements

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.
Probabilistic Language Processing Chapter 23. Probabilistic Language Models Goal -- define probability distribution over set of strings Unigram, bigram,
Intelligent Information Retrieval 1 Vector Space Model for IR: Implementation Notes CSC 575 Intelligent Information Retrieval These notes are based, in.
CS 430 / INFO 430 Information Retrieval
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 18: Hash Tables.
Information Retrieval in Practice
9/11/2000Information Organization and Retrieval Content Analysis and Statistical Properties of Text Ray Larson & Marti Hearst University of California,
SLIDE 1IS 240 – Spring 2010 Prof. Ray Larson University of California, Berkeley School of Information Principles of Information Retrieval.
9/11/2001Information Organization and Retrieval Content Analysis and Statistical Properties of Text Ray Larson & Warren Sack University of California,
SIMS 202 Information Organization and Retrieval Prof. Marti Hearst and Prof. Ray Larson UC Berkeley SIMS Tues/Thurs 9:30-11:00am Fall 2000.
SLIDE 1IS 240 – Spring 2007 Prof. Ray Larson University of California, Berkeley School of Information Tuesday and Thursday 10:30 am - 12:00.
1 CS 430 / INFO 430 Information Retrieval Lecture 4 Searching Full Text 4.
Anatomy of a Large-Scale Hypertextual Web Search Engine (e.g. Google)
1 CS 430: Information Discovery Lecture 3 Inverted Files and Boolean Operations.
SLIDE 1IS 240 – Spring 2009 Prof. Ray Larson University of California, Berkeley School of Information Principles of Information Retrieval.
SLIDE 1IS 240 – Spring 2007 Prof. Ray Larson University of California, Berkeley School of Information Tuesday and Thursday 10:30 am - 12:00.
SLIDE 1IS 240 – Spring 2007 Prof. Ray Larson University of California, Berkeley School of Information Tuesday and Thursday 10:30 am - 12:00.
SLIDE 1IS 240 – Spring 2009 Prof. Ray Larson University of California, Berkeley School of Information Principles of Information Retrieval.
9/6/2001Information Organization and Retrieval Introduction to Information Retrieval (cont.): Boolean Model University of California, Berkeley School of.
SLIDE 1IS 240 – Spring 2007 Prof. Ray Larson University of California, Berkeley School of Information Tuesday and Thursday 10:30 am - 12:00.
SLIDE 1IS 240 – Spring 2006 Prof. Ray Larson University of California, Berkeley School of Information Management & Systems Tuesday and Thursday.
SLIDE 1IS 240 – Spring 2007 Prof. Ray Larson University of California, Berkeley School of Information Tuesday and Thursday 10:30 am - 12:00.
SLIDE 1IS 240 – Spring 2010 Prof. Ray Larson University of California, Berkeley School of Information Principles of Information Retrieval.
8/28/97Information Organization and Retrieval IR Implementation Issues, Web Crawlers and Web Search Engines University of California, Berkeley School of.
SLIDE 1IS 240 – Spring 2011 Prof. Ray Larson University of California, Berkeley School of Information Principles of Information Retrieval Lecture.
9/14/2000Information Organization and Retrieval Vector Representation, Term Weights and Clustering Ray Larson & Marti Hearst University of California,
1 Basic Text Processing and Indexing. 2 Document Processing Steps Lexical analysis (tokenizing) Stopwords removal Stemming Selection of indexing terms.
SLIDE 1IS 202 – FALL 2002 Prof. Ray Larson & Prof. Marc Davis UC Berkeley SIMS Tuesday and Thursday 10:30 am - 12:00 pm Fall 2002
1 CS 430 / INFO 430 Information Retrieval Lecture 10 Probabilistic Information Retrieval.
- SLAYT 1BBY220 Content Analysis & Stemming Yaşar Tonta Hacettepe Üniversitesi yunus.hacettepe.edu.tr/~tonta/ BBY220 Bilgi Erişim.
SLIDE 1IS 202 – FALL 2004 Prof. Ray Larson & Prof. Marc Davis UC Berkeley SIMS Tuesday and Thursday 10:30 am - 12:00 pm Fall 2004
SLIDE 1IS 240 – Spring 2011 Prof. Ray Larson University of California, Berkeley School of Information Principles of Information Retrieval.
Web Search – Summer Term 2006 II. Information Retrieval (Basics) (c) Wolfgang Hürst, Albert-Ludwigs-University.
SLIDE 1IS 240 – Spring 2009 Prof. Ray Larson University of California, Berkeley School of Information Principles of Information Retrieval.
1 CS 430: Information Discovery Lecture 2 Introduction to Text Based Information Retrieval.
SLIDE 1IS 240 – Spring 2007 Prof. Ray Larson University of California, Berkeley School of Information Tuesday and Thursday 10:30 am - 12:00.
Search engines fdm 20c introduction to digital media lecture warren sack / film & digital media department / university of california, santa.
SLIDE 1IS 240 – Spring 2007 Prof. Ray Larson University of California, Berkeley School of Information Tuesday and Thursday 10:30 am - 12:00.
Chapter 5: Information Retrieval and Web Search
Overview of Search Engines
SLIDE 1IS 240 – Spring 2013 Prof. Ray Larson University of California, Berkeley School of Information Principles of Information Retrieval Lecture.
1 CS 430 / INFO 430 Information Retrieval Lecture 2 Text Based Information Retrieval.
Information Retrieval and Web Search Text properties (Note: some of the slides in this set have been adapted from the course taught by Prof. James Allan.
LIS618 lecture 2 the Boolean model Thomas Krichel
CSE 6331 © Leonidas Fegaras Information Retrieval 1 Information Retrieval and Web Search Engines Leonidas Fegaras.
1 Information Retrieval Acknowledgements: Dr Mounia Lalmas (QMW) Dr Joemon Jose (Glasgow)
Search Engines WS 2009 / 2010 Prof. Dr. Hannah Bast Chair of Algorithms and Data Structures Department of Computer Science University of Freiburg Lecture.
Exploring Text: Zipf’s Law and Heaps’ Law. (a) (b) (a) Distribution of sorted word frequencies (Zipf’s law) (b) Distribution of size of the vocabulary.
1 CS 430: Information Discovery Lecture 3 Inverted Files.
Chapter 6: Information Retrieval and Web Search
Information Retrieval Model Aj. Khuanlux MitsophonsiriCS.426 INFORMATION RETRIEVAL.
SLIDE 1IS 240 – Spring 2009 Prof. Ray Larson University of California, Berkeley School of Information Principles of Information Retrieval.
1 Information Retrieval LECTURE 1 : Introduction.
Information Retrieval
Exploring Text: Zipf’s Law and Heaps’ Law. (a) (b) (a) Distribution of sorted word frequencies (Zipf’s law) (b) Distribution of size of the vocabulary.
Statistical Properties of Text
Search and Retrieval: Finding Out About Prof. Marti Hearst SIMS 202, Lecture 18.
Relevance Feedback Prof. Marti Hearst SIMS 202, Lecture 24.
Selecting Relevant Documents Assume: –we already have a corpus of documents defined. –goal is to return a subset of those documents. –Individual documents.
1 CS 8803 AIAD (Spring 2008) Project Group#22 Ajay Choudhari, Avik Sinharoy, Min Zhang, Mohit Jain Smart Seek.
Intelligent Information Retrieval
Why indexing? For efficient searching of a document
Lecture 1: Introduction and the Boolean Model Information Retrieval
Indexing & querying text
Text Based Information Retrieval
CS 430: Information Discovery
Implementation Issues & IR Systems
Token generation - stemming
Content Analysis of Text
Presentation transcript:

SLIDE 1IS 240 – Spring 2010 Prof. Ray Larson University of California, Berkeley School of Information Principles of Information Retrieval Lecture 4: IR System Elements (cont)

SLIDE 2IS 240 – Spring 2010 Review –Elements of IR Systems Collections, Queries Text processing and Zipf distribution Stemmers and Morphological analysis (cont…) Inverted file indexes

SLIDE 3IS 240 – Spring 2010 Queries A query is some expression of a user’s information needs Can take many forms –Natural language description of need –Formal query in a query language Queries may not be accurate expressions of the information need –Differences between conversation with a person and formal query expression

SLIDE 4IS 240 – Spring 2010 Collections of Documents… Documents –A document is a representation of some aggregation of information, treated as a unit. Collection –A collection is some physical or logical aggregation of documents Let’s take the simplest case, and say we are dealing with a computer file of plain ASCII text, where each line represents the “UNIT” or document.

SLIDE 5IS 240 – Spring 2010 How to search that collection? Manually? –Cat, more Scan for strings? –Grep Extract individual words to search??? –“tokenize” (a unix pipeline) tr -sc ’A-Za-z’ ’\012’ < TEXTFILE | sort | uniq –c –See “Unix for Poets” by Ken Church Put it in a DBMS and use pattern matching there… –assuming the lines are smaller than the text size limits for the DBMS

SLIDE 6IS 240 – Spring 2010 What about VERY big files? Scanning becomes a problem The nature of the problem starts to change as the scale of the collection increases A variant of Parkinson’s Law that applies to databases is: –Data expands to fill the space available to store it

SLIDE 7 Document Processing Steps

SLIDE 8IS 240 – Spring 2010 Structure of an IR System Search Line Interest profiles & Queries Documents & data Rules of the game = Rules for subject indexing + Thesaurus (which consists of Lead-In Vocabulary and Indexing Language Storage Line Potentially Relevant Documents Comparison/ Matching Store1: Profiles/ Search requests Store2: Document representations Indexing (Descriptive and Subject) Formulating query in terms of descriptors Storage of profiles Storage of Documents Information Storage and Retrieval System Adapted from Soergel, p. 19

SLIDE 9IS 240 – Spring 2010 Query Processing In order to correctly match queries and documents they must go through the same text processing steps as the documents did when they were stored In effect, the query is treated like it was a document Exceptions (of course) include things like structured query languages that must be parsed to extract the search terms and requested operations from the query –The search terms must still go through the same text process steps as the document…

SLIDE 10IS 240 – Spring 2010 Steps in Query processing Parsing and analysis of the query text (same as done for the document text) –Morphological Analysis –Statistical Analysis of text

SLIDE 11IS 240 – Spring 2010 Stemming and Morphological Analysis Goal: “normalize” similar words Morphology (“form” of words) –Inflectional Morphology E.g,. inflect verb endings and noun number Never change grammatical class –dog, dogs –tengo, tienes, tiene, tenemos, tienen –Derivational Morphology Derive one word from another, Often change grammatical class –build, building; health, healthy

SLIDE 12IS 240 – Spring 2010 Plotting Word Frequency by Rank Say for a text with 100 tokens Count –How many tokens occur 1 time (50) –How many tokens occur 2 times (20) … –How many tokens occur 7 times (10) … –How many tokens occur 12 times (1) –How many tokens occur 14 times (1) So things that occur the most often share the highest rank (rank 1). Things that occur the fewest times have the lowest rank (rank n).

SLIDE 13IS 240 – Spring 2010 Many similar distributions… Words in a text collection Library book checkout patterns Bradford’s and Lotka’s laws. Incoming Web Page Requests (Nielsen) Outgoing Web Page Requests (Cunha & Crovella) Document Size on Web (Cunha & Crovella)

SLIDE 14 Zipf Distribution (linear and log scale)

SLIDE 15IS 240 – Spring 2010 Resolving Power (van Rijsbergen 79) The most frequent words are not the most descriptive.

SLIDE 16IS 240 – Spring 2010 Other Models Poisson distribution 2-Poisson Model Negative Binomial Katz K-mixture –See Church (SIGIR 1995)

SLIDE 17IS 240 – Spring 2010

SLIDE 18IS 240 – Spring 2010 Stemming and Morphological Analysis Goal: “normalize” similar words Morphology (“form” of words) –Inflectional Morphology E.g,. inflect verb endings and noun number Never change grammatical class –dog, dogs –tengo, tienes, tiene, tenemos, tienen –Derivational Morphology Derive one word from another, Often change grammatical class –build, building; health, healthy

SLIDE 19IS 240 – Spring 2010 Stemming and Morphological Analysis Goal: “normalize” similar words Morphology (“form” of words) –Inflectional Morphology E.g,. inflect verb endings and noun number Never change grammatical class –dog, dogs –tengo, tienes, tiene, tenemos, tienen –Derivational Morphology Derive one word from another, Often change grammatical class –build, building; health, healthy

SLIDE 20IS 240 – Spring 2010 Simple “S” stemming IF a word ends in “ies”, but not “eies” or “aies” –THEN “ies”  “y” IF a word ends in “es”, but not “aes”, “ees”, or “oes” –THEN “es”  “e” IF a word ends in “s”, but not “us” or “ss” –THEN “s”  NULL Harman, JASIS Jan. 1991

SLIDE 21IS 240 – Spring 2010 Stemmer Examples The SMART stemmer The Porter stemmer The IAGO! stemmer % tstem ate ate % tstem apples appl % tstem formulae formul % tstem appendices appendix % tstem implementation imple % tstem glasses glass % pstem ate at % pstem apples appl % pstem formulae formula % pstem appendices appendic % pstem implementation implement % pstem glasses glass % stem ate|2 eat|2 apples|1 apple|1 formulae|1 formula|1 appendices|1 appendix|1 implementation|1 glasses|1

SLIDE 22IS 240 – Spring 2010 Too AggressiveToo Timid organization/organ policy/police execute/executive arm/army european/europe cylinder/cylindrical create/creation search/searcher Errors Generated by Porter Stemmer (Krovetz 93)

SLIDE 23IS 240 – Spring 2010 Automated Methods Stemmers: –Very dumb rules work well (for English) –Porter Stemmer: Iteratively remove suffixes –Improvement: pass results through a lexicon Newer stemmers are configurable (Snowball) –Demo… Powerful multilingual tools exist for morphological analysis –PCKimmo, Xerox Lexical technology –Require a grammar and dictionary –Use “two-level” automata –Wordnet “morpher”

SLIDE 24IS 240 – Spring 2010 Wordnet Type “wn word” on a machine where wordnet is installed… Large exception dictionary: Demo aardwolves aardwolf abaci abacus abacuses abacus abbacies abbacy abhenries abhenry abilities ability abkhaz abnormalities abnormality aboideaus aboideau aboideaux aboideau aboiteaus aboiteau aboiteaux aboiteau abos abo abscissae abscissa abscissas abscissa absurdities absurdity …

SLIDE 25IS 240 – Spring 2010 Using NLP Strzalkowski (in Reader) TextNLPrepres Dbase search TAGGER NLP: PARSERTERMS

SLIDE 26IS 240 – Spring 2010 Using NLP INPUT SENTENCE The former Soviet President has been a local hero ever since a Russian tank invaded Wisconsin. TAGGED SENTENCE The/dt former/jj Soviet/jj President/nn has/vbz been/vbn a/dt local/jj hero/nn ever/rb since/in a/dt Russian/jj tank/nn invaded/vbd Wisconsin/np./per

SLIDE 27IS 240 – Spring 2010 Using NLP TAGGED & STEMMED SENTENCE the/dt former/jj soviet/jj president/nn have/vbz be/vbn a/dt local/jj hero/nn ever/rb since/in a/dt russian/jj tank/nn invade/vbd wisconsin/np./per

SLIDE 28IS 240 – Spring 2010 Using NLP PARSED SENTENCE [assert [[perf [have]][[verb[BE]] [subject [np[n PRESIDENT][t_pos THE] [adj[FORMER]][adj[SOVIET]]]] [adv EVER] [sub_ord[SINCE [[verb[INVADE]] [subject [np [n TANK][t_pos A] [adj [RUSSIAN]]]] [object [np [name [WISCONSIN]]]]]]]]]

SLIDE 29IS 240 – Spring 2010 Using NLP EXTRACTED TERMS & WEIGHTS President soviet President+soviet president+former Hero hero+local Invade tank Tank+invade tank+russian Russian wisconsin

SLIDE 30IS 240 – Spring 2010 Same Sentence, different sys Enju Parser ROOTROOTROOTROOT-1ROOTbeenbeVBNVB5 beenbeVBNVB5ARG1PresidentpresidentNNPNNP3 beenbeVBNVB5ARG2heroheroNNNN8 aaDTDT6ARG1heroheroNNNN8 aaDTDT11ARG1tanktankNNNN13 locallocalJJJJ7ARG1heroheroNNNN8 ThetheDTDT0ARG1PresidentpresidentNNPNNP3 formerformerJJJJ1ARG1PresidentpresidentNNPNNP3 RussianrussianJJJJ12ARG1tanktankNNNN13 SovietsovietNNPNNP2MODPresidentpresidentNNPNNP3 invadedinvadeVBDVB14ARG1tanktankNNNN13 invadedinvadeVBDVB14ARG2WisconsinwisconsinNNPNNP15 hashaveVBZVB4ARG1PresidentpresidentNNPNNP3 hashaveVBZVB4ARG2beenbeVBNVB5 sincesinceININ10MODbeenbeVBNVB5 sincesinceININ10ARG1invadedinvadeVBDVB14 evereverRBRB9ARG1sincesinceININ10

SLIDE 31IS 240 – Spring 2010 Other Considerations Church (SIGIR 1995) looked at correlations between forms of words in texts

SLIDE 32IS 240 – Spring 2010 Assumptions in IR Statistical independence of terms Dependence approximations

SLIDE 33IS 240 – Spring 2010 Statistical Independence Two events x and y are statistically independent if the product of their probability of their happening individually equals their probability of happening together.

SLIDE 34IS 240 – Spring 2010 Statistical Independence and Dependence What are examples of things that are statistically independent? What are examples of things that are statistically dependent?

SLIDE 35IS 240 – Spring 2010 Statistical Independence vs. Statistical Dependence How likely is a red car to drive by given we’ve seen a black one? How likely is the word “ambulence” to appear, given that we’ve seen “car accident”? Color of cars driving by are independent (although more frequent colors are more likely) Words in text are not independent (although again more frequent words are more likely)

SLIDE 36IS 240 – Spring 2010 Lexical Associations Subjects write first word that comes to mind –doctor/nurse; black/white (Palermo & Jenkins 64) Text Corpora yield similar associations One measure: Mutual Information (Church and Hanks 89) If word occurrences were independent, the numerator and denominator would be equal (if measured across a large collection)

SLIDE 37IS 240 – Spring 2010 Interesting Associations with “Doctor” (AP Corpus, N=15 million, Church & Hanks 89) I(x,y)f(x,y)f(x)xf(y)y honorary doctors examined doctors doctor doctor dentists nurses treating doctor treat bills

SLIDE 38IS 240 – Spring 2010 These associations were likely to happen because the non-doctor words shown here are very common and therefore likely to co-occur with any noun. Un-Interesting Associations with “Doctor” I(x,y)f(x,y)f(x)xf(y)y doctor a is with doctors

SLIDE 39IS 240 – Spring 2010 Query Processing Once the text is in a form to match to the indexes then the fun begins –What approach to use? Boolean? Extended Boolean? Ranked –Fuzzy sets? –Vector? –Probabilistic? –Language Models? –Neural nets? Most of the next few weeks will be looking at these different approaches

SLIDE 40IS 240 – Spring 2010 Display and formatting Have to present the the results to the user Lots of different options here, mostly governed by –How the actual document is stored –And whether the full document or just the metadata about it is presented

SLIDE 41IS 240 – Spring 2010 What to do with terms… Once terms have been extracted from the documents, they need to be stored in some way that lets you get back to documents that those terms came from The most common index structure to do this in IR systems is the “Inverted File”

SLIDE 42IS 240 – Spring 2010 Boolean Implementation: Inverted Files We will look at “Vector files” in detail later. But conceptually, an Inverted File is a vector file “inverted” so that rows become columns and columns become rows

SLIDE 43IS 240 – Spring 2010 How Are Inverted Files Created Documents are parsed to extract words (or stems) and these are saved with the Document ID. Now is the time for all good men to come to the aid of their country Doc 1 It was a dark and stormy night in the country manor. The time was past midnight Doc 2 Text Proc Steps

SLIDE 44IS 240 – Spring 2010 How Inverted Files are Created After all document have been parsed the inverted file is sorted

SLIDE 45IS 240 – Spring 2010 How Inverted Files are Created Multiple term entries for a single document are merged and frequency information added

SLIDE 46IS 240 – Spring 2010 Inverted Files The file is commonly split into a Dictionary and a Postings file

SLIDE 47IS 240 – Spring 2010 Inverted files Permit fast search for individual terms Search results for each term is a list of document IDs (and optionally, frequency and/or positional information) These lists can be used to solve Boolean queries: –country: d1, d2 –manor: d2 –country and manor: d2

SLIDE 48IS 240 – Spring 2010 Inverted Files Lots of alternative implementations –E.g.: Cheshire builds within-document frequency using a hash table during document parsing. Then Document IDs and frequency info are stored in a BerkeleyDB B- tree index keyed by the term.

SLIDE 49IS 240 – Spring 2010 Btree (conceptual) B | | D | | F | Aces Boilers Cars F | | P | | Z | R | | S | | Z |H | | L | | P | Devils Minors Panthers Seminoles Flyers Hawkeyes Hoosiers

SLIDE 50IS 240 – Spring 2010 Btree with Postings B | | D | | F | Aces Boilers Cars F | | P | | Z | R | | S | | Z |H | | L | | P | Devils Minors Panthers Seminoles Flyers Hawkeyes Hoosiers 2,4,8,12 5, 7, 200 2,4,8,12 8,120

SLIDE 51IS 240 – Spring 2010 Inverted files Permit fast search for individual terms Search results for each term is a list of document IDs (and optionally, frequency, part of speech and/or positional information) These lists can be used to solve Boolean queries: –country: d1, d2 –manor: d2 –country and manor: d2

SLIDE 52IS 240 – Spring 2010 Query Processing Once the text is in a form to match to the indexes then the fun begins –What approach to use? Boolean? Extended Boolean? Ranked –Fuzzy sets? –Vector? –Probabilistic? –Language Models? –Neural nets? Most of the next few weeks will be looking at these different approaches

SLIDE 53IS 240 – Spring 2010 Display and formatting Have to present the the results to the user Lots of different options here, mostly governed by –How the actual document is stored –And whether the full document or just the metadata about it is presented