1 / 25

Parsen natürlicher Sprache

Parsen natürlicher Sprache. Wo steht Englisch in der Chomsky-Hierarchie?. Motivation. Informationsextraktion Automatische Übersetzung Vorstufe zum „richtigen“ Turing-Test. Überblick. Kontextfreie Grammatik (CFG). Link- Grammatik. Probabilistische CFG (PCFG). Probabilistische Links.

thor
Télécharger la présentation

Parsen natürlicher Sprache

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Parsen natürlicher Sprache Wo steht Englisch in der Chomsky-Hierarchie? Leo Kof. Parsen natürlicher Sprache

  2. Motivation • Informationsextraktion • Automatische Übersetzung • Vorstufe zum „richtigen“ Turing-Test Leo Kof. Parsen natürlicher Sprache

  3. Überblick Kontextfreie Grammatik (CFG) Link- Grammatik Probabilistische CFG (PCFG) Probabilistische Links Head-lexicalized PCFG Collins- Parser Leo Kof. Parsen natürlicher Sprache

  4. Metrik für Parserqualität Penn Treebank: • Basiert auf Newsartikeln aus Wall-Street-Journal • Per Hand geparste Sätze mit bis zu >100 Wörtern • Aufgeteilt in mehrere Sektionen à ca. 2000 Sätze Leo Kof. Parsen natürlicher Sprache

  5. Überblick Kontextfreie Grammatik (CFG) Link- Grammatik Probabilistische CFG (PCFG) Probabilistische Links Head-lexicalized PCFG Collins- Parser Leo Kof. Parsen natürlicher Sprache

  6. S  NP VP NP  DT NN VP  Verb NP Verb = be, do, like, talk, ... NN = ... S = Sentence NP = Noun Phrase VP = Verb Phrase DT = Determiner NN = Noun Kontextfreie Grammatik Leo Kof. Parsen natürlicher Sprache

  7. Problem 1: Postscript language Lösung 1: NN  NN NN Problem 2: Postscript language input file Lösung 2: ??? CFG, Probleme Leo Kof. Parsen natürlicher Sprache

  8. Überblick Kontextfreie Grammatik (CFG) Link- Grammatik Probabilistische CFG (PCFG) Probabilistische Links Head-lexicalized PCFG Collins- Parser Leo Kof. Parsen natürlicher Sprache

  9. Probabilistische CFG • Grundidee: jede Regel wird mit Wahrscheinlichkeit versehen • Aufgabe des Parsers: finde den Baum mit maximaler Wahrscheinlichkeit • Abschätzung der Wahrscheinlichkeiten:Im Trainingssatz angewendete Regeln nachzählen • Problem: Postscript language input file Leo Kof. Parsen natürlicher Sprache

  10. Überblick Kontextfreie Grammatik (CFG) Link- Grammatik Probabilistische CFG (PCFG) Probabilistische Links Head-lexicalized PCFG Collins- Parser Leo Kof. Parsen natürlicher Sprache

  11. Head-lexicalized PCFG • Grundidee: Für jede Regel wird ein Element (lexical head) ausgezeichnet • S NP VPNP  DT NNVP  Verb NP Leo Kof. Parsen natürlicher Sprache

  12. Head-lexicalized PCFG S / is NP / tree VP / is DT / this NN / tree Verb / is NP / example DT / an NN / example This tree is an example Leo Kof. Parsen natürlicher Sprache

  13. HPCGF, Probabilismus Wahrscheinlichkeiten:P(category(root(T)))P(head(root(T))|category(root(T)))P(head(n)|category(n),category(parent(n)), head(parent(n))P(<word(n)>|cat(n), head(n)) Erste Wahrscheinlichkeitsabschätzung:In Trainingsdaten Häufigkeiten nachzählen Leo Kof. Parsen natürlicher Sprache

  14. HPCFG, Sparse Data Problem • Abschätzung z. B. durchUnabhängigkeitsannahmen:Z.B.P(<word>|cat(n), head(n)) =P(<word>)/P(cat(n),head(n)) • Es gibt auch andere Verfahren • Generell: komplizierte Geschichte Leo Kof. Parsen natürlicher Sprache

  15. Überblick Kontextfreie Grammatik (CFG) Link- Grammatik Probabilistische CFG (PCFG) Probabilistische Links Head-lexicalized PCFG Collins- Parser Leo Kof. Parsen natürlicher Sprache

  16. Link-Grammatik Leo Kof. Parsen natürlicher Sprache

  17. Link-Grammatik Der Satz ist geparst, wenn es keine freien Links mehr gibt: Leo Kof. Parsen natürlicher Sprache

  18. Überblick Kontextfreie Grammatik (CFG) Link- Grammatik Probabilistische CFG (PCFG) Probabilistische Links Head-lexicalized PCFG Collins- Parser Leo Kof. Parsen natürlicher Sprache

  19. Probabilistische Links (1/2) • Vereinfachung: • Reduktion auf basis-NPs • Beschränkung von Links auf reduzierte Sätze • Weitere Vereinfachungen: • Part-of-Speech Tagging als Preprocessing • Reduktion von basis-NPs auf head words Leo Kof. Parsen natürlicher Sprache

  20. Basis-NPs • Beim Training: Markierung der Zwischenräume als:(NP-)Start, Continuation, End, Between, Null:S This C sentence E is S an C example E . • Beim Parsen: Einbeziehung der Markierungen ins Wahrscheinlichkeitsmodell Leo Kof. Parsen natürlicher Sprache

  21. Probabilistische Links (2/2) • Wahrscheinlichkeiten:P(ArrowFrom(modifier, head, Relation)) • Wahrscheinlichkeitsabschätzung:Count(<word1, Tag1>, <word2, Tag2>)Count(Relation|<word1, Tag1>, <word2, Tag2>) Daraus lässt sich P(ArrowFrom(...)) ausrechnen Leo Kof. Parsen natürlicher Sprache

  22. Überblick Kontextfreie Grammatik (CFG) Link- Grammatik Probabilistische CFG (PCFG) Probabilistische Links Head-lexicalized PCFG Collins- Parser Leo Kof. Parsen natürlicher Sprache

  23. Collins-Parser • Head-lexicalized PCFG • Kompliziertes Wahrscheinlichkeitsmodell:Wahrscheinlichkeiten für • Grammatikregeln • Links • Distanzen zwischen Wörtern • etc. • Komplizierte Ausrechnung von Einzelwahrscheinlichkeiten Leo Kof. Parsen natürlicher Sprache

  24. Parserqualität: Trefferquoten Kontextfreie Grammatik (CFG) Link- Grammatik Probabilistische CFG (PCFG) Probabilistische Links ca. 70% ca. 85% Head-lexicalized PCFG ca. 75% Collins- Parser bis 89% Leo Kof. Parsen natürlicher Sprache

  25. Zusammenfassung • Es werden immer bessere Ergebnisse erzielt. Preis: Modellkomplexität • Es gibt immer noch keinen Parser mit 100%-Trefferquote • Portierung für andere Sprachen oft schwierig Leo Kof. Parsen natürlicher Sprache

More Related