CS 430 INFO 430 Information Retrieval Lecture 6

  • Slides: 38
Download presentation
CS 430 / INFO 430 Information Retrieval Lecture 6 Boolean Methods 1

CS 430 / INFO 430 Information Retrieval Lecture 6 Boolean Methods 1

Course Administration 2

Course Administration 2

CS 430 / INFO 430 Information Retrieval Completion of Lecture 5 3

CS 430 / INFO 430 Information Retrieval Completion of Lecture 5 3

Porter Stemmer A multi-step, longest-match stemmer. M. F. Porter, An algorithm for suffix stripping.

Porter Stemmer A multi-step, longest-match stemmer. M. F. Porter, An algorithm for suffix stripping. (Originally published in Program, 14 no. 3, pp 130 -137, July 1980. ) http: //www. tartarus. org/~martin/Porter. Stemmer/def. txt Notation v c (vc)m vowel(s) constant(s) vowel(s) followed by constant(s), repeated m times Any word can be written: [c](vc)m[v] m is called the measure of the word 4

Porter's Stemmer Porter Stemming Algorithm Complex suffixes are removed bit by bit in the

Porter's Stemmer Porter Stemming Algorithm Complex suffixes are removed bit by bit in the different steps. Thus: GENERALIZATIONS becomes 5 GENERALIZATION (Step 1) GENERALIZE (Step 2) GENERAL (Step 3) GENER (Step 4).

Porter Stemmer: Step 1 a Suffix sses ies ss s 6 Replacement Examples ss

Porter Stemmer: Step 1 a Suffix sses ies ss s 6 Replacement Examples ss caresses -> caress i ponies ties -> poni -> ti ss caress -> caress cats -> cat

Porter Stemmer: Step 1 b Conditions Suffix Replacement Examples (m > 0) eed ee

Porter Stemmer: Step 1 b Conditions Suffix Replacement Examples (m > 0) eed ee feed -> feed agreed -> agree (*v*) ed null plastered -> plaster bled -> bled (*v*) ing null motoring -> motor sing -> sing *v* - the stem contains a vowel 7

Porter Stemmer: Step 5 a (m>1) E -> (m=1 and not *o) E ->

Porter Stemmer: Step 5 a (m>1) E -> (m=1 and not *o) E -> probate -> probat rate -> rate cease -> ceas *o - the stem ends cvc, where the second c is not W, X or Y (e. g. -WIL, -HOP). 8

Stemming in Practice Evaluation studies have found that stemming can affect retrieval performance, usually

Stemming in Practice Evaluation studies have found that stemming can affect retrieval performance, usually for the better, but the results are mixed. • Effectiveness is dependent on the vocabulary. Fine distinctions may be lost through stemming. • Automatic stemming is as effective as manual conflation. • Performance of various algorithms is similar. Porter's Algorithm is entirely empirical, but has proved to be an effective algorithm for stemming English text with trained users. 9

Selection of tokens, weights, stop lists and stemming Special purpose collections (e. g. ,

Selection of tokens, weights, stop lists and stemming Special purpose collections (e. g. , law, medicine, monographs) Best results are obtained by tuning the search engine for the characteristics of the collections and the expected queries. It is valuable to use a training set of queries, with lists of relevant documents, to tune the system for each application. General purpose collections (e. g. , news articles) The modern practice is to use a basic weighting scheme (e. g. , tf. idf), a simple definition of token, a short stop list and little stemming except for plurals, with minimal conflation. 10 Web searching combine similarity ranking with ranking based on document importance.

CS 430 / INFO 430 Information Retrieval Lecture 6 Boolean Methods 11

CS 430 / INFO 430 Information Retrieval Lecture 6 Boolean Methods 11

Exact Matching (Boolean Model) Query Index database Documents Mechanism for determining whether a document

Exact Matching (Boolean Model) Query Index database Documents Mechanism for determining whether a document matches a query. Set of hits 12

Boolean Queries Boolean query: two or more search terms, related by logical operators, e.

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

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

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

Adjacent and Near Operators abacus adj actor Terms abacus and actor are adjacent to

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). 15

