Algorithm for multiple layers 1: M 1 ←≈ A 1 ( M ) 2: M 2 ←≈ A 2 ( M 1 ) . . . 3: M m ←≈ A m ( M m − 1 ) 4: P f ← ∅ 5: P m ← R M m ( w ) 6: while | P f | < n or max θ ∈ P f wt ( θ ) > min θ ′ ∈ P m wt ( ≈ − 1 A ( θ ′ )) do θ m ← smallest element of P m 7: P m ← P m \ { θ m } 8: for θ m − 1 ∈≈ − 1 A m ( θ m ) do 9: if θ m − 1 ∈ R M m − 1 then 10: 15: return P f 23 / 2
Algorithm for multiple layers 1: M 1 ←≈ A 1 ( M ) 2: M 2 ←≈ A 2 ( M 1 ) . . . 3: M m ←≈ A m ( M m − 1 ) 4: P f ← ∅ 5: P m ← R M m ( w ) 6: while | P f | < n or max θ ∈ P f wt ( θ ) > min θ ′ ∈ P m wt ( ≈ − 1 A ( θ ′ )) do θ m ← smallest element of P m 7: P m ← P m \ { θ m } 8: for θ m − 1 ∈≈ − 1 A m ( θ m ) do 9: if θ m − 1 ∈ R M m − 1 then 10: for θ m − 2 ∈≈ − 1 A m − 1 ( θ m − 1 ) do 11: if θ m − 2 ∈ R M m − 2 then 12: 15: return P f 23 / 2
Algorithm for multiple layers 1: M 1 ←≈ A 1 ( M ) 2: M 2 ←≈ A 2 ( M 1 ) . . . 3: M m ←≈ A m ( M m − 1 ) 4: P f ← ∅ 5: P m ← R M m ( w ) 6: while | P f | < n or max θ ∈ P f wt ( θ ) > min θ ′ ∈ P m wt ( ≈ − 1 A ( θ ′ )) do θ m ← smallest element of P m 7: P m ← P m \ { θ m } 8: for θ m − 1 ∈≈ − 1 A m ( θ m ) do 9: if θ m − 1 ∈ R M m − 1 then 10: for θ m − 2 ∈≈ − 1 A m − 1 ( θ m − 1 ) do 11: if θ m − 2 ∈ R M m − 2 then 12: . . . for θ 0 ∈≈ − 1 A 1 ( θ 1 ) do 13: if θ 0 ∈ R M then P f ← P f ∪ { θ 0 } 14: 15: return P f 23 / 2
Initial M ≈ TTS M PD ≈ RLB M Rel ≈ PTK M NFA Recognise w with M NFA No run found Does not recognise 24 / 2
Initial M ≈ TTS M PD ≈ RLB M Rel Runs of M Rel ≈ PTK ≈ − 1 PTK , filter via M Rel M NFA Recognise w with M NFA No run found Does not recognise 24 / 2
Initial M ≈ TTS M PD Runs of M PD ≈ RLB ≈ − 1 RLB , filter via M PD M Rel Runs of M Rel ≈ PTK ≈ − 1 PTK , filter via M Rel M NFA Recognise w with M NFA No run found Does not recognise 24 / 2
Initial M Runs of M ≈ TTS ≈ − 1 TTS , filter via M M PD Runs of M PD ≈ RLB ≈ − 1 RLB , filter via M PD M Rel Runs of M Rel ≈ PTK ≈ − 1 PTK , filter via M Rel M NFA Recognise w with M NFA No run found Does not recognise 24 / 2
no run found Initial M Runs of M ≈ TTS ≈ − 1 TTS , filter via M M PD Runs of M PD ≈ RLB ≈ − 1 RLB , filter via M PD M Rel Runs of M Rel ≈ PTK ≈ − 1 PTK , filter via M Rel M NFA Recognise w with M NFA No run found Does not recognise 24 / 2
Outline 24 / 2
Implementation 1 1 using rustomata https://github.com/tud-fop/rustomata 25 / 2
Implementation 1 → app2 ptk Preprocessing: app0 tts → app1 rlb − − − − − − → app3 1 using rustomata https://github.com/tud-fop/rustomata 25 / 2
Implementation 1 → app2 ptk Preprocessing: app0 tts → app1 rlb − − − − − − → app3 for run1 in app3.recognise(word ). take(n) { let trans_runs1 = ctf_level(run1 , &ptk , &app2 ); for run2 in trans_runs1 { let trans_runs2 = ctf_level(run2 , &rlb , &app1 ); for run3 in trans_runs2 { let trans_runs3 = ctf_level(run3 , &tts , &app0 ); for run4 in trans_runs3 { println !("{:?}", run4 ); } } } } 1 using rustomata https://github.com/tud-fop/rustomata 25 / 2
Outline 25 / 2
Experiments ◮ Grammars created by using the first 5, 10, 15 and 20 sentences of the NEGRA corpus 2 2 http://www.coli.uni-saarland.de/projects/sfb378/negra-corpus/ negra-corpus.html 3 http: //www.coli.uni-saarland.de/projects/sfb378/negra-corpus/stts.asc 26 / 2
Experiments ◮ Grammars created by using the first 5, 10, 15 and 20 sentences of the NEGRA corpus 2 ◮ Grammars converted into Automata by rustomata 2 http://www.coli.uni-saarland.de/projects/sfb378/negra-corpus/ negra-corpus.html 3 http: //www.coli.uni-saarland.de/projects/sfb378/negra-corpus/stts.asc 26 / 2
Experiments ◮ Grammars created by using the first 5, 10, 15 and 20 sentences of the NEGRA corpus 2 ◮ Grammars converted into Automata by rustomata ◮ 2 equivalence classes, one using fanout and the other using tag-grouping 3 2 http://www.coli.uni-saarland.de/projects/sfb378/negra-corpus/ negra-corpus.html 3 http: //www.coli.uni-saarland.de/projects/sfb378/negra-corpus/stts.asc 26 / 2
Experiments ◮ Grammars created by using the first 5, 10, 15 and 20 sentences of the NEGRA corpus 2 ◮ Grammars converted into Automata by rustomata ◮ 2 equivalence classes, one using fanout and the other using tag-grouping 3 ◮ PTK heights of 5, 10, 15 and 20 2 http://www.coli.uni-saarland.de/projects/sfb378/negra-corpus/ negra-corpus.html 3 http: //www.coli.uni-saarland.de/projects/sfb378/negra-corpus/stts.asc 26 / 2
Experiments ◮ Grammars created by using the first 5, 10, 15 and 20 sentences of the NEGRA corpus 2 ◮ Grammars converted into Automata by rustomata ◮ 2 equivalence classes, one using fanout and the other using tag-grouping 3 ◮ PTK heights of 5, 10, 15 and 20 ◮ recognising three sentences contained in the corresponding corpus 2 http://www.coli.uni-saarland.de/projects/sfb378/negra-corpus/ negra-corpus.html 3 http: //www.coli.uni-saarland.de/projects/sfb378/negra-corpus/stts.asc 26 / 2
Experiments ◮ Grammars created by using the first 5, 10, 15 and 20 sentences of the NEGRA corpus 2 ◮ Grammars converted into Automata by rustomata ◮ 2 equivalence classes, one using fanout and the other using tag-grouping 3 ◮ PTK heights of 5, 10, 15 and 20 ◮ recognising three sentences contained in the corresponding corpus M PD M Rel M NFA M TTS RLB PTK 2 http://www.coli.uni-saarland.de/projects/sfb378/negra-corpus/ negra-corpus.html 3 http: //www.coli.uni-saarland.de/projects/sfb378/negra-corpus/stts.asc 26 / 2
Experiments ◮ Grammars created by using the first 5, 10, 15 and 20 sentences of the NEGRA corpus 2 ◮ Grammars converted into Automata by rustomata ◮ 2 equivalence classes, one using fanout and the other using tag-grouping 3 ◮ PTK heights of 5, 10, 15 and 20 ◮ recognising three sentences contained in the corresponding corpus 1 layer M PD M Rel M NFA M TTS RLB PTK 2 http://www.coli.uni-saarland.de/projects/sfb378/negra-corpus/ negra-corpus.html 3 http: //www.coli.uni-saarland.de/projects/sfb378/negra-corpus/stts.asc 26 / 2
Experiments ◮ Grammars created by using the first 5, 10, 15 and 20 sentences of the NEGRA corpus 2 ◮ Grammars converted into Automata by rustomata ◮ 2 equivalence classes, one using fanout and the other using tag-grouping 3 ◮ PTK heights of 5, 10, 15 and 20 ◮ recognising three sentences contained in the corresponding corpus 2 layers M PD M Rel M NFA M TTS RLB PTK 2 http://www.coli.uni-saarland.de/projects/sfb378/negra-corpus/ negra-corpus.html 3 http: //www.coli.uni-saarland.de/projects/sfb378/negra-corpus/stts.asc 26 / 2
Experiments ◮ Grammars created by using the first 5, 10, 15 and 20 sentences of the NEGRA corpus 2 ◮ Grammars converted into Automata by rustomata ◮ 2 equivalence classes, one using fanout and the other using tag-grouping 3 ◮ PTK heights of 5, 10, 15 and 20 ◮ recognising three sentences contained in the corresponding corpus 3 layers M PD M Rel M NFA M TTS RLB PTK 2 http://www.coli.uni-saarland.de/projects/sfb378/negra-corpus/ negra-corpus.html 3 http: //www.coli.uni-saarland.de/projects/sfb378/negra-corpus/stts.asc 26 / 2
Results 90 80 70 60 Time (s) 50 40 30 20 10 0 no app. 1 layer 2 layer 3 layer 27 / 2
Results 20 15 Time (s) 10 5 0 no app. 1 layer 2 layer 3 layer 28 / 2
Results 80 60 time (s) 40 no Appr. 20 1 layer 2 layer 3 layer 0 0 0 . 2 0 . 4 0 . 6 0 . 8 1 number of configurations · 10 6 29 / 2
Results 20 15 time (s) 10 5 no Appr. 1 layer 2 layer 0 3 layer 0 0 . 5 1 1 . 5 2 2 . 5 3 number of configurations · 10 5 30 / 2
Results 20 15 time (s) 10 5 no Appr. 1 layer 2 layer 0 3 layer 0 0 . 5 1 1 . 5 2 2 . 5 3 number of configurations · 10 5 31 / 2
Results 20 15 time (s) 10 5 no Appr. 1 layer 2 layer 0 3 layer 0 0 . 5 1 1 . 5 2 2 . 5 3 number of configurations · 10 5 32 / 2
References [1] H˚ akan Burden and Peter Ljungl¨ of. “Parsing Linear Context-Free Rewriting Systems”. In: Proceedings of the Ninth IWPT (2005), pp. 11–17. [2] Eugene Charniak et al. “Multilevel coarse-to-fine PCFG parsing”. In: Proceedings of the HLT-NACL. 2006. [3] Andreas van Cranenburgh. “Efficient Parsing with Linear Context-Free Rewriting Systems”. In: Proceedings of the 13th Conference of the EACL. (2012), pp. 460–470. [4] Tobias Denkinger. “Approximation of Weighted Automata with Storage”. In: Proceedings Eighth International Symposium on GandALF . 2017, pp. 91–105. [5] Mark-Jan Nederhof. “Regular approximations of CFLs: A grammatical view”. In: Proceedings of the IWPT (1997), pp. 159–170. 33 / 2
Stateless Push-Down Automata 33 / 2
Stateless Push-Down Automata replace( a 1 a 2 a 3 . . . a k , b 1 b 2 b 3 . . . b l ) � �� � � �� � current symbols new symbols 33 / 2
Stateless Push-Down Automata replace( a 1 a 2 a 3 . . . a k , b 1 b 2 b 3 . . . b l ) � �� � � �� � current symbols new symbols pop iff top = a 1 push ( b l ) pop iff top = a 2 push ( b 2 ) pop iff top = a k push ( b 1 ) 33 / 2
Recommend
More recommend