63
Aktuelle Themen der Angewandten Informatik Semantische Technologien (M-TANI) Christian Chiarcos Angewandte Computerlinguistik [email protected] 18./25. April 2013

Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Embed Size (px)

Citation preview

Page 1: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Aktuelle Themen der Angewandten Informatik

Semantische Technologien (M-TANI)

Christian Chiarcos Angewandte Computerlinguistik

[email protected] 18./25. April 2013

Page 2: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 3: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 4: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Organisatorisches

• Leistungsnachweis

– kontinuierliche und aktive Teilnahme (unbenotet)

– 3 Hausaufgaben

– mündliche Prüfung

• Webseite

– http://acoli.cs.uni-frankfurt.de,

Menüpunkt „Lehre“

Page 5: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 6: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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.

Page 7: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Themenüberblick

• Grundlagen und Motivation

– Logik: Formale Grundlagen

– Linguistik: Natural Language Processing

– Mathematik: Maschinelles Lernen und Statistik

– Semantic Web: Repräsentationsformalismen

Page 8: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Themenüberblick

• Grundlagen und Motivation

• Wortbedeutung

– Wortarten

– Wortsinne: WordNet

– wissensbasierte Word Sense Disambiguation

– distributionelle Verfahren

Page 9: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Themenüberblick

• Grundlagen und Motivation

• Wortbedeutung

• Satzbedeutung

– Grammatik: Konstituentengrammatik

– Grammatik: Dependenzgrammatik

– Semantische Rollen: FrameNet

– Semantic Role Labeling

Page 10: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Themenüberblick

• Grundlagen und Motivation

• Wortbedeutung

• Satzbedeutung

• Anaphernresolution

– Referenzsemantik: FileCards

– Pronominale Anaphernresolution

– Nominale Anaphernresolution

Page 11: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Themenüberblick

• Grundlagen und Motivation

• Wortbedeutung

• Satzbedeutung

• Anaphernresolution

• Information Extraction

– Patternbasierte IE

– Open-Domain-IE

– Relation Extraction

Page 12: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Themenüberblick

• Grundlagen und Motivation

• Wortbedeutung

• Satzbedeutung

• Anaphernresolution

• Information Extraction

• Inferenz – Deduktion mit WordNet-Information

– Induktion von Argumentinformation

– Abduktion für Anaphernresolution

Page 13: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Themenüberblick

• Grundlagen und Motivation

• Wortbedeutung

• Satzbedeutung

• Anaphernresolution

• Information Extraction

• Inferenz

• Diskursstruktur – Diskurssegmentierung

– Diskursrelationen

Page 14: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Themenüberblick

• Grundlagen und Motivation

• Wortbedeutung

• Satzbedeutung

• Anaphernresolution

• Information Extraction

• Inferenz

• Diskursstruktur

• Ausgewählte Anwendungen für Endnutzer – Textzusammenfassung

– Question Answering

Page 15: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 16: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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.

Page 17: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 18: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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 “

Page 19: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 20: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 21: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 22: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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)

Page 23: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 24: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

[[ [ [I]SBJ [haveV [aD carN ]OBJ ]VP ]S ]]

= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, [ 𝐼 ] ∧ [ 𝑎 𝑐𝑎𝑟 ]

lexicon:

[[ iSBJ [ haveV j ] ]] = ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, [ 𝑖 ] ∧ [ 𝑗 ]

Page 25: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

[[ [ [I]SBJ [haveV [aD carN ]OBJ ]VP ]S ]]

= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, [ 𝐼 ] ∧ [ 𝑎 𝑐𝑎𝑟 ]

= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′ ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝑎 𝑐𝑎𝑟 )

lexicon:

[[ I ]] = Speaker‘

∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ [[ iOBJ ]] = ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, [ 𝑖 ] )

Page 26: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

[[ [ [I]SBJ [haveV [aD carN ]OBJ ]VP ]S ]]

= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, [ 𝐼 ] ∧ [ 𝑎 𝑐𝑎𝑟 ]

= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′ ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝑎 𝑐𝑎𝑟 )

= ∃𝑒, 𝑦. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′ ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝑐𝑎𝑟 (𝑦))

lexicon:

[[ a iN]] = ∃𝑦.[[ i ]](y)

Page 27: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

