Docsity

Lecture Slides on Text Processing Overview | CS 410, Study notes of Computer Science

Toggle sidebar
bg1
1
Lecture 2
CS 410/510
Information Retrieval on the Internet
Text Processing Overview
2
Lecture Outline
• Text processing goals
• Accessing content
– Text extraction
• Feature extraction
– Structure
– Terms
• Feature selection/generation
– Text operations
– Selection of index terms
3
Text Processing Goals
• Enable high quality retrieval results
• Represent document content and
characteristics efficiently
– Storage space
– Efficient matching of queries to documents
4
Accessing Document Content
• Identify document types
• Handle each appropriately
5
Challenge Possible approach
Scanned documents OCR
Compressed, encrypted,
zipped files Uncompress, decrypt, unzip
Word processed and other
application-specific
documents
Application-specific handler
Complex HTML pages:
•Frames
•Pages from CMS
•Dynamic content
•Scripts embedded in HTML
Parse HTML to extract
content
Site-specific wrapper?
Accessing Document Content
6
pf3
pf4
pf5

Partial preview of the text

Download Lecture Slides on Text Processing Overview | CS 410 and more Study notes Computer Science in PDF only on Docsity!

Lecture 2

CS 410/

Information Retrieval on the Internet

Text Processing Overview

2

Lecture Outline

• Text processing goals

• Accessing content

– Text extraction

• Feature extraction

– Structure

– Terms

• Feature selection/generation

– Text operations

– Selection of index terms

3

Text Processing Goals

• Enable high quality retrieval results

• Represent document content and

characteristics efficiently

– Storage space

– Efficient matching of queries to documents

4

Accessing Document Content

• Identify document types

• Handle each appropriately

5

Challenge Possible approach

Scanned documents OCR

Compressed, encrypted, zipped files

Uncompress, decrypt, unzip

Word processed and other application-specific documents

Application-specific handler

Complex HTML pages:

•Frames •Pages from CMS

•Dynamic content

•Scripts embedded in HTML

Parse HTML to extract content Site-specific wrapper?

Accessing Document Content

6

7 8

(Part-of-Speech (POS) Tagging) endobj 89 0 obj << /S /GoTo /D (Outline7.8.56) >> endobj 92 0 obj (Chunking and Parsing) endobj 93 0 obj << /S /GoTo /D (Outline7.9.64) >> endobj 96 0 obj (Semantics) endobj 97 0 obj << /S /GoTo /D (Outline7.10.71) >> endobj 100 0 obj (Pragmatics: Co-reference resolution) endobj 101 0 obj << /S /GoTo /D (Outline8) >> endobj 104 0 obj (Performance Evaluation) endobj

Excerpt from a PDF file

9

