information extraction lecture 5 – named entity recognition iii

64
Information Extraction Lecture 5 – Named Entity Recognition III CIS, LMU München Winter Semester 2013-2014 Dr. Alexander Fraser

Upload: enya

Post on 25-Feb-2016

48 views

Category:

Documents


1 download

DESCRIPTION

Information Extraction Lecture 5 – Named Entity Recognition III. CIS, LMU München Winter Semester 2013-2014 Dr. Alexander Fraser. Seminar. We currently have 30 people who want do do a Referat Single person slots: 18-20 minutes for presentation Two people: 30-35 minutes - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Information Extraction Lecture 5 – Named Entity Recognition III

Information ExtractionLecture 5 – Named Entity Recognition III

CIS, LMU MünchenWinter Semester 2013-2014

Dr. Alexander Fraser

Page 2: Information Extraction Lecture 5 – Named Entity Recognition III

Seminar• We currently have 30 people who want do do a

Referat• Single person slots: 18-20 minutes for presentation• Two people: 30-35 minutes• We'll use several days in the VL• First three topics on Nov. 27th (in the VL), next two

topics December 5th• There is another Ubung this week in the Seminar

• 10:00 AM (not 11!) in Gobi• This will be an optional part of the Hausarbeit (for the

Seminar), small amount of extra credit• Watch websites for scheduling!

Page 3: Information Extraction Lecture 5 – Named Entity Recognition III

3

Outline• Information Retrieval (IR) vs.

Information Extraction (IE)• Traditional IR• Web IR

• IE end-to-end• Introduction: named entity detection

as a classification problem

Page 4: Information Extraction Lecture 5 – Named Entity Recognition III

4

Information Retrieval• Traditional Information Retrieval (IR)

• User has an "information need"• User formulates query to retrieval

system• Query is used to return matching

documents

Page 5: Information Extraction Lecture 5 – Named Entity Recognition III

The Information Retrieval CycleSource

Selection

Search

Query

Selection

Ranked List

Examination

Documents

Delivery

Documents

QueryFormulation

Resource

query reformulation,vocabulary learning,relevance feedback

source reselection

Slide from J. Lin

Page 6: Information Extraction Lecture 5 – Named Entity Recognition III

IR Test Collections• Three components of a test collection:

• Collection of documents (corpus)• Set of information needs (topics)• Sets of documents that satisfy the

information needs (relevance judgments)• Metrics for assessing “performance”

• Precision• Recall• Other measures derived therefrom (e.g.,

F1)

Slide from J. Lin

Page 7: Information Extraction Lecture 5 – Named Entity Recognition III

Where do they come from?• TREC = Text REtrieval Conferences

• Series of annual evaluations, started in 1992

• Organized into “tracks”• Test collections are formed by

“pooling”• Gather results from all participants• Corpus/topics/judgments can be reused

Slide from J. Lin

Page 8: Information Extraction Lecture 5 – Named Entity Recognition III

Information Retrieval (IR)• IMPORTANT ASSUMPTION: can substitute

“document” for “information”• IR systems

• Use statistical methods• Rely on frequency of words in query, document,

collection• Retrieve complete documents• Return ranked lists of “hits” based on relevance

• Limitations• Answers information need indirectly• Does not attempt to understand the “meaning” of

user’s query or documents in the collection

Slide modified from J. Lin

Page 9: Information Extraction Lecture 5 – Named Entity Recognition III

9

Web Retrieval• Traditional IR came out of the library sciences• Web search engines aren't only used like this• Broder (2002) defined a taxonomy of web search

engine requests• Informational (traditional IR)

• When was Martin Luther King, Jr. assassinated?• Tourist attractions in Munich

• Navigational (usually, want a website)• Deutsche Bahn• CIS, Uni Muenchen

• Transactional (want to do something)• Buy Lady Gaga Pokerface mp3• Download Lady Gaga Pokerface (not that you would do this)• Order new Harry Potter book

