540 likes | 554 Views
This paper discusses the development of a wrapper induction approach for extracting desired information from web pages using machine learning. It explores the challenges of building the extractor quickly, independently of traditional IE, and extracting data from multiple web-based sources. The paper also presents related work on shopbots, Ariadne, WIEN, and STALKER.
E N D
Machine-learning based Semi-structured IE Chia-Hui Chang Department of Computer Science & Information Engineering National Central University chia@csie.ncu.edu.tw
Wrapper Induction • Wrapper • An extracting program to extract desired information from Web pages. Semi-Structure Doc.– wrapper→ Structure Info. • Web wrappers wrap... • “Query-able’’ or “Search-able’’ Web sites • Web pages with large itemized lists • The primary issues are: • How to build the extractor quickly?
Semi-structured IE • Independently of the traditional IE • The necessity of extracting and integrating data from multiple Web-based sources
Machine-Learning Based Approach • A key component of IE systems is • a set of extraction patterns • that can be generated by machine learning algorithms.
Related Work • Shopbot • Doorenbos, Etzioni, Weld, AA-97 • Ariadne • Ashish, Knoblock, Coopis-97 • WIEN • Kushmerick, Weld, Doorenbos, IJCAI-97 • SoftMealy wrapper representation • Hsu, IJCAI-99 • STALKER • Muslea, Minton, Knoblock, AA-99 • A hierarchical FST
WIEN N. Kushmerick, D. S. Weld, R. Doorenbos, University of Washington, 1997 http://www.cs.ucd.ie/staff/nick/
Wrapper Induction • Induction: • The task of generalizing from labeled examples to a hypothesis • Instances: pages • Labels: {(Congo, 242), (Egypt, 20), (Belize, 501), (Spain, 34)} • Hypotheses: • E.g. (<p>, <HR>, <B>, </B>, <I>, </I>)
Other Family • OCLR (Open-Close-Left-Right) • Use Open and Close as delimiters for each tuple • HOCLRT • Combine OCLR with Head and Tail • N-LR and N-HLRT • Nested LR • Nested HLRT
Terminology • Oracles • Page Oracle • Label Oracle • PAC analysis • is to determine how many examples are necessary to build an wrapper with two parameters: accuracy and confidence : • Pr[E(w)<]>1-, or Pr[E(w)>]<
Probably Approximate Correct (PAC) Analysis • With =0.1, =0.1, K=4, an average of 5 tuples/page, Build HLRT must examine at least 72 examples
Empirical Evaluation • Extract 48% web pages successfully. • Weakness: • Missing attributes, attributes not in order, tabular data, etc.
Softmealy Chun-Nan Hsu, Ming-Tzung Dung, 1998 Arizona State University http://kaukoai.iis.sinica.edu.tw/~chunnan/mypublications.html
Softmealy Architecture Finite-State Transducers for Semi-Structured Text Mining • Labeling: use a interface to label example by manually. • Learner: FST (Finite-State Transducer) • Extractor: • Demonstration • http://kaukoai.iis.sinica.edu.tw/video.html
Softmealy Wrapper • SoftMealy wrapper representation • Uses finite-state transducer where each distinct attribute permutations can be encoded as a successful path • Replaces delimiters with contextual rules that describes the context delimiting two adjacent attributes
Label the Answer Key 4種情形
b Finite State Transducer 多解決了(N, M)、(N, A, M)2個情形 skip extract skip extract U -U N skip -N extract skip extract skip -A e M A
Contextual based Rule Learning • Tokens • Separators • SL ::= … Punc(,) Spc(1) Html(<I>) • SR ::= C1Alph(Professor) Spc(1) OAlph(of) … • Rule generalization • Taxonomy Tree
Tokens • All uppercase string: CALph • An uppercase letter, followed by at least one lowercase letter, C1Alph • A lowercase letter, followed by zero or more characters: OAlph • HTML tag: HTML • Punctuation symbol: Punc • Control characters: NL(1), Tab(4), Spc(3)
Generalize each column by replacing each token with their least common ancestor Learning Algorithm
Generating to Extract the Body • The contextual rules for the head and tail separators are: • hL::=C1alpha(Staff) Html(</H2>) NL(1)Html(<HR>) NL(1) Html(<UL>) • tR::=Html(</UL>) NL(1) Html(<HR>) NL(1) Html(<ADDRESS>) NL(1) Html(<I>) Clalpha(Please)
More Expressive Power • Softmealy allows • Disjunction • Multiple attribute orders within tuples • Missing attributes • Features of candidate strings
Stalker I. Muslea, S. Minton, C. Knoblock, University of Southern California http://www.isi.edu/~muslea/
STALKER • Embedded Catalog Tree • Leaves (primitive items): 所要擷取的東西。 • Internal nodes (items): • Homogeneous list, or • Heterogeneous tuple.
Extracting Data from a Document • For each node in the EC Tree, the wrapper needs a rule that extracts that particular node from its parent • Additionally, for each list node, the wrapper requires a list iteration rule that decomposes the list into individual tuples. • Advantages: • The hierarchical extraction based on the EC tree allows us to wrap information sources that have arbitrary many levels of embedded data. • Second, as each node is extracted independently of its siblings, our approach does not rely on there being a fixed ordering of the items, and we can easily handle extraction tasks from documents that may have missing items or items that appear in various orders.
Extraction Rules as Finite Automata • Landmarks • A sequence of tokens and wildcards • Landmark automata • A non-deterministic finite automata
Landmark Automata • A linear LA has one accepting state • from each non-accepting state, there are exactly two possible transitions: a loop to itself, and a transition to the next state; • each non-looping transition is labeled by a landmarks; • all looping transitions have the meaning “consume all tokens until you encounter the landmark that leads to the next state”.
Rule Generating Extract Credit info. 1st : terminals: {; reservation _Symbol_ _Word_} Candidate:{; <i> _Symbol_ _HtmlTag_} perfect Disj:{<i> _HtmlTag_} positive example: D3, D4 2nd: uncover{D1, D2} Candicate:{; _Symbol_}
Features • Process is performed in a hierarchical manner. • 沒有Attributes not in order的問題。 • Use disjunctive rule 可以解決Missing attributes的問題。
Multi-pass Softmealy Chun-Nan Hsu and Chian-Chi Chang Institute of Information Science Academia Sinica Taipei, Taiwan
Tabular style document (Quote Server)
Tagged-list style document (Internet Address Finder)
Layout styles and learnability • Tabular style • missing attributes, ordering as hints • Tagged-list style • variant ordering, tags as hints • Prediction • single-pass for tabular style • multi-pass for tagged-list style