ÐÏࡱá >  þÿ   5  7  þÿÿÿ 4 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿì¥Á q`  ø¿   ß  bjbjqPqP  8 : : ß ÿÿ ÿÿ ÿÿ ¤ Ü Ü Ü Ü Ü Ü Ü  ð ” ” ” ”   ð ä 2 À  Ö Ö Ö Ö Ö Ö Ö c  e e e e e e $  h ~ j ‰  Ü   Ö Ö Ü Ö Ü Ö c  Ö ´  H}A¦Æ ” ¬ " ß  c ´ 0 ä ë x è Î

. è  c è Ü c Ö Ö  Ö Ö Ö Ö Ö ‰ ‰ ü Ö Ö Ö ä Ö Ö Ö Ö ð ð ð ¤ ” ð ð ð ” ð ð ð Ü Ü Ü Ü Ü Ü ÿÿÿÿ    HYPERLINK "http://www.ultraseek.com/support/docs/UltraseekAdmin/wwhelp/wwhimpl/js/html/starthelp.htm" http://www.ultraseek.com/support/docs/UltraseekAdmin/wwhelp/wwhimpl/js/html/starthelp.ht m

Importing from Ultraseek

Ultraseek collection configurations are text files named configuration that are located in the directory you specified during installation to hold search data. This section explains how to import these files so that Ultraseek can re-create the described collection.

Excerpt from a Word file

10

Identifying Document Structure

• To extract text

• To exploit structure for searching

• Examples

– Complex web pages

– Title, metadata, headings

– Chapter, section, paragraph, sentence

  • What is a sentence? How do you recognize one?

– Email: header, body, attachment

– Tables

Washington D.C. is the capital of the U.S. and Salem O.R. is a state capital. The D.C. metro is a convenient subway. At clerk.house.gov you can find a listing of members of the U.S. congress including Peter A. DeFazio, John Conyers Jr. and Jim McDermott, who is also sometimes known as Dr. Jim McDermott because he has an M.D. degree.

How to automatically recognize a sentence?

Header

source recipient(s)

Body

date subject

Document structure: email

19 20

Lexical analysis

• Hyphens

– Usage often varies

– May or may not change meaning

  • world wide , world-wide , worldwide
  • client server , client-server , client/server , ClientServer
  • A-Boy , a boy

– Generally want to conflate different forms that

refer to the same concept

– What do current search engines do?

  • Are results for Baeza-Yates == Baeza Yates?

21

Lexical analysis

• Case (upper case, lower case, mixed)

  • Case can be useful for distinguishing proper nouns and acronyms
  • Most search engines appear to convert all text to lower or upper case - Grant == grant on Google, Yahoo, MSN - Bush == bush on Google, Yahoo, MSN - Or do they? - look further down in the Google results; order differs slightly
  • Ultraseek (commercial software for website/intranet use) - if query is lower case, matching is case-insensitive - If query has any upper case characters, matching is exact only

22

Lexical analysis

• Digits

– Baeza-Yates text suggests that digits generally

not very useful

  • What about addresses, phone numbers, numbers with significant meaning? (e.g. 911 )

– Major search engines do index digits

  • Perhaps related to ability to handle larger vocabularies than when textbook written?

Stemming

• Purpose is to conflate inflexional variations on a

word that refer to the same concept

  • singular and plural forms of nouns
  • different tenses of the same verb
  • query rain cat dog should match “ raining cats and dogs ”

• Okay if stemmed form is not meaningful

  • User doesn’t see or care that computing in query and computed in text were both stemmed to comput

• Obviously is language dependent

  • Inflexions in English are different from those in French

Stemming strategies (1)

• Algorithmic

  • Affix removal
    • Usually only remove suffixes since prefixes often change meaning of the word (e.g. do, undo)
  • Successor variety
    • Finds boundaries between morphemes (word segments)
    • Morphemes are the smallest linguistic units with semantic meaning (e.g. unreadable un-read-able)
    • Successor variety of a string is the number of different characters that follow it in words in some body of text. - Text: read, readable, reading, reads, red, rope, ripe - RÆ3, REÆ2, REAÆ1, READÆ3, READAÆ1, READABÆ1, READABLÆ1, READABLEÆ 1
    • Look for peak and plateau to break words

25

Stemming strategies (2)

• Algorithmic, cont.

  • N-grams
    • An N-gram is a sub-sequence of length n from a sequence
    • Uses character sequences within words
    • Clusters words based on number of shared N-grams
    • Language-independent

• Dictionary

  • Table lookup

• Mixed

  • Use algorithm with table lookup for exceptions

26

Stemming

Porter Stemmer Output

a a

abate abat

abatement abat abbess abbess

abjectly abjectli

abide abid abides abid

abase abas

abated abat

abbey abbei

27

Stemming Errors

• Understemming

  • Words that should be conflated are not

• Overstemming

  • Words are conflated that do not share meaning

• Mis-stemming

  • Removing an ending that is part of the stem: rep ly

• What words should be conflated may depend on

context

• See discussion on web-site for the Lancaster

(Paice/Husk) stemming algorithm, especially

http://www.comp.lancs.ac.uk/computing/research/stemming/Links/error.htm

Examples?

Examples?

28

Stemming

• Effect on retrieval is controversial

• Some claim it improves recall but may

degrade precision

• Probably depends on many factors:

– Language

– Stemming method

– Document collection

– Queries

– Nature of user task

29

Stemming summary

Advantages

Searcher doesn’t have to anticipate author’s exact usage tsunami can match: •What happens to a tsunami as it approaches land?

  • Tsunamis have been historically referred to as tidal waves because ...

May increase recall

Results in more compact indexing vocabulary

Disadvantages May decrease precision •Might want to match specific word •Might be okay for query tired to match other forms of to tire , but not automobile tire Stemming can change meaning

  • bushing – an insulating liner in an opening through which conductors pass
  • bush - A low shrub with many branches Stemming algorithms imperfect – occasionally lead to some odd results 30

Stemming

• Do the major search engines stem?

• If so, how?

37 38

to andbe not eliminated in ad search

to andbe do appear to be eliminated in web search

39 40

Index term selection

• Automated

– All words in text (+/- stopwords)

– Nouns only

– Noun groups

– Statistically common phrases

• Manual

– Terms assigned from a controlled vocabulary

– Freely-selected indexing terms

Tradeoffs

• What are some of the tradeoffs involved in

pre-processing documents before

indexing?