Page 10: Information Extraction Lecture 5 – Named Entity Recognition III

10

Web Retrieval• Jansen et al (2007) studied 1.5 M

queries

• Note that this probably doesn't capture the original intent well

• Informational may often require extensive reformulation of queries

Type Percentage of All Queries

Informational 81%Navigational 10%Transactional 9%

Page 11: Information Extraction Lecture 5 – Named Entity Recognition III

11

Information Extraction (IE)• Information Extraction is very different from

Information Retrieval• Convert documents to one or more database

entries• Usually process entire corpus

• Once you have the database• Analyst can do further manual analysis• Automatic analysis ("data mining")• Can also be presented to end-user in a

specialized browsing or search interface• For instance, concert listings crawled from music club

websites (Tourfilter, Songkick, etc)

Page 12: Information Extraction Lecture 5 – Named Entity Recognition III

Information Extraction (IE)• IE systems

• Identify documents of a specific type• Extract information according to pre-defined templates• Place the information into frame-like database records

• Templates = sort of like pre-defined questions• Extracted information = answers• Limitations

• Templates are domain dependent and not easily portable

• One size does not fit all!

Weather disaster: TypeDateLocation

DamageDeaths...

Slide modified from J. Lin

Page 13: Information Extraction Lecture 5 – Named Entity Recognition III

CMU Seminars task

• Given an email about a seminar• Annotate

– Speaker– Start time– End time– Location

Page 14: Information Extraction Lecture 5 – Named Entity Recognition III

CMU Seminars - Example<[email protected] (Jaime Carbonell).0>Type: cmu.cs.proj.mtTopic: <speaker>Nagao</speaker> TalkDates: 26-Apr-93Time: <stime>10:00</stime> - <etime>11:00 AM</etime>PostedBy: jgc+ on 24-Apr-93 at 20:59 from NL.CS.CMU.EDU (Jaime Carbonell)

Abstract:

<paragraph><sentence>This Monday, 4/26, <speaker>Prof. Makoto Nagao</speaker> will give a seminar in the <location>CMT red conference room</location> <stime>10</stime>-<etime>11am</etime> on recent MT research results</sentence>.</paragraph>

Page 15: Information Extraction Lecture 5 – Named Entity Recognition III

IE TemplateSlot Name ValueSpeaker Prof. Makoto Nagao

Start time 1993-04-26 10:00

End time 1993-04-26 11:00

Location CMT red conference room

Message Identifier (Filename) [email protected] (Jaime Carbonell).0

• Template contains *canonical* version of information• There are several "mentions" of speaker, start time and end-

time (see previous slide)• Only one value for each slot• Location could probably also be canonicalized (e.g., Room

165, Oettingenstr 67 is canonical for LMU)• Important: also keep link back to original text

Page 16: Information Extraction Lecture 5 – Named Entity Recognition III

How many database entries?

• In the CMU seminars task, one message generally results in one database entry– Or no database entry if you process an email

that is not about a seminar• In other IE tasks, can get multiple database

entries from a single document or web page– A page of concert listings -> database entries– Entries in timeline -> database entries (Ubung)

Page 17: Information Extraction Lecture 5 – Named Entity Recognition III

Summary• IR: end-user

– Start with information need– Gets relevant documents, hopefully information

need is solved– Important difference: Traditional IR vs. Web R

• IE: analyst (you)– Start with template design and corpus– Get database of filled out templates

• Followed by subsequent processing (e.g., data mining, or user browsing, etc.)

Page 18: Information Extraction Lecture 5 – Named Entity Recognition III

IE: what we've seen so far

So far we have looked at:• Source issues (selection, tokenization, etc)• Extracting regular entities• Rule-based extraction of named entities• Learning rules for rule-based extraction of

named entities• We also jumped ahead and looked briefly at

end-to-end IE for the CMU Seminars task

