Скачать презентацию Text Retrieval and Mining 11 -1 Information Скачать презентацию Text Retrieval and Mining 11 -1 Information

528af1e59a2ca7fc7b569a604707b97c.ppt

  • Количество слайдов: 42

Text Retrieval and Mining # 11 -1 Information Extraction Lecture by Young Hwan CHO, Text Retrieval and Mining # 11 -1 Information Extraction Lecture by Young Hwan CHO, Ph. D. Youngcho@gmail. com

Plan for Today n Information Extraction t Introduction to the IE problem t Wrappers Plan for Today n Information Extraction t Introduction to the IE problem t Wrappers t Wrapper Induction t Traditional NLP-based IE t Pattern Learning Systems: Rapier t Probabilistic sequence models: HMMs 2

What is Information Extraction? n the extraction or pulling out of pertinent information from What is Information Extraction? n the extraction or pulling out of pertinent information from large volumes of texts n 어떠한 문서를 사용자가 읽어야 한다는 것을 알려주기보다는 사용자에게 필요한 부 분의 정보의 조각을 추출하고, 추출된 정보와 원래의 문서간의 링크를 유지해서 사용 자가 내용을 참조하도록 링크하는 것 n 이러한 정보는 신뢰성이 높고 자세하여야 하는데, 최근의 기술로는 아래와 같은 수준 을 보인다. Items of Information Definitions Percentile Reliability Entities an object of interest such as a person or organization 90 Attributes a property of an entity such as its name, alias, descriptor, or type 80 Facts a relationship held between two or more entities 70 an activity or occurrence of interest such as a terrorist act or an airline crash 60 Events 3

IE from the Web: The Big Picture 4 IE from the Web: The Big Picture 4

Information Extraction의 컴포넌트 n Spider : 웹 페이지 수집 t n Wrapper : HTML Information Extraction의 컴포넌트 n Spider : 웹 페이지 수집 t n Wrapper : HTML 페이지 -> XML DB t n 대상이 되는 웹페이지를 수집, 다음 페이지 URL 찾기 CGI 스타일의 페이지에서는 Wrapper 만으로도 충분히 역할을 할 수 있음 NLP Lib : 문장에서 정보 추출 t t n Free Style의 HTML, 설명형태의 글, 뉴스 등에서 특정 Fact 수집 DB는 Text 보다 과거의 데이터를 담고 있음 Information Cooking t Identification : 문서 스타일 판별 t Segmentation : 문서의 구성요소 조각 나눔 t Classification : 문서내의 entity 범주화, 문서 범주화 t Clustering : 문서내의 entury 군집화, 문서 군집화 t Association : 문서내의 정보를 DB의 Field로 매핑 5

Examples : Corpus n Fletcher Maddox, former Dean of the UCSD Business School, announced Examples : Corpus n Fletcher Maddox, former Dean of the UCSD Business School, announced the formation of La Jolla Genomatics together with his two sons. La Jolla Genomatics will release its product Geninfo in June 1999. Geninfo is a turnkey system to assist biotechnology researchers in keeping up with the voluminous literature in all aspects of their field. n Dr. Maddox will be the firm's CEO. His son, Oliver, is the Chief Scientist and holds patents on many of the algorithms used in Geninfo. Oliver's brother, Ambrose, follows more in his father's footsteps and will be the CFO of L. J. G. headquartered in the Maddox family's hometown of La Jolla, CA. 6

Examples : Entity Persons: Organizations: Locations: Artifacts: Dates: Fletcher Maddox UCSD Business School La Examples : Entity Persons: Organizations: Locations: Artifacts: Dates: Fletcher Maddox UCSD Business School La Jolla Geninfo June 1999 Dr. Maddox La Jolla Genomatics CA Geninfo Oliver La Jolla Genomatics Oliver L. J. G. Ambrose Maddox 7

Examples : Attributes La Jolla Genomatics L. J. G. Fletcher Maddox former Dean of Examples : Attributes La Jolla Genomatics L. J. G. Fletcher Maddox former Dean of the UCSD Business School his father the firm's CEO NAME: CATEGORY: ORGANIZATION CATEGORY: PERSON NAME: Geninfo NAME: Oliver His son Chief Scientist DESCRIPTOR : its product CATEGORY: ARTIFACT CATEGORY: PERSON NAME: La Jolla NAME: Ambrose Oliver's brother the CFO of L. J. G. DESCRIPTOR : the Maddox family's hometown CATEGORY: LOCATION NAME: CA NAME: DESCRIPTOR: DESCRIPTOR : CATEGORY: PERSON NAME: UCSD Business School DESCRIPTOR : ORGANIZATION CATEGORY: DESCRIPTOR: CATEGORY: LOCATION 8

