Information Extraction - PowerPoint PPT Presentation

About This Presentation
Title:

Information Extraction

Description:

Information Extraction Appunti estratti da un corso di Rada Michalcea Information Extraction (IE) Identifica frammenti di informazione specifici in testi parzialmente ... – PowerPoint PPT presentation

Number of Views:126
Avg rating:3.0/5.0
Slides: 24
Provided by: Gheor78
Category:

less

Transcript and Presenter's Notes

Title: Information Extraction


1
Information Extraction
  • Appunti estratti da un corso di Rada Michalcea

2
Information Extraction (IE)
  • Identifica frammenti di informazione specifici in
    testi parzialmente strutturati (ex. Xml) o non
    strutturati.
  • Trasforma linformazione estratta in un database
    strutturato.
  • Si applica a dominii diversi
  • Articoli di giornale
  • Pagine Web
  • Letteratura scientifica
  • Messaggi di Newsgroup
  • Annunci economici o di lavoro
  • Cartelle cliniche

3
MUC
  • DARPA ha finanziato ricerche in IE dal 1990.
  • Message Understanding Conference (MUC) è la
    conferenza-gara del settore.
  • Generalmente le gare hanno come tema lestrazione
    di notizie da giornali
  • Eventi terroristici
  • joint ventures
  • Cambi di management

4
Altre applicazioni
  • Job postings
  • Newsgroups Rapier da austin.jobs
  • Pagine Web Flipdog
  • Annunci di lavoro
  • BurningGlass
  • Mohomine
  • Annunci di Seminari
  • Notizie societarie sul web
  • Corsi sul web (continuing education)
  • Iformazioni e annunci universitari sul web
  • Annunci di affitto appartamenti
  • Informazioni di biologia molecolare su MEDLINE

5
Esempio Offerte di lavoro
Subject US-TN-SOFTWARE PROGRAMMER Date 17 Nov
1996 173729 GMT Organization Reference.Com
Posting Service Message-ID lt56nigpmrs_at_bilbo.refe
rence.comgt SOFTWARE PROGRAMMER Position
available for Software Programmer experienced in
generating software for PC-Based Voice Mail
systems. Experienced in C Programming. Must be
familiar with communicating with and controlling
voice cards preferable Dialogic, however,
experience with others such as Rhetorix and
Natural Microsystems is okay. Prefer 5 years or
more experience with PC Based Voice Mail, but
will consider as little as 2 years. Need to find
a Senior level person who can come on board and
pick up code with very little training. Present
Operating System is DOS. May go to OS-2 or UNIX
in future. Please reply to Kim
Anderson AdNET (901) 458-2888 fax kimander_at_memphis
online.com
Subject US-TN-SOFTWARE PROGRAMMER Date 17 Nov
1996 173729 GMT Organization Reference.Com
Posting Service Message-ID lt56nigpmrs_at_bilbo.refe
rence.comgt SOFTWARE PROGRAMMER Position
available for Software Programmer experienced in
generating software for PC-Based Voice Mail
systems. Experienced in C Programming. Must be
familiar with communicating with and controlling
voice cards preferable Dialogic, however,
experience with others such as Rhetorix and
Natural Microsystems is okay. Prefer 5 years or
more experience with PC Based Voice Mail, but
will consider as little as 2 years. Need to find
a Senior level person who can come on board and
pick up code with very little training. Present
Operating System is DOS. May go to OS-2 or UNIX
in future. Please reply to Kim
Anderson AdNET (901) 458-2888 fax kimander_at_memphis
online.com
6
Struttura estratta (template)
computer_science_job id 56nigpmrs_at_bilbo.referenc
e.com title SOFTWARE PROGRAMMER salary company
recruiter state TN city country US language
C platform PC \ DOS \ OS-2 \ UNIX application ar
ea Voice Mail req_years_experience
2 desired_years_experience 5 req_degree desired_
degree post_date 17 Nov 1996
7
Descrizione di libri Amazon
. lt/tdgtlt/trgt lt/tablegt ltb class"sans"gtThe Age of
Spiritual Machines When Computers Exceed Human
Intelligencelt/bgtltbrgt ltfont faceverdana,arial,helv
etica size-1gt by lta href"/exec/obidos/search-han
dle-url/indexbooksfield-author
Kurzweil2C20Ray/002-6235079-4593641"gt Ray
Kurzweillt/agtltbrgt lt/fontgt ltbrgt lta
href"http//images.amazon.com/images/P/0140282025
.01.LZZZZZZZ.jpg"gt ltimg src"http//images.amazon.
com/images/P/0140282025.01.MZZZZZZZ.gif" width90
height140 alignleft border0gtlt/agt ltfont
faceverdana,arial,helvetica size-1gt ltspan
class"small"gt ltspan class"small"gt ltbgtList
Pricelt/bgt ltspan classlistpricegt14.95lt/spangtltbrgt
ltbgtOur Price ltfont color990000gt11.96lt/fontgtlt/
bgtltbrgt ltbgtYou Savelt/bgt ltfont color990000gtltbgt2.
99 lt/bgt (20)lt/fontgtltbrgt lt/spangt ltpgt ltbrgt
. lt/tdgtlt/trgt lt/tablegt ltb class"sans"gtThe Age of
Spiritual Machines When Computers Exceed Human
Intelligencelt/bgtltbrgt ltfont faceverdana,arial,helv
etica size-1gt by lta href"/exec/obidos/search-han
dle-url/indexbooksfield-author
Kurzweil2C20Ray/002-6235079-4593641"gt Ray
Kurzweillt/agtltbrgt lt/fontgt ltbrgt lta
href"http//images.amazon.com/images/P/0140282025
.01.LZZZZZZZ.jpg"gt ltimg src"http//images.amazon.
com/images/P/0140282025.01.MZZZZZZZ.gif" width90
height140 alignleft border0gtlt/agt ltfont
faceverdana,arial,helvetica size-1gt ltspan
class"small"gt ltspan class"small"gt ltbgtList
Pricelt/bgt ltspan classlistpricegt14.95lt/spangtltbrgt
ltbgtOur Price ltfont color990000gt11.96lt/fontgtlt/
bgtltbrgt ltbgtYou Savelt/bgt ltfont color990000gtltbgt2.
99 lt/bgt (20)lt/fontgtltbrgt lt/spangt ltpgt ltbrgt
8
Template estratto
Title The Age of Spiritual Machines
When Computers Exceed Human Intelligence Author
Ray Kurzweil List-Price 14.95 Price 11.96
9
Architettura di un sistema di IE
Riempimento dei templates
10
Tipi di Template
  • record di coppie attributo (slot) valore.
    Valori sono parti del testo con cui riempire lo
    slot.
  • Gli slot vanno riempiti con stringhe la cui
    natura (lessicale, sintattica, semantica) è in
    genere predeterminata in modo più o meno
    specifico
  • Terrorist act threatened, attempted,
    accomplished.
  • Job type clerical, service, custodial, etc.
  • Company type codice SEC
  • Alcuni slot possono accettare elementi di una
    classe, es.
  • Programming language
  • In alcuni dominii si devono estrarre più
    templates da uno stesso documento.
  • Una lista di appartamenti in un unico avviso