Page 19: Information Extraction Lecture 5 – Named Entity Recognition III

Information Extraction

SourceSelection

Tokenization&Normalization

Named EntityRecognition

InstanceExtraction

FactExtraction

OntologicalInformationExtraction

?05/01/67 1967-05-01

and beyond

...married Elvis on 1967-05-01

Elvis Presley singerAngela Merkel

politician✓✓

Information Extraction (IE) is the process of extracting structured information from unstructured machine-readable documents

Page 20: Information Extraction Lecture 5 – Named Entity Recognition III

IE, where we are going

• We will stay with the named entity recognition (NER) topic for a while– How to formulate this as a machine learning

problem (later in these slides)– Next time: brief introduction to machine

learning• Complementary to Herr Schmid's class

– NER is also the main topic of the Seminar

20

Page 21: Information Extraction Lecture 5 – Named Entity Recognition III

Named Entity RecognitionNamed Entity Recognition (NER) is the process of finding entities (people, cities, organizations, dates, ...) in a text.Elvis Presley was born in 1935 in East Tupelo, Mississippi.

21

Page 22: Information Extraction Lecture 5 – Named Entity Recognition III

Extracting Named EntitiesPerson: Mr. Hubert J. Smith, Adm. McInnes, Grace Chan

Title: Chairman, Vice President of Technology, Secretary of State

Country: USSR, France, Haiti, Haitian Republic

City: New York, Rome, Paris, Birmingham, Seneca Falls

Province: Kansas, Yorkshire, Uttar Pradesh

Business: GTE Corporation, FreeMarkets Inc., Acme

University: Bryn Mawr College, University of Iowa

Organization: Red Cross, Boys and Girls Club

Slide from J. Lin

Page 23: Information Extraction Lecture 5 – Named Entity Recognition III

More Named EntitiesCurrency: 400 yen, $100, DM 450,000

Linear: 10 feet, 100 miles, 15 centimeters

Area: a square foot, 15 acres

Volume: 6 cubic feet, 100 gallons

Weight: 10 pounds, half a ton, 100 kilos

Duration: 10 day, five minutes, 3 years, a millennium

Frequency: daily, biannually, 5 times, 3 times a day

Speed: 6 miles per hour, 15 feet per second, 5 kph

Age: 3 weeks old, 10-year-old, 50 years of age

Slide from J. Lin

Page 24: Information Extraction Lecture 5 – Named Entity Recognition III

Information extraction approaches

For years, Microsoft Corporation CEO Bill Gates was against open source. But today he appears to have changed his mind. "We can be open source. We love the concept of shared source," said Bill Veghte, a Microsoft VP. "That's a super-important shift for us in terms of code access.“

Richard Stallman, founder of the Free Software Foundation, countered saying…

Name Title OrganizationBill Gates CEO MicrosoftBill Veghte VP MicrosoftRichard Stallman Founder Free Soft..

Slide from Kauchak

Page 25: Information Extraction Lecture 5 – Named Entity Recognition III

IE Posed as a Machine Learning Task

Training data: documents marked up with ground truth

Extract features around words/information Pose as a classification problem

00 : pm Place : Wean Hall Rm 5409 Speaker : Sebastian Thrun

prefix contents suffix

… …

Slide from Kauchak

Page 26: Information Extraction Lecture 5 – Named Entity Recognition III

Sliding Windows

Information Extraction: Tuesday 10:00 am, Rm 407b

For each position, ask: Is the current window a named entity?

Window size = 1

Slide from Suchanek

Page 27: Information Extraction Lecture 5 – Named Entity Recognition III

Sliding Windows

Information Extraction: Tuesday 10:00 am, Rm 407b

For each position, ask: Is the current window a named entity?

Window size = 2

Slide from Suchanek

Page 28: Information Extraction Lecture 5 – Named Entity Recognition III

FeaturesInformation Extraction: Tuesday 10:00 am, Rm 407b