Examples : Facts PERSON Employee_of ORGANIZATION Fletcher Maddox Oliver Ambrose Employee_of UCSD Business School Examples : Facts PERSON Employee_of ORGANIZATION Fletcher Maddox Oliver Ambrose Employee_of UCSD Business School La Jolla Genomatics ARTIFACT Product_of ORGANIZATION Geninfo Product_of La Jolla Genomatics LOCATION Location_of ORGANIZATION La Jolla Location_of La Jolla Genomatics CA Location_of La Jolla Genomatics 9

Examples : Events • 회사설립 이벤트 COMPANY: La Jolla Genomatics PRINCIPALS: Fletcher Maddox Oliver Examples : Events • 회사설립 이벤트 COMPANY: La Jolla Genomatics PRINCIPALS: Fletcher Maddox Oliver Ambrose DATE: CAPITAL: • 상품출시 이벤트 COMPANY: La Jolla Genomatics PRODUCT: Geninfo DATE: June 1999 COST: 10

Unstructured Data -> Strcutured/Semi-Structured Data n Task = Filling slots in a database from Unstructured Data -> Strcutured/Semi-Structured Data n Task = Filling slots in a database from sub-segments of text n Techniques = Segmentation + classification + clustering + association 11

Source Styles 12 Source Styles 12

