Download presentation

Presentation is loading. Please wait.

Published byLitzy Bordwell Modified over 2 years ago

1
Information Extraction with Tree Automata Induction Raymond Kosala 1, Jan Van den Bussche 2, Maurice Bruynooghe 1, Hendrik Blockeel 1 1 Katholieke Universiteit Leuven, Belgium 2 University of Limburg, Belgium

2
2 Outline Introduction: –information extraction (IE) –grammatical inference Approach k-testable and g-testable algorithms Preliminary result Further work

3
3 IE from unstructured documents Extract certain fields of interest from a text Learner is trained with (positive) examples Each learner focuses on a single field marked with ‘x’ Requirement 2 Requirement 1 Job Title Company Name

4
4 Grammatical inference : finite alphabet Regular language L * Given: set of examples (pos. or neg.) Task: infer a DFA compatible with examples Quality criterion: –Exact learning in the limit –PAC –etc. Large body of work

5
5 IE with grammatical inference Mark field ‘x’ as special token Infer DFA for the language L = {S over ( x)* | the field to be extracted is marked by x} Only positive examples

6
6 IE from structured documents Previous works learn string language XML or HTML data: tree structured Natural extension is to learn a tree language “x has a b-brother” Extraction of a field can depend on structural context a a b bxac cccc x a b baaa cccccc

7
7 Learning process ….. ………. ……. Structured document Parsed and annotated Transformed Tree automata learner

8
8 Testing process ….. ………. ……. Structured document ParsedTransformed With each text nodes replaced, run the tree automaton Output

9
9 Page examples

10
10 Why do we need the context? Not enough to differentiate the fields of interest that depend on the structural context. Can be chosen automatically. |-- tr |-- td |-- lastupdate (CDATA) |-- td |-- b |-- 12/4/98 |-- td |-- tr |-- td |-- tr |-- td |-- organization (CDATA) |-- td |-- b |-- ABC |-- td |-- tr |-- td

11
11 Tree automata Ranked alphabet : finite set of function symbols with arities. E.g. = {a (2), b (2), c (0) } Tree ground term over a(c,a(b(c,c),b(c,c))) : tree with depth 3 Tree automaton: M = ( , Q, , F). is a set of transitions of the form: v(q 1, …, q n ) q Where v , n is the arity of v, q i and q Q c a a bb cccc

12
12 Example Given an automaton M with the following transitions: 1 : c q 0 2 : a(q 0, q 0 ) q 0 3 : b(q 0, q 0 ) accept M accepts a tree t t has b-node as the root a b a ac cc cc c b a cc a a c cc

13
13 Unranked trees XML/HTML: bib … paper report book paper … The number of children is not fixed by the label Two approaches: 1. Generalize notion of tree automaton to unranked trees. L transition rules: v(e) q, where e is regular expression over Q 2. Encode as ranked tree

14
14 Encoding of unranked trees There are well-known methods of encoding to binary trees, we use: –encode(T) = encode f (T) v if F1 = F2 = v right (encode f (F2)) if F1 = , F2 –encode f (v(F1), F2) = v left (encode f (F1)) if F1 , F2 = v(encode f (F1), encode f (F2)) otherwise Where: T := v(F), v F := F := T, F Example: becomes | b_right a_left c ad b a dc a

15
15 k-testable tree languages Languages in which membership can be checked by just looking at subtrees of length k-1 that appear in the tree. k-roots: k-forks: k-subtrees:

16
16 k-testable tree languages (cont.) An example t: html head body title h1 table f 2 (t): html head body head body title h1 table r 2 (t): html head body s 2 (t): body head table title h1 h1 table title

17
17 k-testable algorithm [Rico-Juan, et al.] Given: a set of positive examples T, a positive integer k Q, FS, = Ø For each t T, –Let R = r k-1 (t); F = f k (t); S = s k-1 (t); –Q = Q R r k-1 ( F ) S ; –FS = FS R; – v(t 1, …,t m ) S : = { m (v(t 1, …,t m )) = v(t 1, …,t m )} – v(t 1, …,t m ) F : = { m (v(t 1, …,t m )) = r k-1 (v(t 1, …,t m ))}