[[ [ [I]SBJ [haveV [aD carN ]OBJ ]VP ]S ]]

= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, [ 𝐼 ] ∧ [ 𝑎 𝑐𝑎𝑟 ]

= ∃𝑒. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′ ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝑎 𝑐𝑎𝑟 )

= ∃𝑒, 𝑦. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′ ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝑐𝑎𝑟 (𝑦)) = ∃𝑒, 𝑦. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′ ∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝐶𝑎𝑟′(𝑦))

lexicon: [[ car ]] = Car‘ Semantische Technologien beschäftigen sich damit, die Abbildungsfunktion [[.]] zu operationalisieren.

Page 28: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Andere Darstellungsweisen

∃𝑒, 𝑦. 𝐻𝑎𝑣𝑖𝑛𝑔′ 𝑒 ∧ 𝐻𝑎𝑣𝑒𝑟′ 𝑒, 𝑆𝑝𝑒𝑎𝑘𝑒𝑟′

∧ 𝐻𝑎𝑑𝑇ℎ𝑖𝑛𝑔′(𝑒, 𝐶𝑎𝑟′ (𝑦))

Having

Haver: Speaker

HadThing: Car Having

Haver

Speaker

Had-Thing

Car

Prädikatenlogik

Feature Structures

Frames

Page 29: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Grundlagen und Motivation

• Grundlagen und Motivation

– Logik: Formale Grundlagen

– Linguistik: Natural Language Processing

– Mathematik: Maschinelles Lernen und Statistik

– Semantic Web: Repräsentationsformalismen

Page 30: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 31: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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/

Page 32: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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 &quot;FIRST,&quot; an organization formally known as &quot;For Inspiration and Recognition of Science and Technology.&quot; &nbsp;<br /> <br /> The FIRST Robotics Competition Washington …

Page 33: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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/‘&nbsp;‘/‘ ‘/g;

Page 34: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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 &quot;FIRST,&quot; an organization formally known as &quot;For Inspiration and Recognition of Science and Technology.&quot; &nbsp;<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. …

Page 35: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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/)

Page 36: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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.

Page 37: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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)

Page 38: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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 . …

Page 39: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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)

Page 40: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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 …

Page 41: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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)

Page 42: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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))))))) (. .)))

Page 43: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

NLP Pipeline, beispielhaft

5. Syntaktische Rollen

– Dependenzparsing

• im Stanford Parser aus den PCFG-Parses extrahiert

• eigenständige Implementierung möglich

Page 44: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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 …

Page 45: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 46: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Grundlagen und Motivation

• Grundlagen und Motivation

– Logik: Formale Grundlagen

– Linguistik: Natural Language Processing

– Mathematik: Maschinelles Lernen und Statistik

– Semantic Web: Repräsentationsformalismen

Page 47: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 48: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 49: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 50: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Maschinelles Lernen und Statistik

• Im wesentlichen sind vier Anwendungsklassen zu unterscheiden

– Klassifikation

• überwachtes Lernen – z.B. Supportvektormaschinen (SVMs) oder

Entscheidungsbäume (C 4.5)

Page 51: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Maschinelles Lernen und Statistik

• Im wesentlichen sind vier Anwendungsklassen zu unterscheiden

– Klassifikation

– Clustering

• unüberwachtes Lernen durch Gruppierung „benachbarter“ Datenpunkte – z.B. k-Means

Page 52: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Maschinelles Lernen und Statistik

• Im wesentlichen sind vier Anwendungsklassen zu unterscheiden

– Klassifikation

– Clustering

– Prozessmodellierung

• Modellierung von Übergangswahrscheinlichkeiten – z.B. Hidden Markov Models

Page 53: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 54: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 55: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 56: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

Grundlagen und Motivation

• Grundlagen und Motivation

– Formale Grundlagen

– Natural Language Processing

– Maschinelles Lernen und Statistik

– Repräsentationsformalismen

• XML

• RDF

• Semantic Web

Page 57: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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 …

Page 58: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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)

Page 59: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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>

Page 60: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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)

Page 61: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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

Page 62: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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)

Page 63: Aktuelle Themen der Angewandten Informatik Semantische ...acoli.cs.uni-frankfurt.de/courses/mtani-2013-04-25-slides.pdf · Semantische Technologien •Organisatorisches •Semantik

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