Segmentation n Extract metadata (e. g. author, title, date) n Identify sections (e. g. Segmentation n Extract metadata (e. g. author, title, date) n Identify sections (e. g. abstract) n Extract keywords 13

Clustering + Classification n Document 내부에서 t 문서내의 Named Entity에 대해서 Entity Type을 판단 Clustering + Classification n Document 내부에서 t 문서내의 Named Entity에 대해서 Entity Type을 판단 l l t n 인명, 직책, 기관명, 날짜, 기관, 단위, 주소 제목, 나열형 문장, 설명형 문장 동일 데이터 형태가 나열된 경우에, 밝혀진 것과 동일한 패턴으로 나열된 데이터 에 대해서 동일한 filed로 인정 여러 Document로부터 t 추출된 정보의 신뢰도를 측정 (문서의 중요도, 분야의 적합성) t 다수의 Source에서 수집된 정보에 대해서 상호 비교 14

Association 15 Association 15

Global vs Local Extrations n Local Extraction models t t n 하나의 웹사이트로부터 정보를 Global vs Local Extrations n Local Extraction models t t n 하나의 웹사이트로부터 정보를 추출 해당 사이트에 꼭 맞춘 형식화된 XML 스타일로 HTML 문서를 변환 Global Extraction models t n 많은 웹 사이트의 텍스트로부터 필드화된 정보를 추출 두 모델을 혼합 t Local model은 Global model의 학습용 데이터 혹은 정확도가 높은 초기 DB를 추출해 줄 수 있음 t Global model은 Local model에서 발생하지 않은 새로운 데이터나 새로운 필드 를 추가해 줄 수 있음 16

Information Extraction in Real n CGI로 생성된 HTML 페이지 t t n 생성 : Information Extraction in Real n CGI로 생성된 HTML 페이지 t t n 생성 : DB -> (CGI) -> HTML 리버스엔지니어링 : HTML -> (Crawler) -> (Wrapper) -> DB News, Report t 언어적인 분석을 통해서 Entity, Attribute, Fact, Event를 추출하여야 함 17

Extracting Corporate Information Data automatically extracted from marketsoft. com Source web page. Color highlights Extracting Corporate Information Data automatically extracted from marketsoft. com Source web page. Color highlights indicate type of information. (e. g. , red = name) E. g. , information need: Who is the CEO of Market. Soft? Source: Whizbang! Labs/ Andrew Mc. Callum 18

Product information 19 Product information 19

Product information 20 Product information 20

Canonicalization: Product information 21 Canonicalization: Product information 21

Wrappers n 에이전트를 이용한 정보추출을 위해서는 각 문서에 대해서 추출하고자 하는 정보의 위치와 구조, Wrappers n 에이전트를 이용한 정보추출을 위해서는 각 문서에 대해서 추출하고자 하는 정보의 위치와 구조, 포맷 등을 나타내는 규칙이 필요하며 일반적으로 이러 한 규칙을 wrapper라고 한다. n Wrapper의 작성 t 수동 작성 : 정보 추출의 정확성을 높일수 있지만 문서가 변경되면 대책이 없음 t 자동 생성 : 도메인 지식과 샘플문서를 이용해서 자동 생성, 문서 변경에 대응 22

The Age of Spiritual Machines : When" src="https://present5.com/presentation/528af1e59a2ca7fc7b569a604707b97c/image-23.jpg" alt="Amazon Book Description …. The Age of Spiritual Machines : When" /> Amazon Book Description …. The Age of Spiritual Machines : When Computers Exceed Human Intelligence by Ray Kurzweil List Price: $14. 95 Our Price: $11. 96 You Save: $2. 99 (20%)

… 23

Extracted Book Template Title: The Age of Spiritual Machines : When Computers Exceed Human Extracted Book Template Title: The Age of Spiritual Machines : When Computers Exceed Human Intelligence Author: Ray Kurzweil List-Price: $14. 95 Price: $11. 96 : : 24

Wrappers: Simple Extraction Patterns n Specify an item to extract for a slot using Wrappers: Simple Extraction Patterns n Specify an item to extract for a slot using a regular expression pattern. t n Price pattern: “b$d+(. d{2})? b” May require preceding (pre-filler) pattern to identify proper context. t Amazon list price: l l n Pre-filler pattern: “List Price: ” Filler pattern: “$d+(. d{2})? b” May require succeeding (post-filler) pattern to identify the end of the filler. t Amazon list price: l l l Pre-filler pattern: “List Price: ” Filler pattern: “. +” Post-filler pattern: “” 25

Wrapper induction Highly regular source documents Relatively simple extraction patterns n Writing accurate patterns Wrapper induction Highly regular source documents Relatively simple extraction patterns n Writing accurate patterns for each slot for each domain (e. g. each web site) requires laborious software engineering. n Alternative is to use machine learning: t 학습용 데이터 (문서와 사람이 만든 규칙 pair)를 구축한다. t HTML 문서에서 각 항목의 주위에 나타나 는 특정 패턴을 자동 학습한다. Efficient learning algorithm 26

Wrapper induction: Delimiter-based extraction <HTML><TITLE>Some Country Codes</TITLE> <B>Congo</B> <I>242</I><BR> <B>Egypt</B> <I>20</I><BR> <B>Belize</B> <I>501</I><BR> <B>Spain</B> Wrapper induction: Delimiter-based extraction Some Country Codes Congo 242
Egypt 20
Belize 501
Spain 34
Use , , , for extraction 27

Learning LR wrappers labeled pages <HTML><HEAD>Some Country Codes</HEAD> <B>Congo</B> <I>242</I><BR> Codes</HEAD> <HTML><HEAD>Some Country <B>Egypt</B> Learning LR wrappers labeled pages Some Country Codes Congo 242
Codes Some Country Egypt 20
Congo 242
Codes Some Country Belize 501
Egypt 20
Congo 242
Codes Some Country Spain 34
Belize 501
Egypt 20
Congo 242
501
Spain 34
Belize 20
Egypt 501
Spain 34
Belize Spain 34
wrapper l 1, r 1, …, l. K, r. K Example: Find 4 strings , , , l 1 , r 1 , l 2 , r 2 28

LR: Finding r 1 <HTML><TITLE>Some Country Codes</TITLE> <B>Congo</B> <I>242</I><BR> <B>Egypt</B> <I>20</I><BR> <B>Belize</B> <I>501</I><BR> <B>Spain</B> LR: Finding r 1 Some Country Codes Congo 242
Egypt 20
Belize 501
Spain 34
r 1 c y prefix an be an eg
29

LR: Finding l 1, l 2 and r 2 <HTML><TITLE>Some Country Codes</TITLE> <B>Congo</B> <I>242</I><BR> LR: Finding l 1, l 2 and r 2 Some Country Codes Congo 242
Egypt 20
Belize 501
Spain 34
efix e any pr r 2 can b /I> eg < any l 2 can be I> suffix eg < suffix n be any> l 1 ca eg

Wrapper 생성기 : 전체 흐름도와 도메인 지식 표현 31 Wrapper 생성기 : 전체 흐름도와 도메인 지식 표현 31

Wrapper 생성기 : 전처리 – 논리라인 생성 n 브라우저 상에 출력되는 형태처럼 눈에 보이지 Wrapper 생성기 : 전처리 – 논리라인 생성 n 브라우저 상에 출력되는 형태처럼 눈에 보이지 않는 HTML 태그를 제거하 고 테이블 관련 태그(예를 들어, TR, TH 등)나 라인을 분리할 때 사용되는 리 스트형 태그(예를 들어, BR, P, LI)를 기준으로 라인을 분리 32

Wrapper 생성기 : 도메인 지식을 이용해서 논리 라인 의미 분석 도메인 지식의 각 OBJECT에 Wrapper 생성기 : 도메인 지식을 이용해서 논리 라인 의미 분석 도메인 지식의 각 OBJECT에 대한 패턴을 논리라인으로부터 찾아서 일치하는 FORMAT을 기록한다. 33

XML 규칙 생성 n 도메인 지식을 적용해서 HTML에서 특정 패턴에 대한 현상을 XML 문서로 XML 규칙 생성 n 도메인 지식을 적용해서 HTML에서 특정 패턴에 대한 현상을 XML 문서로 기술하여 XML 파일로 저장한다. n 이 XML로 기술된 정보추출 규칙에 따라서 해당 HTML 문서에서의 정보를 추출한다. 34

Natural Language Processing-based IE n If extracting from more natural, unstructured, human-written text, some Natural Language Processing-based IE n If extracting from more natural, unstructured, human-written text, some NLP may help. t Part-of-speech (POS) tagging (품사 태깅) l t Syntactic parsing (명사구, 동사구, 관형어구) l t Identify phrases: NP, VP, PP Semantic word categories (e. g. from Word. Net) l n Mark each word as a noun, verb, preposition, etc. KILL: kill, murder, assassinate, strangle, suffocate Extraction patterns can use POS or phrase tags. t Crime victim: 누가 [ 죽였다 누구를] l l Prefiller: [POS: V, Hypernym: KILL] Filler: [Phrase: NP] 35

Finite state automata transductions Pattern-maching {PN ’s | Art}(ADJ)* N (P Art (ADJ)* N)* Finite state automata transductions Pattern-maching {PN ’s | Art}(ADJ)* N (P Art (ADJ)* N)* PN ’s (ADJ)* N P Art (ADJ)* N 1 ’s PN Art 0 2 ADJ N ’s 3 John’s interesting book with a nice cover Art P PN 4 36

Rule-based Extraction Examples n Determining which person holds what office in what organization t Rule-based Extraction Examples n Determining which person holds what office in what organization t [person] , [office] of [org] l t [org] (named, appointed, etc. ) [person] P [office] l n Vuk Draskovic, leader of the Serbian Renewal Movement NATO appointed Wesley Clark as Commander in Chief Determining where an organization is located t [org] in [loc] l t NATO headquarters in Brussels [org] [loc] (division, branch, headquarters, etc. ) l KFOR Kosovo headquarters 37

Three generations of IE systems n Hand-Built Systems – Knowledge Engineering [1980 s– ] Three generations of IE systems n Hand-Built Systems – Knowledge Engineering [1980 s– ] t t 해당 분야와 정보추출 시스템에 능통한 전문가가 필요 t n 규칙을 직접 작성 { 추측 – 실험 -변경 } 을 반복함 Automatic, Trainable Rule-Extraction Systems [1990 s– ] t t n 미리 정의된 템플렛을 이용해서 규칙을 자동으로 발견하는 시스템 대규모의 labeled corpora가 필요 Statistical Generative Models [1997 – ] t 문서에서 연관성이 있는 부분을 찾아내는 통계적인 모델 이용 - using HMMs or statistical parsers t Learning usually supervised; may be partially unsupervised 38

Evaluating IE Accuracy n 시스템 개발에서 사용되지 않은 사람이 직접 만든 테스트 데이터를 사용하 Evaluating IE Accuracy n 시스템 개발에서 사용되지 않은 사람이 직접 만든 테스트 데이터를 사용하 여 성능을 측정 n Template Measure for each test document: t t Total number of slot/value pairs extracted by the system: E t n Total number of correct extractions in the solution template: N Number of extracted slot/value pairs that are correct (i. e. in the solution template): C Compute average value of metrics adapted from IR: t Recall = C/N t Precision = C/E t F-Measure = Harmonic mean of recall and precision 39

MUC: the genesis of IE n n n DARPA funded significant efforts in IE MUC: the genesis of IE n n n DARPA funded significant efforts in IE in the early to mid 1990’s. Message Understanding Conference (MUC) was an annual event/competition where results were presented. Focused on extracting information from news articles: t t t Terrorist events Industrial joint ventures Company management changes n Information extraction of particular interest to the intelligence community (CIA, NSA). n 참조 사이트 t http: //www-nlpir. nist. gov/related_projects/muc/proceedings/muc_7_toc. html 40

MUC Information Extraction: State of the Art c. 1997 NE – named entity recognition MUC Information Extraction: State of the Art c. 1997 NE – named entity recognition CO – coreference resolution TE – template element construction TR – template relation construction ST – scenario template production 41

Basic IE References n Douglas E. Appelt and David Israel. 1999. Introduction to Information Basic IE References n Douglas E. Appelt and David Israel. 1999. Introduction to Information Extraction Technology. IJCAI 1999 Tutorial. http: //www. ai. sri. com/~appelt/ie-tutorial/ n Kushmerick, Weld, Doorenbos: Wrapper Induction for Information Extraction, IJCAI 1997. http: //www. cs. ucd. ie/staff/nick/ n Stephen Soderland: Learning Information Extraction Rules for Semi. Structured and Free Text. Machine Learning 34(1 -3): 233 -272 (1999) 42