Post on 17-Sep-2018
Aktuelle Themen der Angewandten Informatik
Semantische Technologien (M-TANI)
Christian Chiarcos Angewandte Computerlinguistik
chiarcos@informatik.uni-frankfurt.de 18./25. April 2013
Semantische Technologien
• Organisatorisches
• Semantik und natürliche Sprache
– Logische Grundlagen
• Technologische Grundlagen
– Natural Language Processing
– Maschinelles Lernen und statistische Verfahren
– Linked Data und Semantic Web
Organisatorisches
• Leistungsnachweis – kontinuierliche und aktive Teilnahme (unbenotet) – 3 Hausaufgaben
1) Annotation von Wortsinnen 2) Koreferenzannotation
Beide werden nach Vollständigkeit und Inter-Annotator-Agreement bewertet
3) Modellierung in OWL und RDF Wird nicht direkt benotet, sondern wird in der mündlichen Prüfung besprochen
– mündliche Prüfung • Präsentation der dritten Hausaufgabe • Prüfungsgespräch zu den Themen der Vorlesung
Organisatorisches
• Leistungsnachweis
– kontinuierliche und aktive Teilnahme (unbenotet)
– 3 Hausaufgaben
– mündliche Prüfung
• Webseite
– http://acoli.cs.uni-frankfurt.de,
Menüpunkt „Lehre“
Grundlagenliteratur: Überblick
• Jurafsky & Martin (2009), Speech and Language Processing, Prentice Hall.
– derzeit beste Einführung auf dem Markt
• Carstensen et al. (2010), Computerlinguistik und Sprachtechnologie, Spektrum, Heidelberg
– deutschsprachig
Grundlagenliteratur: Technologie
Statistische Verfahren – Manning & Schütze (2000), Foundations of Statistical
Natural Language Processing, MIT Press
Logische Grundlagen – Blackburn & Bos (2005), Representation and Inference
for Natural Language, CSLI, Stanford
Semantic-Web-Formalismen – Hitzler et al. (2008), Semantic Web. Grundlagen.
Springer, Heidelberg.
Themenüberblick
• Grundlagen und Motivation
– Logik: Formale Grundlagen
– Linguistik: Natural Language Processing
– Mathematik: Maschinelles Lernen und Statistik
– Semantic Web: Repräsentationsformalismen
Themenüberblick
• Grundlagen und Motivation
• Wortbedeutung
– Wortarten
– Wortsinne: WordNet
– wissensbasierte Word Sense Disambiguation
– distributionelle Verfahren
Themenüberblick
• Grundlagen und Motivation
• Wortbedeutung
• Satzbedeutung
– Grammatik: Konstituentengrammatik
– Grammatik: Dependenzgrammatik
– Semantische Rollen: FrameNet
– Semantic Role Labeling
Themenüberblick
• Grundlagen und Motivation
• Wortbedeutung
• Satzbedeutung
• Anaphernresolution
– Referenzsemantik: FileCards
– Pronominale Anaphernresolution
– Nominale Anaphernresolution
Themenüberblick
• Grundlagen und Motivation
• Wortbedeutung
• Satzbedeutung
• Anaphernresolution
• Information Extraction
– Patternbasierte IE
– Open-Domain-IE
– Relation Extraction
Themenüberblick
• Grundlagen und Motivation
• Wortbedeutung
• Satzbedeutung
• Anaphernresolution
• Information Extraction
• Inferenz – Deduktion mit WordNet-Information
– Induktion von Argumentinformation
– Abduktion für Anaphernresolution
Themenüberblick
• Grundlagen und Motivation
• Wortbedeutung
• Satzbedeutung
• Anaphernresolution
• Information Extraction
• Inferenz
• Diskursstruktur – Diskurssegmentierung
– Diskursrelationen
Themenüberblick
• Grundlagen und Motivation
• Wortbedeutung
• Satzbedeutung
• Anaphernresolution
• Information Extraction
• Inferenz
• Diskursstruktur
• Ausgewählte Anwendungen für Endnutzer – Textzusammenfassung
– Question Answering
Grundlagen und Motivation
• Informationstechnologie beruht heute vor allem auf der Verwendung einheitlicher Repräsentationsformen
– W3C- und ISO-Standards
– Uniform Resource Identifiers (URIs)
– String-basierter Information Retrieval
• Klassische Informationsverarbeitung beruht daher i.d.R. auf String Matching
Grundlagen und Motivation
• Menschliche Informationsverarbeitung beruht auf der komplexen Interaktion unterschiedlicher Repräsentationen
Bedeutung „Gedanke“
Symbol „Wort“
Referent „Objekt “
symbolisiert referiert auf
repräsentiert
Richards & Ogden (1923), The Meaning of Meaning. A Study of the Influence of Language upon Thought and of the Science of Symbolism. Harcourt Brace Jovanovich, New York & London.
Grundlagen und Motivation
• Menschliche Informationsverarbeitung beruht auf der komplexen Interaktion unterschiedlicher Repräsentationen
Bedeutung „Gedanke“
Symbol „Wort“
Referent „Objekt “
symbolisiert referiert auf
repräsentiert
Sprache
geistige Repräsentation
Gegenstand in der Welt
Grundlagen und Motivation
• Menschliche Informationsverarbeitung beruht auf der komplexen Interaktion unterschiedlicher Repräsentationen
Bedeutung „Gedanke“
symbolisiert referiert auf
repräsentiert
Sprache
geistige Repräsentation
Gegenstand in der Welt
SEMANTIK
STRING- VERARBEITUNG
Symbol „Wort“ SPATIO-
TEMPORAL REASONING
Referent „Objekt “
Grundlagen und Motivation
• Informationstechnologie: Verwendung einheitlicher Repräsentationsformen
• Menschliche Informationsverarbeitung: komplexe Interaktion unterschiedlicher Repräsentationen
• Semantische Technologien beschäftigen sich damit, diese Kluft zu schließen
Grundlagen und Motivation
• User – „Erzähl mir was über Nutzvieh in der Eisenzeit !“
• Zieldokument – „Bei den Kelten und Germanen genoß das Schwein
große Wertschätzung sowohl als Haustier und Nahrungsquelle, als auch in Mythos und Glauben. Hausschweine waren mit etwa 30% an zweiter Stelle der Haustiere.“*
• Missing Links – „Eisenzeit“ <-> „Kelten und Germanen“ – „Nutzvieh“ <-> „Haustier“/“Hausschwein“
* http://www.schweinestammtisch.de/interessantes/historisches.html
Anwendungen
• Information Retrieval
• Maschinelle Übersetzung
• Textzusammenfassung
• Machine Reading
• Question-Answering
– Watson on Jeopardy!
• http://www.youtube.com/watch?v=WFR3lOm_xhE
• http://www.youtube.com/watch?v=A-JkZnA5f8M
Grundlagen: Formale Semantik
• Sprache ≠ formale Semantik (Frege, 1898)
• Grundannahmen – Satzbedeutung: Wahrheitsbedingungen dieses Satzes
-> Aussagenlogik
– Kompositionalitätsprinzip: Die Bedeutung eines komplexen Ausdrucks ist eine Funktion der Bedeutungen seiner Teile und der Art ihrer Kombination -> Prädikatenlogik
– Interpretationsfunktion bildet natürliche Sprache auf logische Form ab • für jedes k ist [[k]] dessen Bedeutung (denotation)
Interpretation
• Grundlage: syntaktische Repräsentation
I have a car =
[ [I]SBJ [haveV [aD carN ]OBJ ]VP ]S S
NP (SBJ)
I
VP
V
have
NP (OBJ)
D N
a car
[[ [ [I]SBJ [haveV [aD carN ]OBJ ]VP ]S ]]
= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, [ 𝐼 ] ∧ [ 𝑎 𝑐𝑎𝑟 ]
lexicon:
[[ iSBJ [ haveV j ] ]] = ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, [ 𝑖 ] ∧ [ 𝑗 ]
[[ [ [I]SBJ [haveV [aD carN ]OBJ ]VP ]S ]]
= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, [ 𝐼 ] ∧ [ 𝑎 𝑐𝑎𝑟 ]
= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′ ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝑎 𝑐𝑎𝑟 )
lexicon:
[[ I ]] = Speaker‘
∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ [[ iOBJ ]] = ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, [ 𝑖 ] )
[[ [ [I]SBJ [haveV [aD carN ]OBJ ]VP ]S ]]
= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, [ 𝐼 ] ∧ [ 𝑎 𝑐𝑎𝑟 ]
= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′ ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝑎 𝑐𝑎𝑟 )
= ∃𝑒, 𝑦. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′ ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝑐𝑎𝑟 (𝑦))
lexicon:
[[ a iN]] = ∃𝑦.[[ i ]](y)
[[ [ [I]SBJ [haveV [aD carN ]OBJ ]VP ]S ]]
= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, [ 𝐼 ] ∧ [ 𝑎 𝑐𝑎𝑟 ]
= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′ ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝑎 𝑐𝑎𝑟 )
= ∃𝑒, 𝑦. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′ ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝑐𝑎𝑟 (𝑦)) = ∃𝑒, 𝑦. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′ ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝐶𝑎𝑟′(𝑦))
lexicon: [[ car ]] = Car‘ Semantische Technologien beschäftigen sich damit, die Abbildungsfunktion [[.]] zu operationalisieren.
Andere Darstellungsweisen
∃𝑒, 𝑦. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′
∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝐶𝑎𝑟′ (𝑦))
Having
Haver: Speaker
HadThing: Car Having
Haver
Speaker
Had-Thing
Car
Prädikatenlogik
Feature Structures
Frames
Grundlagen und Motivation
• Grundlagen und Motivation
– Logik: Formale Grundlagen
– Linguistik: Natural Language Processing
– Mathematik: Maschinelles Lernen und Statistik
– Semantic Web: Repräsentationsformalismen
Natural Language Processing (NLP)
• oder „Maschinelle Sprachverarbeitung“
• Analyse, Manipulation und Generierung von Sprachdaten (i.d.R. Text) – Analyse: z.B. Parsing, Information Extraction
– Manipulation: z.B. Maschinelle Übersetzung
– Generierung: z.B. im Dialogmanagement
• NLP Pipeline – Serie von Verarbeitungsmodulen, i.d.R. aus dem
Bereich der Analyse
NLP Pipeline
• Bevor Text inhaltlich erschlossen werden kann, muss er zunächst strukturell (grammatisch) analysiert werden
• Das setzt wiederum mehrere Normalisierungsschritte voraus
• Z.B. als standardisierte Komponenten in NLP-Pipeline-Architekturen wie UIMA – Unstructured Information Management
Infrastructure, http://uima.apache.org/
NLP Pipeline: HTML
• Ein Text aus dem WWW http://www.voanews.com/content/article/1642078.html
… <div class="author"><span class="">Suzanne Presto</span></div> <p class="article_date"> April 15, 2013 </p> </div> <div id="ctl00_ctl00_cpAB_cp1_cbcContentBreak"> <div class="zoomMe"> High school students around the world have designed and built robots for a competition hosted by "FIRST," an organization formally known as "For Inspiration and Recognition of Science and Technology." <br /> <br /> The FIRST Robotics Competition Washington …
NLP Pipeline
0. Textextraktion und -normalisierung
– Boilerplate entfernen
• Textteile, die nicht zum Haupttext gehören
– Bevor ein Text verarbeitet wird, sollte alles, was nicht zum Text gehört, entfernt werden.
• sed s/‘<*^>+*>‘//g
– HTML entities auflösen
• sed s/‘ ‘/‘ ‘/g;
NLP Pipeline: Text
… <div class="author"><span class="">Suzanne Presto</span></div> <p class="article_date"> April 15, 2013 </p> </div> <div id="ctl00_ctl00_cpAB_cp1_cbcContentBreak"> <div class="zoomMe"> High school students around the world have designed and built robots for a competition hosted by "FIRST," an organization formally known as "For Inspiration and Recognition of Science and Technology." <br /> <br /> The FIRST Robotics Competition Washington …
April 15, 2013 High school students around the world have designed and built robots for a competition hosted by FIRST, an organization formally known as For Inspiration and Recognition of Science and Technology. The FIRST Robotics Competition Washington DC Regional, a qualifying event for the world championship in late April, had all the energy of a professional sporting event. Bleachers at the Walter E. Washington Convention Center were packed with cheering fans, many of whom wore the colors of their favorite teams. Mascots danced courtside, energizing the crowd. Team members in matching shirts high-fived after strong plays. But the teenage competitors were not on the playing field themselves. …
NLP Pipeline, beispielhaft
1. Sentence splitting
– Nach einer Interpunktion (!?.) wird ein Zeilenumbruch eingefügt, andere Zeilenumbrüche werden beseitigt.
• Problem: . nach Abkürzungen
– Lösung
• handgestrickte Heuristiken (sed s/\. ([A-Z])/.\n\1/g)
• spezialisierte Werkzeuge wie Splitta (http://code.google.com/p/splitta/)
April 15, 2013 High school students around the world have designed and built robots for a competition hosted by FIRST, an organization formally known as For Inspiration and Recognition of Science and Technology. The FIRST Robotics Competition Washington DC Regional, a qualifying event for the world championship in late April, had all the energy of a professional sporting event. Bleachers at the Walter E. Washington Convention Center were packed with cheering fans, many of whom wore the colors of their favorite teams. Mascots danced courtside, energizing the crowd. Team members in matching shirts high-fived after strong plays. But the teenage competitors were not on the playing field themselves. …
NLP Pipeline: Sentences (Splitta)
April 15, 2013 High school students around the world have designed and built robots for a competition hosted by FIRST, an organization formally known as For Inspiration and Recognition of Science and Technology. The FIRST Robotics Competition Washington DC Regional, a qualifying event for the world championship in late April, had all the energy of a professional sporting event. Bleachers at the Walter E. Washington Convention Center were packed with cheering fans, many of whom wore the colors of their favorite teams. Mascots danced courtside, energizing the crowd. Team members in matching shirts high-fived after strong plays. But the teenage competitors were not on the playing field themselves.
NLP Pipeline, beispielhaft
2. Tokenisierung
– Jedes Wort und jede Interpunktion werden durch Whitespaces abgetrennt
– Nachfolgende Werkzeuge setzen eine bestimmte Tokenisierung voraus
• bestehende Module verwenden
• z.B. StanfordTokenizer (http://nlp.stanford.edu/software/tokenizer.shtml)
April 15, 2013 High school students around the world have designed and built robots for a competition hosted by FIRST, an organization formally known as For Inspiration and Recognition of Science and Technology. The FIRST Robotics Competition Washington DC Regional, a qualifying event for the world championship in late April, had all the energy of a professional sporting event. Bleachers at the Walter E. Washington Convention Center were packed with cheering fans, many of whom wore the colors of their favorite teams. Mascots danced courtside, energizing the crowd. Team members in matching shirts high-fived after strong plays. But the teenage competitors were not on the playing field themselves.
NLP Pipeline: Tokenisierung
April 15 , 2013 High school students around the world have designed and built robots for a competition hosted by FIRST , an organization formally known as For Inspiration and Recognition of Science and Technology . The FIRST Robotics Competition Washington DC Regional , a qualifying event for the world championship in late April , had all the energy of a professional sporting event . Bleachers at the Walter E . Washington Convention Center were packed with cheering fans , many of whom wore the colors of their favorite teams . Mascots danced courtside , energizing the crowd . Team members in matching shirts high-fived after strong plays . But the teenage competitors were not on the playing field themselves . …
NLP Pipeline, beispielhaft
3. Part-of-Speech (POS) Tagging – flache morphosyntaktische Annotation
• Jedem Token wird eine Wortart zugewiesen – Substantiv, Verb, Adjektiv, Interpunktion usw.
• Zusätzlich ausgewählte morphologische Informationen – z.B. Finitheit, Numerus
• Beides zusammen wird in POS-Tags kodiert – z.B. NNS (common noun, plural)
– http://www.comp.leeds.ac.uk/ccalas/tagsets/upenn.html (Penn Tagset)
– z.B. Stanford POS Tagger (http://nlp.stanford.edu/software/tagger.shtml)
NLP Pipeline: POS Tagging
April 15 , 2013 High school students around the world have designed and built robots for a competition hosted by FIRST , an organization formally known as For Inspiration and Recognition of Science and Technology . The FIRST Robotics Competition Washington DC Regional , a qualifying event for the world championship in late April , had all the energy of a professional sporting event . Bleachers at the Walter E . Washington Convention Center were packed with cheering fans , many of whom wore the colors of their favorite teams . Mascots danced courtside , energizing the crowd . Team members in matching shirts high-fived after strong plays . But the teenage competitors were not on the playing field themselves . …
April NNP 15 CD , , 2013 CD High JJ school NN students NNS around IN the DT world NN have VBP …
NLP Pipeline, beispielhaft
4. Konstituenten-Parsing
– z.B. mittels Probabilistischer Kontextfreier Grammatiken (PCFGs)
– z.B. Stanford Parser (http://nlp.stanford.edu/software/lex-parser.shtml)
NLP Pipeline: Phrasenstruktur April NNP 15 CD , , 2013 CD High JJ school NN students NNS around IN the DT world NN have VBP …
(ROOT (S (NP-TMP (NNP April) (CD 15)) (, ,) (NP (NP (CD 2013) (JJ High) (NN school) (NNS students)) (PP (IN around) (NP (DT the) (NN world)))) (VP (VBP have) (VP (VBN designed) (CC and) (VBN built) (NP (NNS robots)) (PP (IN for) (NP (NP (DT a) (NN competition)) (VP (VBN hosted) (PP (IN by) (NP (NP (NNP FIRST)) (, ,) (NP (NP (DT an) (NN organization)) (VP (ADVP (RB formally)) (VBN known) (PP (IN as) (IN For) (NP (NP (NN Inspiration) (CC and) (NN Recognition)) (PP (IN of) (NP (NN Science) (CC and) (NN Technology)))))))))))))) (. .))) (ROOT (S (NP (NP (NP (DT The) (NNP FIRST) (NNPS Robotics) (NN Competition)) (NP (NNP Washington) (NNP DC) (NNP Regional))) (, ,) (NP (NP (DT a) (VBG qualifying) (NN event)) (PP (IN for) (NP (DT the) (NN world) (NN championship))) (PP (IN in) (NP (JJ late) (NNP April)))) (, ,)) (VP (VBD had) (NP (NP (PDT all) (DT the) (NN energy)) (PP (IN of) (NP (NP (DT a) (JJ professional)) (VP (VBG sporting) (NP (NN event))))))) (. .)))
NLP Pipeline, beispielhaft
5. Syntaktische Rollen
– Dependenzparsing
• im Stanford Parser aus den PCFG-Parses extrahiert
• eigenständige Implementierung möglich
NLP Pipeline: Syntaktische Rollen
(ROOT (S (NP-TMP (NNP April) (CD 15)) (, ,) (NP (NP (CD 2013) (JJ High) (NN school) (NNS students)) (PP (IN around) (NP (DT the) (NN world)))) (VP (VBP have) (VP (VBN designed) (CC and) (VBN built) (NP (NNS robots)) (PP (IN for) (NP (NP (DT a) (NN competition)) (VP (VBN hosted) (PP (IN by) (NP (NP (NNP FIRST)) (, ,) (NP (NP (DT an) (NN organization)) (VP (ADVP (RB formally)) (VBN known) (PP (IN as) (IN For) (NP (NP (NN Inspiration) (CC and) (NN Recognition)) (PP (IN of) (NP (NN Science) (CC and) (NN Technology)))))))))))))) (. .))) (ROOT (S (NP (NP (NP (DT The) (NNP FIRST) (NNPS Robotics) (NN Competition)) (NP (NNP Washington) (NNP DC) (NNP Regional))) (, ,) (NP (NP (DT a) (VBG qualifying) (NN event)) (PP (IN for) (NP (DT the) (NN world) (NN championship))) (PP (IN in) (NP (JJ late) (NNP April)))) (, ,)) (VP (VBD had) (NP (NP (PDT all) (DT the) (NN energy)) (PP (IN of) (NP (NP (DT a) (JJ professional)) (VP (VBG sporting) (NP (NN event))))))) (. .)))
1 April NNP 12 tmod 2 15 CD 1 num 3 , , 4 nn 4 2013 CD 7 num 5 High JJ 7 amod 6 school NN 7 nn 7 students NNS 12 nsubj 8 around IN 7 prep 9 the DT 10 det 10 world NN 8 pobj 11 have VBP 12 aux 12 designed VBN 0 root 13 and CC 12 cc 14 …
NLP Pipeline, beispielhaft
Rohdaten, z.B. HTML, PDF, …
Textextraktion und -normalisierung
Sentence Splitting
Dependency Labeling
Tokenisierung
POS Tagging
Parsing
=> Einzelsätze
=> Einzelworte
=> Morphosyntax
=> Konstituenten- struktur
=> funktionale Relationen
weitere Verarbeitungsstufen, z.B. für semantische Annotationen
=> Textdaten in konsistenter Kodierung
Grundlagen und Motivation
• Grundlagen und Motivation
– Logik: Formale Grundlagen
– Linguistik: Natural Language Processing
– Mathematik: Maschinelles Lernen und Statistik
– Semantic Web: Repräsentationsformalismen
Maschinelles Lernen und Statistik
• Viele NLP-Tools basieren auf statistischen Verfahren
– Splitta: Naive Bayes
– POS Tagger: Hidden Markov Modelle
– Stanford Parser: Probabilistic Context-Free Grammars
Maschinelles Lernen und Statistik
• Viele der vorgenannten NLP-Tools basieren auf statistischen Verfahren
• Andere beruhen auf maschinellem Lernen
– Splitta: SVM
– Senna (http://ml.nec-labs.com/senna/): Deep Belief Networks
Maschinelles Lernen und Statistik
• Viele der vorgenannten NLP-Tools basieren auf statistischen Verfahren
• Andere beruhen auf maschinellem Lernen
• Eine Einführung in beides würde hier zu weit führen
– Wir konzentrieren uns auf Anwendung und setzen existierende Statistik- und ML-Pakete voraus
Maschinelles Lernen und Statistik
• Im wesentlichen sind vier Anwendungsklassen zu unterscheiden
– Klassifikation
• überwachtes Lernen – z.B. Supportvektormaschinen (SVMs) oder
Entscheidungsbäume (C 4.5)
Maschinelles Lernen und Statistik
• Im wesentlichen sind vier Anwendungsklassen zu unterscheiden
– Klassifikation
– Clustering
• unüberwachtes Lernen durch Gruppierung „benachbarter“ Datenpunkte – z.B. k-Means
Maschinelles Lernen und Statistik
• Im wesentlichen sind vier Anwendungsklassen zu unterscheiden
– Klassifikation
– Clustering
– Prozessmodellierung
• Modellierung von Übergangswahrscheinlichkeiten – z.B. Hidden Markov Models
Maschinelles Lernen und Statistik
• Im wesentlichen sind vier Anwendungsklassen zu unterscheiden
– Klassifikation
– Clustering
– Prozessmodellierung
– Funktionsapproximation
• Abbildung eines Vektors von Eingabewerten auf einen Vektor von Ausgabewerten, überwacht gelernt – z.B. mit neuronalen Netzen
Maschinelles Lernen und Statistik
• Standardbibliotheken umfassen
– WEKA (http://www.cs.waikato.ac.nz/ml/weka/)
• Clustering- und Klassifikationsverfahren
– libSVM (http://www.csie.ntu.edu.tw/~cjlin/libsvm/)
• Supportvektormaschinen
Maschinelles Lernen und Statistik
• Standardbibliotheken umfassen
– NLTK (http://nltk.org/)
• Natural Language Toolkit, enthält u.a. HMM- und PCFG-Implementierungen
– Theano (http://deeplearning.net/software/theano/)
• Bibliothek zur effizienten Verarbeitung mehrdimensionaler Arrays, geeignet u.a. zur Entwicklung von Neuronalen Netzen
Grundlagen und Motivation
• Grundlagen und Motivation
– Formale Grundlagen
– Natural Language Processing
– Maschinelles Lernen und Statistik
– Repräsentationsformalismen
• XML
• RDF
• Semantic Web
Repräsentationsformalismen
• Traditionell sind Spalten- und Listenformate üblich
(ROOT (S (NP-TMP (NNP April) (CD 15)) (, ,) (NP (NP (CD 2013) (JJ High) (NN school) (NNS students)) (PP (IN around) (NP (DT the) (NN world)))) (VP (VBP have) (VP (VBN designed) (CC and) (VBN built) (NP (NNS robots)) (PP (IN for) (NP (NP (DT a) (NN competition)) (VP (VBN hosted) (PP (IN by) (NP (NP (NNP FIRST)) (, ,) (NP (NP (DT an) (NN organization)) (VP (ADVP (RB formally)) (VBN known) (PP (IN as) (IN For) (NP (NP (NN Inspiration) (CC and) (NN Recognition)) (PP (IN of) (NP (NN Science) (CC and) (NN Technology)))))))))))))) (. .))) (ROOT (S (NP (NP (NP (DT The) (NNP FIRST) (NNPS Robotics) (NN Competition)) (NP (NNP Washington) (NNP DC) (NNP Regional))) (, ,) (NP (NP (DT a) (VBG qualifying) (NN event)) (PP (IN for) (NP (DT the) (NN world) (NN championship))) (PP (IN in) (NP (JJ late) (NNP April)))) (, ,)) (VP (VBD had) (NP (NP (PDT all) (DT the) (NN energy)) (PP (IN of) (NP (NP (DT a) (JJ professional)) (VP (VBG sporting) (NP (NN event))))))) (. .)))
1 April NNP 12 tmod 2 15 CD 1 num 3 , , 4 nn 4 2013 CD 7 num 5 High JJ 7 amod 6 school NN 7 nn 7 students NNS 12 nsubj 8 around IN 7 prep 9 the DT 10 det 10 world NN 8 pobj 11 have VBP 12 aux 12 designed VBN 0 root 13 and CC 12 cc 14 …
Repräsentationsformalismen
• Traditionell sind in der NLP Spalten- und Listenformate üblich
• Wo komplexe Analysen
zusammentreffen,
wird XML verwendet
– z.B. Stanford CoreNLP
(http://nlp.stanford.edu/
software/corenlp.shtml)
XML
• eXtensible Markup Language
• Markup vom Inhalt getrennt
– eingeschlossen in <…>
– öffnendes Element <elementName>
– schließendes Element </elementName>
– Elemente können Attribute tragen
• <element id=“myid_23231“> … </element>
XML
• Dokumentstruktur durch eine kontextfreie Grammatik beschrieben – es gibt einen eindeutigen „Wurzelknoten“
– Baum
• Validierung – DTD, XSchema, usw.
• Namespaces – vgl. owl:… in obigen Beispielen
– Deklaration durch „Weiterleitung“ zum definierenden Dokument (URI)
Generische Repräsentationsformalismen
• XML formalisiert Bäume als Datenstruktur
• Daten mit nicht-hierarchischer Struktur oder mehreren Bäumen sind schwer mit XML verarbeitbar
– Optimierungen für Baumstrukturen in Anfragesprachen und Datenbankimplementierungen können nicht genutzt werden
Generische Repräsentationsformalismen
• Gerichtete Graphen als Datenstruktur
– unabhängig vorgeschlagen für Lexika, linguistische Annotationen und Sammlungen von Metadaten
– Lexika („Feature Structures“)
• Lexicon Markup Framework (LMF)
– Annotationen („Annotation Graphs“)
• Linguistic Annotation Framework (LAF)
– Metadaten
• Resource Description Framework (RDF)
Resource Description Framework RDF
• W3C Standard
• ursprünglich entwickelt zur Modellierung von Bibliotheksbeständen, sowohl analog als auch digital
• sehr generische Datenstruktur (gerichtete Graphen), daher auf andere Anwendungsszenarien übertragen – eine der Grundsäulen des Semantic Web
– Annotations- und Lexikon-Formate
können nach RDF gewandelt werden • Grundlage für deren Verknüpfung