1 cs 430 / info 430 information retrieval lecture 5 text processing methods 1

25
1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

Post on 22-Dec-2015

250 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

1

CS 430 / INFO 430 Information Retrieval

Lecture 5

Text Processing Methods 1

Page 2: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

2

Course Administration

Discussion classes

In preparing for the discussion classes, you might look at last year's web site:

http://www.cs.cornell.edu/Courses/cs430/2003fa/index.html

Often the reading was set last year and the questions will be similar.

Page 3: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

3

Books on Information Retrieval

Ricardo Baeza-Yates and Berthier Ribeiro-Neto, Modern Information Retrieval, Addison Wesley, 1999.

Covers most of the standard topics. Chapters vary in quality.

William B. Frakes and Ricardo Baeza-Yates, Information Retrieval Data Structures and Algorithms.  Prentice Hall, 1992.

Good coverage of algorithms, but out of date. Several good chapters.

G. Salton and M. J. McGill, Introduction to Modern Information Retrieval, McGraw-Hill, 1983.

The classic description of the underlying methods.

Page 4: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

4

SMART System

An experimental system for automatic information retrieval

• automatic indexing to assign terms to documents and queries

• collect related documents into common subject classes

• identify documents to be retrieved by calculating similarities between documents and queries

• procedures for producing an improved search query based on information obtained from earlier searches

Gerald Salton and colleagues Harvard 1964-1968 Cornell 1968-1988

Page 5: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

5

Information Retrieval Family Trees

Gerald Salton Cornell

Donna Harman NIST

Michael Lesk Bell Labs, etc.

Karen Sparck Jones Cambridge

Keith Van Rijsbergen Glasgow

Bruce Croft University of Massachusetts, Amherst

Cyril Cleverdon Cranfield

Page 6: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

6

Indexing Subsystem

Documents

break into tokens

stop list*

stemming*

term weighting*

Index database

text

non-stoplist tokens

tokens

stemmed terms

terms with weights

*Indicates optional operation.

assign document IDsdocuments

document numbers

and *field numbers

Page 7: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

7

Search Subsystem

Index database

query parse query

stemming*stemmed terms

stop list* non-stoplist tokens

query tokens

Boolean operations*

ranking*

relevant document set

ranked document set

retrieved document set

*Indicates optional operation.

Page 8: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

8

Oxford English Dictionary

Page 9: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

9

Lexical Analysis: Tokens

What is a token?

Free text indexing

A token is a group of characters, extracted from the input string, that has some collective significance, e.g., a complete word.

Usually, tokens are strings of letters, digits or other specified characters, separated by punctuation, spaces, etc.

Page 10: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

10

Lexical Analysis: Choices

Punctuation: In technical contexts, punctuation may be used as a character within a term, e.g., wordlist.txt.

Case: Case of letters is usually not significant.

Hyphens:

(a) Treat as separators: state-of-art is treated as state of art.

(b) Ignore: on-line is treated as online.

(c) Retain: Knuth-Morris-Pratt Algorithm is unchanged.

Digits: Most numbers do not make good tokens, but some are parts of proper nouns or technical terms: CS430, Opus 22.

Page 11: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

11

Lexical Analysis: Choices

The modern tendency, for free text searching, is to map upper and lower case letters together in index terms, but otherwise to minimize the changes made at the lexical analysis stage.

Page 12: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

12

Lexical Analysis Example: Query Analyzer

A token is a letter followed by a sequence of letters and digits.

Upper case letters are mapped into the lower case equivalents.

The following characters have significance as operators:

( ) & |

Page 13: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

13

Lexical Analysis: Transition Diagram

0

1

2

3

4

5

6

7

letter ()

&

|

other

end-of-string

space

letter, digit

Page 14: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

14

Lexical Analysis: Transition Table

State space letter ( ) & | other end-of digit string

0 0 1 2 3 4 5 6 7 6 1 1 1 1 1 1 1 1 1 1

States in red are final states.

Page 15: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

15

This use of a transition table allows the system administrator to establish differ lexical choices for different collections of documents.

Example:

To change the lexical analyzer to accept tokens that begin with a digit, change the top right element of the table to 1.

Changing the Lexical Analyzer

Page 16: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

16

Very common words, such as of, and, the, are rarely of use in information retrieval.

A stop list is a list of such words that are removed during lexical analysis.

A long stop list saves space in indexes, speeds processing, and eliminates many false hits.

However, common words are sometimes significant in information retrieval, which is an argument for a short stop list. (Consider the query, "To be or not to be?")

Stop Lists

Page 17: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

17

Suggestions for Including Words in a Stop List

• Include the most common words in the English language (perhaps 50 to 250 words).

• Do not include words that might be important for retrieval (Among the 200 most frequently occurring words in general literature in English are time, war, home, life, water, and world).

• In addition, include words that are very common in context (e.g., computer, information, system in a set of computing documents).

Page 18: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

18

Example: Stop List for Assignment 1

a about an and

are as at be

but by for from

has have he his

in is it its

more new of on

one or said say

that the their they

this to was who

which will with you

Page 19: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

19

Example: the WAIS stop list(first 84 of 363 multi-letter words)

about above according across actually adj after afterwards again against all almost alone along already also although always among amongst an another any anyhow anyone anything anywhere are aren't around at be became because become becomes becoming been before beforehand begin beginning behind being below beside besides between beyond billion both but by can can't cannot caption co could couldn't did didn't do does doesn't don't down during each eg eight eighty either else elsewhere end ending enough etc even ever every everyone everything

Page 20: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

20

Stop list policies

How many words should be in the stop list?

• Long list lowers recall

Which words should be in list?

• Some common words may have retrieval importance:-- war, home, life, water, world

• In certain domains, some words are very common:-- computer, program, source, machine, language

There is very little systematic evidence to use in selecting a stop list.

Page 21: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

21

Stop Lists in Practice

The modern tendency is:

(a) have very short stop lists for broad-ranging or multi-lingual document collections, especially when the users are not trained.

(b) have longer stop lists for document collections in well-defined fields, especially when the users are trained professional.

Page 22: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

22

Stemming

Morphological variants of a word (morphemes). Similar terms derived from a common stem:

engineer, engineered, engineeringuse, user, users, used, using

Stemming in Information Retrieval. Grouping words with a common stem together.

For example, a search on reads, also finds read, reading, and readable

Stemming consists of removing suffixes and conflating the resulting morphemes. Occasionally, prefixes are also removed.

Page 23: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

23

Categories of Stemmer

The following diagram illustrate the various categories of stemmer. Porter's algorithm is shown by the red path.

Conflation methods

Manual Automatic (stemmers)

Affix Successor Table n-gramremoval variety lookup

Longest Simplematch removal

Page 24: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

24

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.

Page 25: 1 CS 430 / INFO 430 Information Retrieval Lecture 5 Text Processing Methods 1

25

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., web search)

The modern practice is to use a basic weighting scheme (e.g., tf.idf), a simple definition of token, a short stop list and no stemming except for plurals, with minimal conflation.

Web searching combine similarity ranking with ranking based on document importance.