Questions are welcome during the tutorial.
<subject,predicate,object>
, e.g.<john,like,mary>
, <john,rdf:type,man>
, ...Systems like Siri are not too far from fulfilling the original vision. SW languages allow one to state various terminological and rule-like statements Multilinguality is not mentioned.
OWL and SWRL as an extension to the taxonomy language of RDFS. Actually hard to say what relation does the alignment of blocks denote, maybe simply "was developed before".
uri://.../animal
# denotes the class of animalsuri://.../eats
# denotes the relation of eating(uri://.../animal AND uri://.../African)
# "African animal"InverseOf(uri://.../eats)
# the relation of being eaten by something(african AND animal) OR (NOT (InverseOf(eat) SOME animal))
lion SubClassOf animal
(african AND animal) SubClassOf (InverseOf(eat) SOME lion)
SubClassOf(:country ObjectSomeValuesFrom(:border :country))
country SubClassOf border SOME country
Every country borders a country.
The meaning of OWL elements is defined via set theory.
OWL | set theory | example |
---|---|---|
individual | instance of some set | Switzerland |
class | set of instances | country |
object property | set of pairs <instance1, instance2> |
bordering |
data property | set of pairs <instance, dataitem> |
population |
C1 AND C2 |
intersection of C1 and C2 |
EU-country and NATO-country |
C1 OR C2 |
union of C1 and C2 |
EU-country or NATO-country |
NOT C |
complement set of C |
not an EU-country |
P SOME C |
set of things that have a P -property with a member of class C |
something that flows into a lake |
... | ... | ... |
DifferentIndividuals(I1 I2) |
I1 and I2 stand for different instances |
Switzerland is not Germany |
ClassAssertion(C I) |
I is an instance of C |
Switzerland is a country |
SubClassOf(C1 C2) |
C1 is a subset of C2 |
every EU-country is a country |
Domain(C P) |
the subject of P is in C |
everything that borders something is a country |
SubPropertyOf(P1 P2) |
P1 is a subset of P2 |
if X borders Y then X neighbors Y. |
... | ... | ... |
P only C
| set of things whose all P
-properties lead to a member of class C
| something that flows only into a lake
Axioms related classes, properties, individuals with each other in various ways.
Unique Name Assumption (UNA): differently named individuals are necessarily different instances of the domain. OWL does not make the UNA.
Open World Assumption (OWA): unstated facts are not assumed to be false. OWL makes the OWA.
Thus, OWL is different from some database/knowledgebase languages (SQL, Prolog) where a missing assertion means that it is false rather than unknown.
T-Box
A-Box
eu-country SubClassOf country
IF eu-country(?X) THEN country(?X)
IF man(?X) AND car(?Y) AND own(?X, ?Y) THEN like(?X, ?Y)
(man AND own SOME car) SubClassOf like SOME car
IF man(?X) AND car(?Y) AND own(?X, ?Y) THEN like(?X, ?Z) AND car(?Z)
SubClassOf
-axioms)(written in ACE for easier readability)
Ontology
Every country is a territory.
If X borders Y then Y borders X.
If X borders something then X is a country.
Germany borders Switzerland.
Entailments
Switzerland borders Germany.
Switzerland is a country.
Switzerland is a territory.
Germany is a country.
Germany is a territory.
It is false that Germany does not border Switzerland.
...
Unknown truth value
Switzerland is not Germany. # no UNA in OWL
Switzerland borders exactly 1 territory.
Switzerland borders itself.
...
Entailments are true axioms which are not explicitly part of the ontology.
Common-cold SubClassOf causative-agent SOME Virus
See also:
http://www.slideshare.net/micheldumontier/owlbased-applications
http://www.reportinghub.org/
Smallest subset that explains why mad-cow
is an empty class, indicating
that the ontology contains a modeling error.
Wiki
Semantic wiki = wiki + formal semantics
Shortcomings: cannot copy content from one language to the other, cannot ask questions, cannot check that the different versions of an article in different languages are about the same thing.
Example: sentence in an article Berlin is entered as
Berlin is the capital of [[Is capital of::Germany]]
and has a population of [[Has population::3,292,365|3.3 million]].
and is rendered as
Berlin is the capital of Germany
and has a population of 3.3 million.
and adds two triples to the underlying model
<Berlin, Is_capital_of, Germany>
<Berlin, Has_population, 3292365>
Which countries are located in Africa?
{{#ask: [[Category:Country]] [[located in::Africa]]
| ?Area#km²
| ?Name
| ?Population
| sort = population
| order = descending
}}
Is rendered as a sortable table listing links to the pages of category Country (or some of its subcategories) that contain the property located in (or some of its subproperties) with the value Africa.
The value is that one can easily insert this table (possibly with some modifications/customizations) to various pages without having to type it in from scratch.
In general not much work on it.
rdf:label
with the ISO language tagusage: UI for formal logics in cases where domain experts lack formal background
France borders Spain and it borders Portugal.
)Every country borders a country.
)Every EU-country borders a country that is a EU-country and is a NATO-country.
)English: Koalas eat eucalyptus leaves.
Violates the ACE construction rules:
Correct ACE:
English: Every EU-country borders a country that is a EU-country and is a NATO-country.
The attachment differences must be expressed in a lexically different way in ACE:
(The {curly brackets} are not part of ACE. They are used here to denote the scopes.)
The_Mediterranean_Sea is a sea. Every country that does not border a sea is a landlocked-country. Switzerland does not border the sea.
It is possible to express the same meaning (the same DRS) in syntactically different ways, e.g. every = if-then:
relative clause = coordination
(M{1,2,3}
indicate sentences with the same DRS.)
Content words are user-defined. They are classified by their word class and have one or more surface forms.
The lexicon allows the definition of aliases but does not otherwise provide any semantics, e.g. statements like "Every man is a human." can be made only at the level of ACE.
Commandline example. Parse a sentence into the DRS form.
$ echo "No dog is a cat." | ape.exe -solo drspp
[]
[A]
object(A,dog,countable,na,eq,1)-1/2
=>
[]
NOT
[B,C]
object(B,cat,countable,na,eq,1)-1/5
predicate(C,be,A,B)-1/3
ACE | OWL/SWRL |
---|---|
proper name | individual |
noun | named class |
intransitive adjective | named class |
noun phrase (with relative clause) | complex class |
transitive verb with NP object | property |
transitive verb with data object | data property |
transitive adjective | property |
sentence | OWL axiom or SWRL rule (SWRL rule as a fallback) |
question (with 1 query word) | DL-Query |
text | ontology |
Every country that does not border a sea is a landlocked-country.
SubClassOf(
ObjectIntersectionOf(
:country
ObjectComplementOf(
ObjectSomeValuesFrom(
:border
:sea
)
)
)
:landlocked-country
)
Which country is a landlocked-country?
ObjectIntersectionOf(
:country
:landlocked-country
)
OWL contains many shorthand constructs (DisjointClasses
, ObjectPropertyDomain
) with no direct ACE counterpart
DisjointClasses(
:country
ObjectHasSelf( :border )
)
Directly reflecting the keywords and axiom structure would give something like:
Countries and self-borderers are disjoint.
ACE-style verbalization gives a more natural:
No country borders itself.
Rewrite an OWL axiom, e.g.
ObjectPropertyDomain( write human )
into something with a more suitable structure (but preserving meaning):
SubClassOf(
ObjectIntersectionOf(
owl:Thing
ObjectSomeValuesFrom(
write
owl:Thing
)
)
human
)
then directly map it to ACE (with a Prolog DCG grammar):
Everything
that
writes something
is a human.
nonNormal
, MaleOrFemalePatient
short-coming shared with MOS: possibly harder to write, needs a look-ahead editor. ACE tool support exists for Prolog, but not for other languages.
Presenting the complete ontology as a sortable/searchable set of ACE sentences.
Explaining an entailment by a set of ACE sentences.
Counting and presenting DL Query results.
Property axioms presented in ACE vs checkboxes+labels.
Hiding the formal language enables one to use a more expressive fragment of it.
AceWiki article about landlocked country and the look-ahead editor.
Two small usability experiments:
=> Even untrained users can effectively use AceWiki
AceWiki (or parts of it) have been used in various research projects, e.g.
Sometimes parts of AceWiki are reused to build new systems, rather that using the complete AceWiki as it is.
Mention that AceWiki-GF is an other application, discussed later.
Article on Fynbos containing the original definition (in full English), its formal content (in ACE), and automatically generated upper concepts.
Agriculture glossary (= set of term-definition pairs) as a CNL-based semantic wiki
ACE is general-purpose, English-based (and difficult to port to other NLs), with fixed grammar and largely fixed interpretation.
Other CNLs:
parsing (translation, look-ahead, ...) based on Parallel Multiple Context-Free Grammars (MCFG), mildly context sensitive formalism
abstract Unitconv = {
flags startcat = Unitconv ;
cat Unit ; Unitconv ;
fun
unitconv : Unit -> Unit -> Unitconv ;
land_mile, nautical_mile : Unit ;
}
Unit
, Unitconv
)unitconv
, land_mile
, nautical_mile
) and their types (Unit->Unit->Unitconv
, Unit
)unitconv land_mile nautical_mile
unitconv land_mile land_mile
concrete UnitconvEng of Unitconv = {
lincat Unit, Unitconv = {s : Str} ;
lin
unitconv x y = {s = "how much is" ++ x.s ++ "in" ++ y.s ++ "?"} ;
land_mile = {s = "mile"} ;
nautical_mile = {s = "nautical mile" | "mile"} ;
}
concrete UnitconvWolfram of Unitconv = {
lincat Unit, Unitconv = {s : Str} ;
lin
unitconv x y = {s = "convert" ++ x.s ++ "to" ++ y.s} ;
land_mile = {s = "mile"} ;
nautical_mile = {s = "nmi"} ;
}
(x.s ++ "in")
concatenates the string of the argument (x.s
) with the string "in"
Parsing i.e. converting a string how much is nautical mile in mile ? to tree(s)
Unitconv> parse -lang=Eng "how much is nautical mile in mile ?"
unitconv nautical_mile land_mile
unitconv nautical_mile nautical_mile
Linearization i.e. converting a tree unitconv nautical_mile land_mile to string(s)
Unitconv> linearize -treebank -list (unitconv nautical_mile land_mile)
UnitconvEng: how much is nautical mile in mile ?, , how much is mile in mile ?
UnitconvWolfram: convert nmi to mile
Translation i.e. parse + linearize
Unitconv> parse -lang=Eng "how much is nautical mile in mile ?" | l -lang=Wolfram
convert nmi to mile
convert nmi to nmi
abstract Geography = {
cat
Country ; Relation ;
fun
germany : Country ;
switzerland : Country ;
border : Country -> Country -> Relation ;
}
concrete GeographyGer of Geography = {
param
CaseGer = Nom | Acc | Dat ;
lincat
Country = CaseGer => Str ; Relation = Str ;
lin
germany = table { _ => "Deutschland" } ;
switzerland = table { Dat => "der Schweiz" ; _ => "die Schweiz" } ;
border c1 c2 = c1 ! Nom ++ "grenzt an" ++ c2 ! Acc ;
}
border c1 c2 = c1 ! Nom ++ (mkVP3rdPers "grenzen" c2)
mkN "dog"
constructs all the noun forms for the singular nominative "dog": dog, dogs, dog's, dogs'mkN "man" "men"
(two forms needed for irregular English words)mkNP : Numerl -> N -> NP
: five menmkCl : NP -> V -> Cl
: five men sleepExample: constructing a clause:
$ gf
> i -retain alltenses/TryEng.gfo
> cc -one
mkS pastTense
(mkCl (mkNP (mkNumeral "1") (mkN "dog")) (mkV "sleep" "slept" "slept"))
one dog slept
> cc -one
mkS (mkCl (mkNP (mkNumeral "2") (mkN "dog")) (mkV "sleep" "slept" "slept"))
two dogs sleep
incomplete concrete FoodsI of Foods = open Syntax, LexFoods in {
lincat
Phrase = Cl ;
Item = NP ;
...
lin
is x y = mkCl x y ;
...
wine = mkCN wine_N ;
...
}
concrete FoodsGer of Foods = FoodsI with
(Syntax = SyntaxGer),
(LexFoods = LexFoodsGer) ;
Cl
, NP
, mkCl
, mkCN
)An ACE grammar implemented in GF adds multiple natural languages as front-ends to ACE. As a result, these languages can be mapped to and from various formal languages already supported by ACE.
German
Jedes Land, das nicht an ein Meer grenzt, ist ein Binnenland.
ACE-in-GF tree
baseText (sText (s (vpS (everyNP (relCN (cn_as_VarCN country_CN)
(neg_predRS which_RP (v2VP border_V2 (thereNP_as_NP
(aNP (cn_as_VarCN sea_CN))))))) (npVP (thereNP_as_NP
(aNP (cn_as_VarCN landlocked_country_CN)))))))
ACE
Every country that does not border a sea is a landlocked-country.
OWL
SubClassOf(
ObjectIntersectionOf(
:country
ObjectComplementOf(
ObjectSomeValuesFrom( :border :sea )
)
)
:landlocked-country
)
ACE: every person that speaks a language X does not forget X . Bul: всеки човек който говори език X не забравя X . Cat: cada persona que parla una llengua X no oblida X . Chi: 说 一 种 X 语 言 的 每 个 人 没 忘 X 。 Dan: hver person , som taler et sprog X glemmer ikke X . Dut: elke persoon , dat een taal X spreekt vergeet niet X . Est: iga inimene , kes räägib keelt X ei unusta X . Fin: jokainen henkilö , joka puhuu kieltä X ei unohda X:ää . Fre: chaque personne qui parle une langue X n' oublie pas X . Ger: jede Person , die eine Sprache X spricht vergißt X nicht . Gre: κάθε πρόσωπο που μιλά μία γλώσσα τον X δεν ξεχνά τον X . Hin: हर [person_CN] , जो [language_CN] X बोलता है X नहीं भूलता है . Ita: ogni persona che parla una lingua X non dimentica X . Mlt: kull persuna , li jkellem lingwa X ma jinsix X . Lav: ikviena persona , kas saka valodu X neaizmirst X . Nor: hver person , som snakker et språk X glemmer ikke X . Pol: każda osoba , która rozmawia z językiem X nie zapomina X . Ron: orice persoană care vorbeşte o limbă X nu îl uită pe X . Rus: каждый лицo , который говорит на языке X не забывает X . Spa: cada persona que habla una lengua X no olvida X . Swe: varje person , som talar ett språk X glömmer inte X . Tha: บุคคล ทุก คน ที่ พูด ภาษา X ไม่ ลืม X Urd: ہﺭ ﺶﺨﺻ , ﺝﻭ ﺰﺑﺎﻧ X ﺏﻮﻠﺗﺍ ہے X ﻥہیں ﺏھﻮﻠﺗﺍ ہے
Import most of the implementation from the RGL using a functor.
Every man likes the woman.
)More development effort has gone into German, Spanish and Finnish. Other implementations have holes in the coverage of ACE constructs that are not provided by the RGL. TODO: lexical ambiguity: French river example. ACE NP types could be done with dependent types but this is not compatible with the look-ahead algorithm. ACE has open vocabulary (i.e. different from MOLTO Phrasebook in that sense) and it is not easy for the user to create correct lexical entries.
for adding GF to AceWiki
Depicted are the ACE version and the German version (containing the look-ahead editor).
Note that the UI is language dependent.
Disambiguation dialog (only) if the entry was added in another language, and the trees of this ambiguity have different linearizations in the viewed language.
Ambiguity between object and subject relative clause. Occurs in German and Dutch. The wiki users can choose the correct tree by looking at the tree set in a language other than German, e.g. DisambGer (if it exists).
GF source editing is available in the GF Cloud Service. AceWiki-GF just reflects that. Some types of errors can be pinpointed.
Not used: negated object relative clause: "... that a country does not border", variable in apposition "a country X".
Table of Contents | t |
---|---|
Exposé | ESC |
Full screen slides | e |
Presenter View | p |
Source Files | s |
Slide Numbers | n |
Toggle screen blanking | b |
Show/hide slide context | c |
Notes | 2 |
Help | h |