11
Identificazione dei fillers basata su pattern
matching
  • Generalmente si usano espressioni regolari
  • Pattern che identifica un prezzo in Amazon Book
    \b\\d(\.\d2)?\b
  • ltbgtList Pricelt/bgt ltspan classlistpricegt14.95lt/s
    pangtltbrgt
  • ltbgtOur Price ltfont color990000gt11.96lt/fontgtlt/b
    gtltbrgt
  • Lespressione regolare in genere consente di
    identificare il filler ma impone condizioni
    anche sui pre-filler e post-filler (il contesto
    di un filler).
  • Listino prezzi Amazon
  • Pre-filler pattern ltbgtList Pricelt/bgt ltspan
    classlistpricegt
  • Filler pattern .
  • Post-filler pattern lt/spangt

12
Template Extraction
  • Nel caso si voglia estrarre da documenti
    semi-strutturati (es. Amazon) lestrazione die
    templates è relativamente semplice, inoltre gli
    slot fillers seguono un ordine predeterminato
  • Title
  • Author
  • List price
  • Molto più complesso nel caso di testi liberi.

13
Natural Language Processing
  • Nel caso si estraggano i patterns da pagine web
    automaticamente generate, bastano espressioni
    regolari.
  • In caso contrario, occorre utilizzare alcune
    tecniche di NLP.
  • Part-of-speech (POS) tagging
  • Syntactic parsing
  • Categorie semantiche (es da WordNet)
  • KILL kill, murder, assassinate, strangle,
    suffocate
  • I pattern possono usare categorie lessicali,
    sintattiche, semantiche.
  • Crime victim
  • Prefiller POS V, Hypernym KILL
  • Filler Phrase NP

