Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand |...

21
Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter / Prover9 Dennis Leroy Wigand | Gereon Goetze | Sebastian Meyer zu Borgsen

Transcript of Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand |...

Page 1: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Resolution-based theorem proving

Otter / Prover9

Dennis Leroy Wigand | Gereon Goetze | Sebastian Meyer zu Borgsen

Page 2: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Aufgabenstellung Vorstellung von Prover9 Basis Aufgaben:

Father and Son ToBI the Robot Enlighted Room

Problematik der Modellierung von zeitlichen Abläufen

Neue Prover9 Version „Production Mode“ Highlighting und Aufbau einer Input-Datei

Zeitontology Aufgaben Manuel Neuer Ronaldo Gomez Variante 1 Ronaldo Gomez Variante 2

Resümee

Agenda

Page 3: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Einarbeiten ins Theorem Proving für First-order logics: Verwendung von Otter/Prover9 Implementierung kleiner Bsp. „John is the son of Peter.“

Entwicklung einer Ontologie für zeitliche Abläufe.

Erweiterung der Ontologie auf den Spezialfall „Fussball“.

Aufgabenstellung…ein kurzer Überblick

Page 4: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Theorembeweiser für Prädikatenlogik erster Stufe (von William McCune). Nachfolger vom OTTER (Organized Techniques Theorem proving and effective

Research) Theorem Prover. Unterscheidet nicht mehr zwischen Klauseln und Formeln. Versucht im Gegensatz zu Mace4 einen Beweis zu finden.

(Prover9 Beweis, Mace4 Gegenbeispiel)

Prover9

Page 5: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Resolution – Aufgabe I Aufbau

Father and Son

„John is the son of Peter.“ Resolution von „John is male.“

Aussage Konsistent Informativ

„John is male.“

„John is female.“

Page 6: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Resolution – Aufgabe I Proof

Father and Son

Page 7: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Resolution – Aufgabe II Aufbau ToBI

the Robot

„All robots enjoy life. ToBI is a robot.“

Aussage Konsistent Informativ

„ToBI enjoys life.“

„There is someonewho does not enjoy life.“

formulas(usable). % Relations% All robots enjoy life.all x (Robot(x) -> enjoysLife(x)).end_of_list.

formulas(assumptions). % Knowledge% ToBI is a robot.Robot(ToBI).end_of_list.

formulas(goals). % Goals% ToBI enjoys life.enjoysLife(ToBI).% There is someone% who does not enjoy life.exists x (-enjoysLife(x)).end_of_list.

Page 8: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Resolution – Aufgabe III Aufbau

Enlighted Room

„John entered the room. The electricity was not off.Either the electricity was off or he switched on the light.“

Aussage Konsistent Informativ

„John switched on the light.“

„The room was not dark anymore.“

% Either the electricity was off or he switched on the light.-(entered(y,x) & electricityOff(x)) <-> switchOnLight(y,x).switchOnLight(y,x) -> -dark(x). % Relation for not dark question.

entered(John,Room). % John entered the room.-electricityOff(Room). % The electricity was not off.

switchOnLight(John,Room). % John switched on the light.% -dark(Room). % The room was not dark anymore.

Page 9: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Problematik der Modellierung…First-order Logic und ihre Tücken

Spielminuten 90 Spielminuten Ordnung über die Zeit

Punktestände Vergleichbarkeit (2 Tore > 1) Ergebnis von Toren

Semantische Interpretation des gegebenen Satzes „early“ „header … canceled out“

Page 10: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Versionswechsel…und der Weg zu neuen Möglichkeiten

Grafische Oberfläche von Prover9 nutzt LADR-Dec-2007

Aktuelle Version LADR-Dec-2009-11A keine graphische Oberfläche nur als Source Code verfügbar Production Mode

Page 11: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Highlighting…optimales Arbeiten auch ohne GUI

Erstellung eines Highlightings für Prover9/Mace4 Dateien (*.in)

Page 12: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Prover9 Input Datei…Aufbau der einzelnen Sektionen

% Comments. Kommentare

set(production). Spezielle Funktionalitäten aktivieren

