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.