14
Apprendimento automatico di patterns per IE
  • Laspetto più critico è la scrittura di patterns
    (regex), specifici per ogni dominio e template
  • Scrivere delle regex accurate richiede tempo, ed
    è una attività domain-dependent (non ri-usabile).
  • Lalternativa è usare tecniche di machine
    learning
  • Si parte da un set di apprendimento in cui
    esperti umani evidenziano i patterns di interesse
    (es. si sottolineano i filler degli slots).
  • Impara un modello generalizzato degli
    slot-fillers (cioè un pattern) usando algoritmi
    di ML.

15
Automatic Pattern-Learning Systems
  • Vantaggi
  • Portabile a vari dominii
  • I patterns hanno una copertura più ampia
  • Non serve rivolgersi a knowledge engineers
  • Svantaggi
  • Bisogna annotare un campione ampio di documenti.
  • Non funziona sicuramente meglio di un sistema in
    cui i patterns siano scritti a mano
  • Esempi Riloff et al., AutoSlog (UMass)
    Soderland WHISK (UMass) Mooney et al. Rapier
    (Utexas)

16
Rapier Califf Mooney, AAAI-99
  • Rapier apprende da templates con relativi slots
    riempiti a mano
  • Rapier impara tre tipi di fillers per ciascuno
    slot, in stile di
  • ?Pre-filler pattern ? Filler pattern ?
    Post-filler pattern

paid 11M for the companysold to the bank
for an undisclosed amountpaid Honeywell an
undisclosed price
Esempio di regola imparata da RAPIER per estrarre
transaction price
17
esempio
  • sold to the bank for an undisclosed
    amount
  • POS vb pr det nn pr det jj
    nn
  • SClass
    price

paid Honeywell an undisclosed price POS
vb nnp det jj
nnSClass
price
18
Rapier Rules dettagli
  • Rapier rule
  • pre-filler pattern
  • filler pattern
  • post-filler pattern
  • pattern subpattern
  • subpattern constraint
  • constraint
  • Word - exact word that must be present
  • Tag - matched word must have given POS tag
  • Class - semantic class of matched word
  • Can specify disjunction with
  • List length N - between 0 and N words satisfying
    other constraints

19
Algoritmo di apprendimento di Rapier
  • Input set of training examples (list of
    documents annotated with extract this
    substring)
  • Output set of rules
  • Init Rules a rule that exactly matches each
    training example
  • Repeat several times
  • Seed Select M examples randomly and generate
    the Kmost-accurate maximally-general filler-only
    rules(prefiller postfiller true). Cioè la
    regola si applica solo al filler
  • GrowRepeat For N 1, 2, 3, Try to improve
    K best rules by adding N context words of
    prefiller or postfiller context Migliora la
    regola aggiungendo restrizioni sui pre e post
    fillers
  • KeepRules Rules ? the best of the K rules
    subsumed rules

20
Esempio (una iterazione)
  • 2 examples located in Atlanta, Georgia
    offices in Kansas City, Missouri

Init
maximally general rules(low precision, high
recall)
Seed
Grow
maximally specific rules(high precision, low
recall)
appropriately general rule (high precision, high
recall)
21
Valutazione dellaccuratezza
  • La valutazione va fatta su testi sui quali non
    sia stato fatto alcun apprendimento.
  • Measura per ogni documento
  • Numero totale di estrazioni corrette N
  • Numero totale di coppie slot-valore estratte dal
    sistema E
  • Numero totale di coppie slot-valore estratte dal
    sistema che sono corrette (rispetto al
    template-soluzione) C
  • Misure di prestazione
  • Recall C/N
  • Precision C/E
  • F-Measure media armonica fra recall e precision

22
Web Semantico e IE
  • Se i documenti sono annotati (dal semplice XML
    fino alle annotazioni semantiche mediante
    ontologoia) le tecniche di IE sarebbero banali.
  • Ma
  • E difficile annotare manualmente archivi
    documentali in xml o altri linguaggi di
    annotazione.
  • Alcune industrie commerciali potrebbero essere
    riluttanti a fornire dati in formati cosè
    accessibili.
  • In realtà, unaltra applicazione di IE è proprio
    quella di trasformare documenti non strutturati
    in files annotati in xml.
  • Mr. John Smith è stato nominato Presidente della
    ACE Spa il 25 dicembre 2222.
  • ltmanagement_changegt
  • ltnew_managergtMr. John Smithlt/new_managergt è
    stato nominato lttitlegtPresidentelt/titlegt della
    ltcompanygtACE Spalt/companygt il ltdate_of_eventgt25
    dicembre 2222 lt/date_of_eventgt lt/
    management_changegt

23
Un esempio
  • Un sistema di IE ML sul Web
  • http//www.flipdog.com
Write a Comment
User Comments (0)
About PowerShow.com