Prefixwindow

Contentwindow

Postfixwindow

Choose certain features (properties) of windows that could be important:• window contains colon, comma, or digits• window contains week day, or certain other words• window starts with lowercase letter• window contains only lowercase letters• ...

Slide from Suchanek

Page 29: Information Extraction Lecture 5 – Named Entity Recognition III

Feature Vectors

Prefix colon 1Prefix comma 0...

…Content colon 1Content comma 0...

…Postfix colon 0Postfix comma 1

Features Feature Vector

The feature vector represents the presence or absence of features of one content window (and its prefix window and postfix window)

Information Extraction: Tuesday 10:00 am, Rm 407b

Prefixwindow

Contentwindow

Postfixwindow

Slide from Suchanek

Page 30: Information Extraction Lecture 5 – Named Entity Recognition III

Sliding Windows Corpus

NLP class: Wednesday, 7:30am and Thursday all day, rm 667

Now, we need a corpus (set of documents) in which the entities of interest have been manually labeled.

time location

From this corpus, compute the feature vectors with labels:

10001

11000

10111

10001

10101

Nothing Nothing Time Nothing Location

... ... ... ...

Slide from Suchanek

Page 31: Information Extraction Lecture 5 – Named Entity Recognition III

Machine Learning

1001111

110010

110000

Nothing Time

Time

Information Extraction: Tuesday 10:00 am, Rm 407b

Machine Learning

Use the labeled feature vectors astraining data for Machine Learning

classifyResult

Slide from Suchanek

Page 32: Information Extraction Lecture 5 – Named Entity Recognition III

Sliding Windows Exercise

Elvis Presley married Ms. Priscilla at the Aladin Hotel.

What features would you use to recognize person names?

100011

101111

101010

...

UpperCasehasDigit…

Slide from Suchanek

Page 33: Information Extraction Lecture 5 – Named Entity Recognition III

Good Features for Information Extraction

Example word features:– identity of word– is in all caps– ends in “-ski”– is part of a noun phrase– is in a list of city names– is under node X in

WordNet or Cyc– is in bold font– is in hyperlink anchor– features of past & future– last person name was

female– next two words are “and

Associates”

begins-with-numberbegins-with-ordinalbegins-with-punctuationbegins-with-question-

wordbegins-with-subjectblankcontains-alphanumcontains-bracketed-

numbercontains-httpcontains-non-spacecontains-numbercontains-pipe

contains-question-markcontains-question-wordends-with-question-markfirst-alpha-is-capitalizedindentedindented-1-to-4indented-5-to-10more-than-one-third-spaceonly-punctuationprev-is-blankprev-begins-with-ordinalshorter-than-30

Slide from Kauchak

Page 34: Information Extraction Lecture 5 – Named Entity Recognition III

Is Capitalized Is Mixed Caps Is All Caps Initial CapContains DigitAll lowercase Is InitialPunctuationPeriodCommaApostropheDashPreceded by HTML tag

Character n-gram classifier says string is a person name (80% accurate)

In stopword list(the, of, their, etc)

In honorific list(Mr, Mrs, Dr, Sen, etc)

In person suffix list(Jr, Sr, PhD, etc)

In name particle list (de, la, van, der, etc)

In Census lastname list;segmented by P(name)

In Census firstname list;segmented by P(name)

In locations lists(states, cities, countries)

In company name list(“J. C. Penny”)

In list of company suffixes(Inc, & Associates, Foundation)

Word Features lists of job titles, Lists of prefixes Lists of suffixes 350 informative phrases

HTML/Formatting Features {begin, end, in} x

{<b>, <i>, <a>, <hN>} x{lengths 1, 2, 3, 4, or longer}

{begin, end} of line

Good Features for Information Extraction

Slide from Kauchak

Page 35: Information Extraction Lecture 5 – Named Entity Recognition III

NER Classification in more detail

