La presentazione è in caricamento. Aspetta per favore

La presentazione è in caricamento. Aspetta per favore

Information Extraction Appunti estratti da un corso di Rada Michalcea.

Presentazioni simili


Presentazione sul tema: "Information Extraction Appunti estratti da un corso di Rada Michalcea."— Transcript della presentazione:

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.jobsRapier –Pagine Web : FlipdogFlipdog Annunci di lavoro: –BurningGlassBurningGlass –MohomineMohomine 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 Subject: US-TN-SOFTWARE PROGRAMMER Date: 17 Nov 1996 17:37:29 GMT Organization: Reference.Com Posting Service Message-ID: 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@memphisonline.com Subject: US-TN-SOFTWARE PROGRAMMER Date: 17 Nov 1996 17:37:29 GMT Organization: Reference.Com Posting Service Message-ID: 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@memphisonline.com Esempio Offerte di lavoro

6 Struttura estratta (template) computer_science_job id: 56nigp$mrs@bilbo.reference.com title: SOFTWARE PROGRAMMER salary: company: recruiter: state: TN city: country: US language: C platform: PC \ DOS \ OS-2 \ UNIX application: area: Voice Mail req_years_experience: 2 desired_years_experience: 5 req_degree: desired_degree: post_date: 17 Nov 1996

7 Descrizione di libri Amazon …. The Age of Spiritual Machines : When Computers Exceed Human Intelligence by <a href="/exec/obidos/search-handle-url/index=books&field-author= Kurzweil%2C%20Ray/002-6235079-4593641"> Ray Kurzweil <img src="http://images.amazon.com/images/P/0140282025.01.MZZZZZZZ.gif" width=90 height=140 align=left border=0> List Price: $14.95 Our Price: $11.96 You Save: $2.99 (20%) …. The Age of Spiritual Machines : When Computers Exceed Human Intelligence by <a href="/exec/obidos/search-handle-url/index=books&field-author= Kurzweil%2C%20Ray/002-6235079-4593641"> Ray Kurzweil <img src="http://images.amazon.com/images/P/0140282025.01.MZZZZZZZ.gif" width=90 height=140 align=left border=0> List Price: $14.95 Our Price: $11.96 You Save: $2.99 (20%) …

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 Definizione template Templates (unfilled) Analisi dei testi: POS, NE recognition, ?? Pattern matching patterns Analisi del discorso, inferenze Definizione patterns

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+(\.\d{2})?\b List Price: $14.95 Our Price: $11.96 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: List Price: Filler pattern:.+ Post-filler pattern:

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) Trainer Decoder Model Language Input Answers Language Input

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 Esempio di regola imparata da RAPIER per estrarre transaction price …paid $11M for the company… …sold to the bank for an undisclosed amount… …paid Honeywell an undisclosed 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 nn SClass: 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 K most-accurate maximally-general filler-only rules (prefiller = postfiller = true). Cioè la regola si applica solo al filler –Grow: Repeat 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 –Keep: Rules = Rules the best of the K rules – subsumed rules

20 Esempio (una iterazione) 2 examples: … located in Atlanta, Georgia… … offices in Kansas City, Missouri… maximally specific rules (high precision, low recall) maximally general rules (low precision, high recall) appropriately general rule (high precision, high recall) Init Seed Grow

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. Mr. John Smith è stato nominato Presidente della ACE Spa il 25 dicembre 2222

23 Un esempio Un sistema di IE + ML sul Web: http://www.flipdog.com


Scaricare ppt "Information Extraction Appunti estratti da un corso di Rada Michalcea."

Presentazioni simili


Annunci Google