Evaluation of Boolean Operators Precedence of operators must be defined: adj, near high and,

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

Evaluating a Boolean Query Examples: abacus and actor Postings for abacus Postings for actor

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

Evaluating an Adjacency Operation Examples: abacus adj actor Postings for abacus Postings for actor

Evaluating an Adjacency Operation Examples: abacus adj actor Postings for abacus Postings for actor 3 94 19 7 19 212 22 56 2 66 19 213 29 45 Document 19, locations 212 and 213, is the only occurrence of the terms "abacus" and "actor" adjacent. 18

Query Matching: Boolean Methods Query: (abacus or asp*) and actor 1. From the index

Query Matching: Boolean Methods Query: (abacus or asp*) and actor 1. From the index file (word list), find the postings file for: "abacus" every word that begins "asp" "actor" 2. Merge these posting lists. For each document that occurs in any of the postings lists, evaluate the Boolean expression to see if it is true or false. 3. Step 2 should be carried out in a single pass. 19

Use of Postings File for Query Matching 20 1 abacus 2 actor 3 aspen

Use of Postings File for Query Matching 20 1 abacus 2 actor 3 aspen 4 atoll 3 94 2 5 11 3 19 7 19 213 11 70 19 212 29 34 40 22 56 66 45 43

Query Matching: Vector Ranking Methods Query: abacus asp* 1. From the index file (word

Query Matching: Vector Ranking Methods Query: abacus asp* 1. From the index file (word list), find the postings file for: "abacus" every word that begins "asp" 2. Merge these posting lists. Calculate the similarity to the query for each document that occurs in any of the postings lists. 3. Sort the similarities to obtain the results in ranked order. 4. Steps 2 and 3 should be carried out in a single pass. 21

Contrast of Ranking with Matching With matching, a document either matches a query exactly

Contrast of Ranking with Matching With matching, a document either matches a query exactly or not at all • Encourages short queries • Requires precise choice of index terms • Requires precise formulation of queries (professional training) With retrieval using similarity measures, similarities range from 0 to 1 for all documents • Encourages long queries, to have as many dimensions as possible • Benefits from large numbers of index terms • Benefits from queries with many terms, not all of which need match the document 22

Problems with the Boolean model Counter-intuitive results: Query q = A and B and

Problems with the Boolean model Counter-intuitive results: Query q = A and B and C and D and E Document d has terms A, B, C and D, but not E Intuitively, d is quite a good match for q, but it is rejected by the Boolean model. Query q = A or B or C or D or E Document d 1 has terms A, B, C, D and E Document d 2 has term A, but not B, C, D or E Intuitively, d 1 is a much better match than d 2, but the Boolean model ranks them as equal. 23

Problems with the Boolean model (continued) Boolean is all or nothing 24 • Boolean

Problems with the Boolean model (continued) Boolean is all or nothing 24 • Boolean model has no way to rank documents. • Boolean model allows for no uncertainty in assigning index terms to documents. • The Boolean model has no provision for adjusting the importance of query terms.

Extending the Boolean model Term weighting • Give weights to terms in documents and/or

Extending the Boolean model Term weighting • Give weights to terms in documents and/or queries. • Combine standard Boolean retrieval with vector ranking of results Fuzzy sets • 25 Relax the boundaries of the sets used in Boolean retrieval

Ranking methods in Boolean systems SIRE (Syracuse Information Retrieval Experiment) Term weights • Add

Ranking methods in Boolean systems SIRE (Syracuse Information Retrieval Experiment) Term weights • Add term weights to documents Weights calculated by the standard method of term frequency * inverse document frequency. Ranking 26 • Calculate results set by standard Boolean methods • Rank results by vector distances

Relevance feedback in SIRE (Syracuse Information Retrieval Experiment) Relevance feedback is particularly important with

Relevance feedback in SIRE (Syracuse Information Retrieval Experiment) Relevance feedback is particularly important with Boolean retrieval because it allow the results set to be expanded 27 • Results set is created by standard Boolean retrieval • User selects one document from results set • Other documents in collection are ranked by vector distance from this document

Boolean model as sets d is either in the set A or not in

Boolean model as sets d is either in the set A or not in A. d A 28

Boolean model as fuzzy sets d is more or less in A. d A

Boolean model as fuzzy sets d is more or less in A. d A 29

Basic concept • A document has a term weight associated with each index term.

Basic concept • A document has a term weight associated with each index term. The term weight measures the degree to which that term characterizes the document. • Term weights are in the range [0, 1]. (In the standard Boolean model all weights are either 0 or 1. ) • For a given query, calculate the similarity between the query and each document in the collection. • This calculation is needed for every document that has a nonzero weight for any of the terms in the query. 30

MMM: Mixed Min and Max model Fuzzy set theory d. A is the degree

MMM: Mixed Min and Max model Fuzzy set theory d. A is the degree of membership of an element to set A intersection (and) d. A B = min(d. A, d. B) union (or) d. A B = max(d. A, d. B) 31

MMM: Mixed Min and Max model Fuzzy set theory example standard set theory 32

MMM: Mixed Min and Max model Fuzzy set theory example standard set theory 32 fuzzy set theory d. A 1 1 0 0 0. 5 d. B 1 0 and d. A B 1 0 0 or d. A B 1 1 1 0. 5 0 0 0. 7 0 0 0. 5 0 0 0. 7 0. 5 0. 7 0

MMM: Mixed Min and Max model Terms: A 1, A 2, . . .

MMM: Mixed Min and Max model Terms: A 1, A 2, . . . , An Document: d, with index-term weights: d 1, d 2, . . . , dn qor = (A 1 or A 2 or. . . or An) Query-document similarity: S(qor, d) = or * max(d 1, d 2, . . , dn) + (1 - or) * min(d 1, d 2, . . , dn) With regular Boolean logic, or = 1 33

MMM: Mixed Min and Max model Terms: A 1, A 2, . . .

MMM: Mixed Min and Max model Terms: A 1, A 2, . . . , An Document: d, with index-term weights: d 1, d 2, . . . , dn qand = (A 1 and A 2 and. . . and An) Query-document similarity: S(qand, d) = and * min(d 1, . . , dn) + (1 - and)* max(d 1, . . , dn) With regular Boolean logic, and = 1 34

MMM: Mixed Min and Max model Experimental values: and in range [0. 5, 0.

MMM: Mixed Min and Max model Experimental values: and in range [0. 5, 0. 8] or > 0. 2 Computational cost is low. Retrieval performance much improved. 35

Other Models Paice model The MMM model considers only the maximum and minimum document

Other Models Paice model The MMM model considers only the maximum and minimum document weights. The Paice model takes into account all of the document weights. Computational cost is higher than MMM. P-norm model Document D, with term weights: d. A 1, d. A 2, . . . , d. An Query terms are given weights, a 1, a 2, . . . , an Operators have coefficients that indicate degree of strictness Query-document similarity is calculated by considering each document and query as a point in n space. 36

Test data CISI CACM INSPEC P-norm 79 106 210 Paice 77 104 206 MMM

Test data CISI CACM INSPEC P-norm 79 106 210 Paice 77 104 206 MMM 68 109 195 Percentage improvement over standard Boolean model (average best precision) Lee and Fox, 1988 37

Reading E. Fox, S. Betrabet, M. Koushik, W. Lee, Extended Boolean Models, Frake, Chapter

Reading E. Fox, S. Betrabet, M. Koushik, W. Lee, Extended Boolean Models, Frake, Chapter 15 Methods based on fuzzy set concepts 38