Extractores de Información de Kushmerick
Índice Introducción Reglas de Extracción Generación de reglas de extracción Extrayendo Información Evaluación Conclusiones
Índice Introducción Reglas de Extracción Generación de reglas de extracción Extrayendo Información Evaluación Conclusiones
Introducción Nicholas Kushmerick, Daniel S. Weld, Robert B. Doorenbos: Wrapper Induction for Information Extraction. IJCAI (1) 1997:
How IE works Information extractor Document Extraction rules Attributes The Da Vinci Code Dan Brown € 2006 Robert Langdon… Doubleday Templates Message ID: MUC-0001 Message Template: Court resolution Date of Event: April, Charge: Terrorist attack Perpetrator: Salahuddin Amin Perpetrator: Anthony Garcia Perpetrator: Waheed Mahmood Perpetrator: Omar Khyam … The Da Vinci Code Dan Brown € 2006 P1 Robert Langdon… Doubleday A1 B1 Ontology instances Templating/ Ontologisation rules
Índice Introducción Reglas de Extracción Generación de reglas de extracción Extrayendo Información Evaluación Conclusiones
Ejemplo 1 ↓ Some Country Codes ↓ ↓ Congo 242 ↓ ↓ Egypt 20 ↓ ↓ Belize 501 ↓ ↓ Spain 34 ↓
Ejemplo 2 ↓ Some Country Codes ↓ ↓ Congo 242 ↓ ↓ Egypt 20 ↓ ↓ Belize 501 ↓ ↓ Spain 34 ↓ ↓ End ↓
Ejemplo 3 ↓ Some Country Codes ↓ ↓ Congo 242 ↓ ↓ Egypt 20 ↓ ↓ Belize 501 ↓ ↓ Spain 34 ↓ End
Ejemplo 4 ↓ name:John ↓ ↓ address: 12 Main St↓ ↓ name:Jane↓ ↓ name:Sally↓ ↓ address: 10 Oak Ave↓ ↓ address: 20 Walnut Rd↓
Reglas LR Caracterización LR (Left – Right) LR CountryName = “ * ” CountryCode = “ * ” CountryName = “ * ” CountryCode = “ * ”
Reglas HLRT Caracterización HLRT (Head – Left – Right – Tail) HLRT Head = “* ” Tail = “ *” CountryName = “ * ” CountryCode = “ * ” Head = “* ” Tail = “ *” CountryName = “ * ” CountryCode = “ * ”
Reglas OCLR Caracterización OCLR (Open – Close – Left – Right) OCLR Open = “* ” Close = “ ” CountryName = “ * ” CountryCode = “ * ” Open = “* ” Close = “ ” CountryName = “ * ” CountryCode = “ * ”
Índice Introducción Reglas de Extracción Generación de reglas de extracción Extrayendo Información Evaluación Conclusiones
Conceptos Preliminares Tokenización Conjunto de entrenamiento ↓ Congo 242 ↓
Algoritmos de Inducción LR HLRT OCLR N-LR
LR – Delimitadores Left ↓ Some Country Codes ↓ Congo 242 ↓ Egypt Belize Spain ↓ </I><BR>↓ </I><BR>↓ </I><BR>↓ <B> <B> <B> <HTML><TITLE>Some Country Codes</TITLE><BODY>↓ <B> ↓ Some Country Codes ↓ ↓ ↓ CADENA SEMILLA
LR – Delimitadores Left CANDIDATOS ↓ Some Country Codes ↓ Congo 242 ↓ Egypt Belize Spain ↓ ↓ ↓ ↓ /I> ↓ ↓ I> ↓ ↓ > ↓ ↓ ↓ ↓ R>↓ ↓ BR>↓ ↓ >↓ ↓ ↓ B> > Condiciones de validez para candidatos L: 1)Sufijo apropiado 2)No formar parte de la cola de la página si se trata del primer atributo
LR – Delimitadores Right ↓ Some Country Codes ↓ Congo 242 ↓ Egypt Belize Spain ↓ CADENA SEMILLA
LR – Delimitadores Right CANDIDATOS ↓ Some Country Codes ↓ Congo 242 ↓ Egypt Belize Spain ↓ Condiciones de validez para candidatos R: 1)No formar parte de algún atributo 2)Prefijo del texto que ocurre inmediatamente después <I < </B </ <
LR – Delimitadores Left ↓ Some Country Codes ↓ Congo 242 ↓ Egypt Belize Spain ↓ CANDIDATOS /B> B> > I> > CADENA SEMILLA
LR – Delimitadores Right ↓ Some Country Codes ↓ Congo 242 ↓ Egypt Belize Spain ↓ </I><BR>↓ </I><BR>↓ </I><BR>↓ <B> <B> <B> ↓ ↓ ↓ ↓ ↓ CANDIDATOS ↓ ↓ ↓ ↓<B ↓ ↓< ↓ <B <BR < </I </ < CADENA SEMILLA
Inductive algorithms LR HLRT OCLR N-LR
HLRT ↓ Some Country Codes ↓ ↓ Some Country Codes ↓ Congo 242 Egypt Belize Spain ↓ Some Country Codes ↓ End ↓ ↓ ↓ ↓ End ↓ ↓ Some Country Codes ↓ CADENA SEMILLA PARA H Y l 1 ↓ ↓ End CADENA SEMILLA PARA T
CANDIDATOS PARA H HLRT ↓ Some Country Codes ↓ ↓ Congo 242 ↓ ↓ Egypt 20 ↓ ↓ Belize 501 ↓ ↓ Spain 34 ↓ End ↓ ↓ ↓ /TITLE> ↓ S … ↓ >↓ ↓ ↓ S … <B B> >S … CANDIDATOS PARA TCANDIDATOS PARA l 1 … ↓ ↓ ↓ P>↓ ↓ >↓ … B> > ↓ ↓ E … < HR><B … HR R> >< …
HLRT Condiciones de validez para validar la tripleta h, t, l 1 : 1)H debe pertenecer a todas las cabeceras de las páginas 2)l 1 sufijo apropiado cabecera 3)T no debe ocurrir entre H y l 1 4)T substring de las colas de las páginas 5)l 1 no debe ocurrir antes de t 6)l 1 sufijo apropiado del texto entre tuplas 7)T no debe ocurrir antes que l 1 TRIPLETA VÁLIDA H: T: L 1 : H = “* ” T = “ *” CountryName = “ * ” TRIPLETA NO VÁLIDA H: T: L 1 : TRIPLETA NO VÁLIDA H: T: L 1 :
Inductive algorithms LR HLRT OCLR N-LR
OCLR ↓ Some Country Codes ↓ Congo 242 Egypt Belize Spain ↓ Some Country Codes ↓ End ↓ ↓ ↓ CADENA SEMILLA PARA O Y C CADENA SEMILLA PARA l 1 ↓ ↓ ↓ ↓ ↓ ↓ Some Country Codes ↓
O:< C : > L 1 : OCLR Condiciones de validez para validar la tripleta: 1)O substring de las cabeceras 2)l 1 sufijo apropiado después de O. 3)C substring de la cola 4)O no debe ocurrir después de C 5)O substring del texto entre tuplas 6)C substring del texto entre tuplas de cada página. 7)l 1 sufijo apropiado TRIPLETA VÁLIDA O: C : L 1 : H = “* ” T = “ *” CountryName = “ * ” TRIPLETA NO VÁLIDA O:<B C : > L 1 :
Algoritmos de Inducción LR HLRT OCLR N-LR
name: ame: me: e: : Candidatos l 1 John 12 Main St Jane Sally 10 Oak Ave 20 Walnut Rd name: address: ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ Candidatos r 1 ↓ ↓
John 12 Main St Jane Sally 10 Oak Ave 20 Walnut Rd N-LR name: Candidatos l 2 address: ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓address: address: ddress: dress: … s: : Candidatos r 2 ↓ ↓ ↓ ↓
N-LR CONJUNTO DE DELIMITADORES VÁLIDOS l 1 :name: r 1 : l 2 :address: r 2 : ↓ Name = “name: * ↓” ↓ Address = “address: * ↓” ↓ ↓ Condiciones de validez para un conjunto de candidatos l y r: 1)Selección de conjunto de candidatos y validación mediante ejecución del extractor N-LR
Índice Introducción Reglas de Extracción Generación de reglas de extracción Extrayendo Información Evaluación Conclusiones
LR CountryName = “ * ” CountryCode = “ * ” CountryName = “ * ” CountryCode = “ * ” Atributos Congo242 Egypt20 Belize501 Spain34 … Congo 242 ↓ Egypt Belize Spain ↓ Congo 242
HLRT Head = “* ” Tail = “ *” CountryName = “ * ” CountryCode = “ * ” Head = “* ” Tail = “ *” CountryName = “ * ” CountryCode = “ * ” Atributos Congo242 Egypt20 Belize501 Spain34 Congo 242 ↓ Egypt Belize Spain ↓ Congo 242 ↓ Some Country Codes ↓ … ↓ End ↓
OCLR Open = “* ” Close = “ ” CountryName = “ * ” CountryCode = “ * ” Open = “* ” Close = “ ” CountryName = “ * ” CountryCode = “ * ” Atributos Congo242 Egypt20 Belize501 Spain34 … ↓ Some Country Codes ↓ ↓ Congo 242 ↓ ↓ Egypt 20 ↓ ↓ Belize 501 ↓ ↓ Spain 34 ↓ End Congo 242
N-LR ↓ name:John ↓ ↓ address: 12 Main St↓ ↓ name:Jane↓ ↓ name:Sally↓ ↓ address: 10 Oak Ave↓ ↓ address: 20 Walnut Rd↓ N-LR ↓ Name = “name: * ↓” ↓ Address = “address * ↓” ↓ Name = “name: * ↓” ↓ Address = “address * ↓” Atributos John 12 Main St Jane Sally 20 Walnut Rd 10 Oak Ave address:
Índice Introducción Reglas de Extracción Generación de reglas de extracción Extrayendo Información Evaluación Conclusiones
Evaluación 70% de los casos aprende un tipo de extractor de información Sólo se necesitan un par de ejemplos
Índice Introducción Reglas de Extracción Generación de reglas de extracción Extrayendo Información Evaluación Conclusiones
Conclusions LR, HLRT, OCLR, N-LR Variantes: HOCLRT, N-HLRT Problemáticos en la web actual
¡Gracias por asistir! Información de contacto