• In the previous slides, we covered a basic idea of how NER classification works

• In the next slides, I will go into more detail– I will compare sliding window with boundary

detection• Machine learning itself will be presented in

more detail in the next Vorlesung

35

Page 36: Information Extraction Lecture 5 – Named Entity Recognition III

How can we pose this as a classification (or learning) problem?

00 : pm Place : Wean Hall Rm 5409 Speaker : Sebastian Thrun

prefix contents suffix

… …

Data Label

0

0

1

1

0

train a predictivemodel

classifier

Slide from Kauchak

Page 37: Information Extraction Lecture 5 – Named Entity Recognition III

Lots of possible techniques

Any of these models can be used to capture words, formatting or both.

Classify CandidatesAbraham Lincoln was born in Kentucky.

Classifier

which class?

Sliding WindowAbraham Lincoln was born in Kentucky.

Classifierwhich class?

Try alternatewindow sizes:

Boundary ModelsAbraham Lincoln was born in Kentucky.

Classifier

which class?

BEGIN END BEGIN END

BEGIN

Finite State MachinesAbraham Lincoln was born in Kentucky.

Most likely state sequence?

Wrapper Induction<b><i>Abraham Lincoln</i></b> was born in Kentucky.

Learn and apply pattern for a website

<b>

<i>

PersonName

Slide from Kauchak

Page 38: Information Extraction Lecture 5 – Named Entity Recognition III

Information Extraction by Sliding Window

GRAND CHALLENGES FOR MACHINE LEARNING

Jaime Carbonell School of Computer Science Carnegie Mellon University

3:30 pm 7500 Wean Hall

Machine learning has evolved from obscurity in the 1970s into a vibrant and popular discipline in artificial intelligence during the 1980s and 1990s. As a result of its success and growth, machine learning is evolving into a collection of related disciplines: inductive concept acquisition, analytic learning in problem solving (e.g. analogy, explanation-based learning), learning theory (e.g. PAC learning), genetic algorithms, connectionist learning, hybrid systems, and so on.

CMU UseNet Seminar Announcement

E.g.Looking forseminarlocation

Slide from Kauchak

Page 39: Information Extraction Lecture 5 – Named Entity Recognition III

GRAND CHALLENGES FOR MACHINE LEARNING

Jaime Carbonell School of Computer Science Carnegie Mellon University

3:30 pm 7500 Wean Hall

Machine learning has evolved from obscurity in the 1970s into a vibrant and popular discipline in artificial intelligence during the 1980s and 1990s. As a result of its success and growth, machine learning is evolving into a collection of related disciplines: inductive concept acquisition, analytic learning in problem solving (e.g. analogy, explanation-based learning), learning theory (e.g. PAC learning), genetic algorithms, connectionist learning, hybrid systems, and so on.

CMU UseNet Seminar Announcement

E.g.Looking forseminarlocation

Information Extraction by Sliding Window

Slide from Kauchak

Page 40: Information Extraction Lecture 5 – Named Entity Recognition III

GRAND CHALLENGES FOR MACHINE LEARNING

Jaime Carbonell School of Computer Science Carnegie Mellon University

3:30 pm 7500 Wean Hall

Machine learning has evolved from obscurity in the 1970s into a vibrant and popular discipline in artificial intelligence during the 1980s and 1990s. As a result of its success and growth, machine learning is evolving into a collection of related disciplines: inductive concept acquisition, analytic learning in problem solving (e.g. analogy, explanation-based learning), learning theory (e.g. PAC learning), genetic algorithms, connectionist learning, hybrid systems, and so on.

CMU UseNet Seminar Announcement

E.g.Looking forseminarlocation

Information Extraction by Sliding Window

Slide from Kauchak

Page 41: Information Extraction Lecture 5 – Named Entity Recognition III

GRAND CHALLENGES FOR MACHINE LEARNING

