turtle: ex#Author rdfs:subClassOf ex#Person .
turtle: ex#Isaac_Asimov rdf:type ex#Person .
ex#Isaac_Asimov [ ex#isAuthorOf -> ex#I_Robot ] .
ex#'Tobias Findeisen' : ex#Person .
turtle: ex#'Tobias Findeisen' rdf:type ex#Person .
ex#Keyword [ ex#broaderKeyword *=> ex#Keyword ] .
ex#Keyword [] .
turtle: ex#artefact rdf:type ex#Keyword .
ex#machine [ ex#broaderKeyword -> ex#artefact ] .
ex#machine : ex#Keyword .
turtle: ex#machine rdf:type ex#Keyword .
ex#vehicle [ ex#broaderKeyword -> ex#machine ] .
ex#robot [ ex#broaderKeyword -> ex#machine ] .
ex#'human robot' [ ex#broaderKeyword -> ex#robot ] .
ex#Author [ ex#isAuthorOf *=> ex#Document ] .
ex#Document [] .
ex#Stanislav_Lem : ex#Author .
turtle: ex#Stanislav_Lem rdf:type ex#Author .
ex#Stanislav_Lem [ ex#isAuthorOf -> ex#The_Cyberiad ] .
turtle: ex#The_Cyberiad rdf:type ex#Story .
ex#The_Cyberiad [ ex#hasKeyword -> ex#robot ] .
ex#I_Robot : ex#Story .
turtle: ex#I_Robot rdf:type ex#Story .
ex#I_Robot [ ex#hasKeyword -> ex#'human robot' ] .
ex#Document [ ex#hasKeyword *=> ex#Keyword ] .
ex#Keyword [] .
ex#Book :: ex#Document .
turtle: ex#Book rdfs:subClassOf ex#Document .
ex#Story :: ex#Document .
turtle: ex#Story rdfs:subClassOf ex#Document .
@{
AllKeywords
}
?-
?X
:
ex#Keyword
.
@{
KeywordTypeEntailment
}
?X
:
ex#Keyword
:-
?X
[
ex#broaderKeyword
->
?Y
] .
@{
WhoIsExpertOnSubject
}
?-
?X
[
ex#isExpert
->
?Z
] .
@{
expertOnSubjectRule
}
?X
[
ex#isExpert
->
?Z
]
:-
?X
:
ex#Person
and
?X
[
ex#isAuthorOf
->
?Y
] and
?Y
:
ex#Document
and
?Y
[
ex#hasKeyword
->
?Z
] and
?Z
:
ex#Keyword
.
@{
SubjectToBroaderSubject
}
?-
?X
[
ex#isExpert
->
?Z
] .
@{
TransitivRule
}
?X
[
ex#isExpert
->
?Z
]
:-
?X
:
ex#Person
and
?X
[
ex#isExpert
->
?Y
] and
?Y
:
ex#Keyword
and
?Y
[
ex#broaderKeyword
->
?Z
] and
?Z
:
ex#Keyword
.