formulas(demodulators). Veränderbare Regel/Operationen(z.B.: Arbeiten mit Listen)

formulas(usable). Normale Relationen

formulas(assumptions). Feststehende Annahmen

formulas(goals). Ziele, die resolviert werden sollen

Page 13: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Production Mode…randvoll mit mächtigen Features

Ermöglicht die Nutzung von

Zahlen (1,2,3..) Operatoren (+/- ) Ordnung auf Zahlen Listen ([y:z]) Rekursion Variablen (u,v,w,x,y,z)

Page 14: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Manuel Neuer Aufbau

Aufgabenstellung

„Manuel Neuer is the goalkeeper of Bayern München.“

Aussage Konsistent Informativ

„He plays for Schalke.“

„He played for Schalke. “

Dazu bedarf es…

…einer Zeitontology für die Modellierung der zeitlichen Einordnung von Events.

Page 15: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Manuel Neuer Aufbau

Zeitontology% Enables the use of numbers and arithmetics.set(production).

formulas(usable). % Relations -----------------------------------------

% Interval u before interval v.all u all v (before(u,v) <- Interval(u,x,y) & Interval(v,z,w)

& (y <= z) & -equal(u,v)).

% Inequality of intervals.Interval(u,x,y) & Interval(v,z,w) & (-(x == z)|-(y == w)) -> -equal(u,v).

% Instant v in Interval u.instDuringInt(v,u) <- Instant(v,x) & Interval(u,y,z) & (x >= y) & (x <= z).

% Checks for overlapping intervals.overlaps(v,u) <- Interval(v,x,y) & Interval(u,w,z)

& ((x >= w) & (x <= z) | (y >= w) & (y <= z)).

Page 16: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Manuel Neuer Aufbau

Inhalt

% A goalkeeper is a player (now).goalkeeper(x,y) -> player(x,y). % Past events can be attached to a specific time.wasGoalkeeper(x,y,z) -> playedFor(x,y,z). % Get the corresponding interval to the "now"-instant.player(x,y) & instDuringInt(now,z) -> playedFor(x,y,z). % Rule out that a player cannot play for two different clubs at the same time (overlapping intervals).all b (Interval(b,v,w) & playedFor(x,y,z) & -(y == u) & overlaps(z,b)-> -playedFor(x,u,b)). % Wrapper for playedFor with corresponding interval to the "now"-instant.playedFor(x,y,z) & instDuringInt(now,z) -> playsFor(x,y).-playedFor(x,y,z) & instDuringInt(now,z) -> -playsFor(x,y).

Page 17: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Manuel Neuer Aufbau

Goals

% Manuel Neuer plays for Schalke.playsFor(ManuelNeuer,Schalke).

% Manuel Neuer played for Schalke.% (Find an interval,% which is before the "now"-interval.)exists x exists y (before(x,y)& instDuringInt(now,y)& playedFor(ManuelNeuer,Schalke,x)).

Konsistent Informativ

Page 18: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Ronaldo Gomez Aufbau

Aufgabenstellung

„The 90th minute header by Gomez cancelled out the early opener by Ronaldo”

Aussage Konsistent Informativ

„???“

„???“

Hier gibt es verschiedene Ansätze…

…zwei davon werden im Folgenden vorgestellt - jeweils mit Pro/Contra.

Page 19: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Vorteile der Versionen

Listen ohne Listen

Closed World Open World

Komplette Modellierung/Spezifizierung der Welt

Partielle Modellierung der Welt, durch intuitive Eingabe

Es kann zu jeder Zeit der Spielstand geprüft werden

Nur in Spezialfällen kann der Spielstand ausgewertet werden

Tore pro Mannschaft Tore pro Spieler

Page 20: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Demo

Live Demos

Page 21: Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving dwigand | ggoetze | semeyerz Resolution-based theorem proving Otter.

Ontology-based Interpretation of Natural Language II - Resolution-based theorem proving

dwigand | ggoetze | semeyerz

Resümee…die Quintessenz zum Schluss

Grenzen der FOL.

Problematik der Ambiguität von Sprache.

Selbstverständlichkeit von Numerik.

Überführen von Open- in Closed-World.