Jaime Carbonell School of Computer Science Carnegie Mellon University

3:30 pm 7500 Wean Hall

Machine learning has evolved from obscurity in the 1970s into a vibrant and popular discipline in artificial intelligence during the 1980s and 1990s. As a result of its success and growth, machine learning is evolving into a collection of related disciplines: inductive concept acquisition, analytic learning in problem solving (e.g. analogy, explanation-based learning), learning theory (e.g. PAC learning), genetic algorithms, connectionist learning, hybrid systems, and so on.

CMU UseNet Seminar Announcement

E.g.Looking forseminarlocation

Information Extraction by Sliding Window

Slide from Kauchak

Page 42: Information Extraction Lecture 5 – Named Entity Recognition III

GRAND CHALLENGES FOR MACHINE LEARNING

Jaime Carbonell School of Computer Science Carnegie Mellon University

3:30 pm 7500 Wean Hall

Machine learning has evolved from obscurity in the 1970s into a vibrant and popular discipline in artificial intelligence during the 1980s and 1990s. As a result of its success and growth, machine learning is evolving into a collection of related disciplines: inductive concept acquisition, analytic learning in problem solving (e.g. analogy, explanation-based learning), learning theory (e.g. PAC learning), genetic algorithms, connectionist learning, hybrid systems, and so on.

CMU UseNet Seminar Announcement

E.g.Looking forseminarlocation

Information Extraction by Sliding Window

Slide from Kauchak

Page 43: Information Extraction Lecture 5 – Named Entity Recognition III

00 : pm Place : Wean Hall Rm 5409 Speaker : Sebastian Thrunw t-m w t-1 w t w t+n w t+n+1 w t+n+m

prefix contents suffix

… …

• Standard supervised learning setting– Positive instances?– Negative instances?

Information Extraction by Sliding Window

Slide from Kauchak

Page 44: Information Extraction Lecture 5 – Named Entity Recognition III

00 : pm Place : Wean Hall Rm 5409 Speaker : Sebastian Thrunw t-m w t-1 w t w t+n w t+n+1 w t+n+m

prefix contents suffix

… …

• Standard supervised learning setting– Positive instances: Windows with real label– Negative instances: All other windows– Features based on candidate, prefix and suffix

Information Extraction by Sliding Window

Slide from Kauchak

Page 45: Information Extraction Lecture 5 – Named Entity Recognition III

IE by Boundary Detection GRAND CHALLENGES FOR MACHINE LEARNING

Jaime Carbonell School of Computer Science Carnegie Mellon University

3:30 pm 7500 Wean Hall

Machine learning has evolved from obscurity in the 1970s into a vibrant and popular discipline in artificial intelligence during the 1980s and 1990s. As a result of its success and growth, machine learning is evolving into a collection of related disciplines: inductive concept acquisition, analytic learning in problem solving (e.g. analogy, explanation-based learning), learning theory (e.g. PAC learning), genetic algorithms, connectionist learning, hybrid systems, and so on.

CMU UseNet Seminar Announcement

E.g.Looking forseminarlocation

Slide from Kauchak

Page 46: Information Extraction Lecture 5 – Named Entity Recognition III

IE by Boundary Detection GRAND CHALLENGES FOR MACHINE LEARNING

Jaime Carbonell School of Computer Science Carnegie Mellon University

3:30 pm 7500 Wean Hall

Machine learning has evolved from obscurity in the 1970s into a vibrant and popular discipline in artificial intelligence during the 1980s and 1990s. As a result of its success and growth, machine learning is evolving into a collection of related disciplines: inductive concept acquisition, analytic learning in problem solving (e.g. analogy, explanation-based learning), learning theory (e.g. PAC learning), genetic algorithms, connectionist learning, hybrid systems, and so on.

CMU UseNet Seminar Announcement

E.g.Looking forseminarlocation

Slide from Kauchak

Page 47: Information Extraction Lecture 5 – Named Entity Recognition III