18
18 g-testable algorithm Idea: generalize state transitions from forks that are not important for the extraction. Important forks are those that contain ‘x’ and (possibly) the distinguishing context. a bc de ** ** a bc ** at:t:gen(t,1):gen(t,2):

19
19 g-testable algorithm Given: a set of positive examples T, positive integer k and l FS, , Ss, CF, OF, OF’ = Ø For each t T, –Let R = r k-1 (t); F = f k (t); S = s k-1 (t); –Ss = Ss S –FS = FS R – v(t 1, …,t m ) S : = { m (v(t 1, …,t m )) = v(t 1, …,t m )} –CF = CF {f | f F, f contains x} –OF = OF {f | f F, f does not contain x} For each of OF, –of’ = gen(of,l) –If of’ covers one of CF then OF’ = OF’ of else OF’ = OF’ of’ Let F’ = OF’ CF Q = Q F r k-1 ( F’ ) Ss v(t 1, …,t m ) F’ : = { m (v(t 1, …,t m )) = r k-1 (v(t 1, …,t m ))}

20
20 g-testable algorithm example A set of examples T (with k = 2 and l = 1): html html head body head body title h1 x table title h1 x F = f 2 (T): html head body body head body title h1 x h1 x table FS = {html} OF = {html(head, body), head(title)} CF = {body(h1, x), body(h1, x, table)} OF’ = {html(*, *), head(*)} R = r 1 (T): html Ss = s 1 (T): table, title, h1, x

21
21 g-testable algorithm example (cont.) F’ = {html(*, *), head(*), body(h1, x), body(h1, x, table)} Transitions from the trees in the subtrees s 1 (T): – (table) = table – (title) = title – (h1) = h1 – (x) = x Transitions from the trees in the generalized forks F’: – (html(*, *)) = html – (head(*)) = head – (body(h1, x)) = body – (body(h1, x, table)) = body Q = {html ; head ; body ; table ; title ; h1; x}

22
22 Experiment Two benchmark datasets: Internet Address Finder (IAF) and Quote Server (QS). Comparison with: HMM, Stalker, and BWI. The highlights of our method: –More expressive. –Doesn’t require: manual specifications of windows length of the prefix and suffix of the target field (HMM and BWI) special tokens of the delimiters such as “:” “>” (Stalker and BWI) embedded catalog tree (Stalker) The limitations: –The field that can be extracted limited to whole node –Slower when extracting

23
23 Experiment results The results in % are: Dataset: IAF-altname IAF-org QS-date QS-vol Shakespeare Prec Rec F1 Prec Rec F1 Prec Rec F1 Prec Rec F1 Prec Rec F1 -------------------------------------------------------------------------------------------------------------------------- HMM 1.7 90 3.4 16.8 89.7 28.4 36.3 100 53.3 18.4 96.2 30.9 Stalker 100 - - 48.0 - - 0 - - 0 - - BWI 90.9 43.5 58.8 77.5 45.9 57.7 100 100 100 100 61.9 76.5 k-testable 100 73.9 85 100 57.9 73.3 100 60.5 75.4 100 73.6 84.8 56.2 90 69.2 g-testable 100 73.9 85 100 82.6 90.5 100 60.5 75.4 100 73.6 84.8 69.2 90 78.2 Parameters 4 and (5,2) 2 and (3,2) 2 and (3,2) 5 and (6,5) 3 and (4,2) * F1 is the harmonic mean of recall and precision * The results of HMM, Stalker and BWI are adopted from [Freitag & Kushmerick]

24
24 Further work More generalization while using bigger context is achieved, but sometimes the binarisation makes the context far from the field of interest the generalization cannot go very far Work on the algorithm that can work directly with unranked trees.

Similar presentations

OK

Bernd Fischer RW713: Compiler and Software Language Engineering.

Bernd Fischer RW713: Compiler and Software Language Engineering.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on plane table survey Ppt on c-programming basics Ppt on rajputs of india Ppt on mental health nursing Ppt on financial ratio analysis Ppt on non biodegradable waste materials Ppt on biological pest control Ppt on role of entrepreneurship in economic development Ppt on action words for class 1 Ppt on teaching learning materials