IE by Boundary Detection GRAND CHALLENGES FOR MACHINE LEARNING

Jaime Carbonell School of Computer Science Carnegie Mellon University

3:30 pm 7500 Wean Hall

Machine learning has evolved from obscurity in the 1970s into a vibrant and popular discipline in artificial intelligence during the 1980s and 1990s. As a result of its success and growth, machine learning is evolving into a collection of related disciplines: inductive concept acquisition, analytic learning in problem solving (e.g. analogy, explanation-based learning), learning theory (e.g. PAC learning), genetic algorithms, connectionist learning, hybrid systems, and so on.

CMU UseNet Seminar Announcement

E.g.Looking forseminarlocation

Slide from Kauchak

Page 48: Information Extraction Lecture 5 – Named Entity Recognition III

IE by Boundary Detection GRAND CHALLENGES FOR MACHINE LEARNING

Jaime Carbonell School of Computer Science Carnegie Mellon University

3:30 pm 7500 Wean Hall

Machine learning has evolved from obscurity in the 1970s into a vibrant and popular discipline in artificial intelligence during the 1980s and 1990s. As a result of its success and growth, machine learning is evolving into a collection of related disciplines: inductive concept acquisition, analytic learning in problem solving (e.g. analogy, explanation-based learning), learning theory (e.g. PAC learning), genetic algorithms, connectionist learning, hybrid systems, and so on.

CMU UseNet Seminar Announcement

E.g.Looking forseminarlocation

Slide from Kauchak

Page 49: Information Extraction Lecture 5 – Named Entity Recognition III

IE by Boundary Detection GRAND CHALLENGES FOR MACHINE LEARNING

Jaime Carbonell School of Computer Science Carnegie Mellon University

3:30 pm 7500 Wean Hall

Machine learning has evolved from obscurity in the 1970s into a vibrant and popular discipline in artificial intelligence during the 1980s and 1990s. As a result of its success and growth, machine learning is evolving into a collection of related disciplines: inductive concept acquisition, analytic learning in problem solving (e.g. analogy, explanation-based learning), learning theory (e.g. PAC learning), genetic algorithms, connectionist learning, hybrid systems, and so on.

CMU UseNet Seminar Announcement

E.g.Looking forseminarlocation

Slide from Kauchak

Page 50: Information Extraction Lecture 5 – Named Entity Recognition III

IE by Boundary DetectionInput: Linear Sequence of Tokens

Date : Thursday , October 25 Time : 4 : 15 - 5 : 30 PM

How can we pose this as a machine learning problem?

Data Label

0

0

1

1

0

train a predictivemodel

classifier

Slide from Kauchak

Page 51: Information Extraction Lecture 5 – Named Entity Recognition III

IE by Boundary DetectionInput: Linear Sequence of Tokens

Date : Thursday , October 25 Time : 4 : 15 - 5 : 30 PM

Method: Identify start and end Token Boundaries

Output: Tokens Between Identified Start / End BoundariesDate : Thursday , October 25 Time : 4 : 15 - 5 : 30 PM

Start / End of Content

…Unimportant Boundaries

Date : Thursday , October 25 Time : 4 : 15 - 5 : 30 PM

Slide from Kauchak

Page 52: Information Extraction Lecture 5 – Named Entity Recognition III

Learning: IE as Classification

Learn TWO binary classifiers, one for the beginning and one for the end

1 if i begins a field0 otherwise

Begin(i)=

Date : Thursday , October 25 Time : 4 : 15 - 5 : 30 PM

Date : Thursday , October 25 Time : 4 : 15 - 5 : 30 PMEnd

Begin

POSITIVE (1)

ALL OTHERS NEGATIVE (0)

Slide from Kauchak

Page 53: Information Extraction Lecture 5 – Named Entity Recognition III

One approach: Boundary Detectors

A “Boundary Detectors” is a pair of token sequences ‹p,s› A detector matches a boundary if p matches text before

boundary and s matches text after boundary Detectors can contain wildcards, e.g. “capitalized word”,

“number”, etc.<Date: , [CapitalizedWord]>

Date: Thursday, October 25

Would this boundary detector match anywhere?Slide from Kauchak

Page 54: Information Extraction Lecture 5 – Named Entity Recognition III

<Date: , [CapitalizedWord]>

Date: Thursday, October 25

One approach: Boundary Detectors

A “Boundary Detectors” is a pair of token sequences ‹p,s› A detector matches a boundary if p matches text before

boundary and s matches text after boundary Detectors can contain wildcards, e.g. “capitalized word”,

“number”, etc.

Slide from Kauchak

Page 55: Information Extraction Lecture 5 – Named Entity Recognition III

Combining Detectors

Begin boundary detector:

End boundary detector:

Prefix Suffix

<a href=" http

empty ">

text<b><a href=“http://www.cs.pomona.edu”>

match(es)?

Slide from Kauchak

Page 56: Information Extraction Lecture 5 – Named Entity Recognition III

Combining Detectors

Begin boundary detector:

End boundary detector:

Prefix Suffix

<a href=" http

empty ">

text<b><a href=“http://www.cs.pomona.edu”>

Begin End

Slide from Kauchak

Page 57: Information Extraction Lecture 5 – Named Entity Recognition III

Learning: IE as Classification

Learn TWO binary classifiers, one for the beginning and one for the end

Date : Thursday , October 25 Time : 4 : 15 - 5 : 30 PM

Date : Thursday , October 25 Time : 4 : 15 - 5 : 30 PM

End

Begin

POSITIVE (1)

ALL OTHERS NEGATIVE (0)

Say we learn Begin and End, will this be enough? Any improvements? Any ambiguities?

Slide from Kauchak

Page 58: Information Extraction Lecture 5 – Named Entity Recognition III

Some concerns

Begin EndBegin

Begin EndBegin End

Begin End

Slide from Kauchak

Page 59: Information Extraction Lecture 5 – Named Entity Recognition III

Learning to detect boundaries Learn three probabilistic classifiers:

Begin(i) = probability position i starts a field End(j) = probability position j ends a field Len(k) = probability an extracted field has length k

Score a possible extraction (i,j) byBegin(i) * End(j) * Len(j-i)

Len(k) is estimated from a histogram data

Begin(i) and End(j) may combine multiple boundary detectors!

Slide from Kauchak

Page 60: Information Extraction Lecture 5 – Named Entity Recognition III

Problems with Sliding Windows and Boundary Finders

Decisions in neighboring parts of the input are made independently from each other.

Sliding Window may predict a “seminar end time” before the “seminar start time”.

It is possible for two overlapping windows to both be above threshold.

In a Boundary-Finding system, left boundaries are laid down independently from right boundaries

Slide from Kauchak

Page 61: Information Extraction Lecture 5 – Named Entity Recognition III

• Slide sources• Slides were taken from a wide variety of

sources (see the attribution at the bottom right of each slide)

61

Page 62: Information Extraction Lecture 5 – Named Entity Recognition III

Next time: machine learning• We will take a break from NER and

look at classification in general• We will first focus on learning

decision trees from training data• Powerful mechanism for encoding

general decisions• Example on next slide

62

Page 63: Information Extraction Lecture 5 – Named Entity Recognition III

Decision Trees“Should I play tennis today?”

A decision tree can be expressed as a disjunction of conjunctions

(Outlook = sunny) (Humidity = normal)

(Outlook = overcast) (Wind=Weak)

Outlook

HumidityWind

No Yes No Yes

No

SunnyRain

Overcast

High Low Strong Weak

Slide from Mitchell/Ponce

Page 64: Information Extraction Lecture 5 – Named Entity Recognition III

64

• Thank you for your attention!