Skip to content
Snippets Groups Projects
Commit da6db881 authored by Aurélien Lamercerie's avatar Aurélien Lamercerie
Browse files

Init SSC-03-01

parent 0e9c448e
Branches
No related tags found
No related merge requests found
# ::id SSC-03-01
# ::snt Of the objects that orbit the Sun indirectly—the natural satellites—two are larger than the smallest planet, Mercury, and one more almost equals it in size.
@base <https://tetras-libre.fr/mars/ssc> .
@prefix : <https://tetras-libre.fr/mars/ssc#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
# ::predefined-property :has-part :part-of :manner
:part-of a owl:ObjectProperty .
:has-part
a owl:ObjectProperty ;
owl:inverseOf :part-of .
:manner a owl:DatatypeProperty .
# ::comment "the celestial objects that orbit the Sun directly ..."
:object a rdfs:Class .
:celestial-object
a rdfs:Class ;
a :object .
:orbit a owl:ObjectProperty .
:sun a owl:individual .
:celestial-object-orbit-sun a rdfs:Class ;
rdfs:subClassOf :celestial-object ;
rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty :orbit ;
owl:hasValue :sun
] .
:celestial-object-orbit-sun-directly a rdfs:Class ;
rdfs:subClassOf :celestial-object-orbit-sun ;
rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty :direct-orbit ;
owl:hasValue :sun
] .
:direct-orbit a owl:ObjectProperty ;
rdfs:subPropertyOf :orbit ;
:manner "direct" .
# ::comment "... the eight planets ..."
:planet a rdfs:Class .
:eight-planet
a rdfs:Class ;
rdfs:subClassOf :planet ;
owl:cardinality 8 .
# ::comment "... the dwarf planets ..."
:dwarf-planet
a rdfs:Class ;
rdfs:subClassOf :planet .
# ::comment "the celestial objects ... include ... the eight planets and the dwarf planets ..."
:celestial-object
rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty :include ;
owl:hasValue :eight-planet
] .
:celestial-object
rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty :include ;
owl:hasValue :dwarf-planet
] .
# -----------------------------------------------------------------------------
# Schémas de Transduction Compositionnel (STC)
# -----------------------------------------------------------------------------
#
# Pré-traitement = chaque noeud du graphe est associé à un filet de type ATOM
#
# TYPE = { atom, commonConcept, predicate, dataValue, class, objectProperty }
#
# -----------------------------------
# Fonctions
# -----------------------------------
# ::function is-common-concept (x)
retourne VRAI si x est un concept AMR commun, c'est à
dire si x n'est pas un prédicat ou un phénomène linguistique
exemple de concepts communs : boy, car, ...
# ::function is-predicate (x)
retourne VRAI si x est un prédicat AMR
# ::function is-linguistic-phenomena (x)
retourne VRAI si x est un phénomène linguistique
# ::function get-value (x)
retourne la chaine de caractère x sans guillemet
# ::function get-value (x, y)
retourne la concaténation de get-value(x), '-' et get-value(y)
# ::function define-id (x, y ...)
retourne un identifiant sous une forme standard (':x-y-...')
# ::function define-inverse-id (x)
retourne un identifiant inverse pour la propriété d'id "x" sous une forme
standard (':x-of' ou ':x-by')
# ::function define-OWL-restriction (C1, P, C2)
retourne la définition d'une restriction OWL sur la classe c1 sous la forme
suivante :
{C1} rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty {p} ;
owl:hasValue {C2}
] .
# --------------------------------------------------------
# STC niveau 0 : analyse des concepts atomiques
# --------------------------------------------------------
STC-01 (x) :
atom(x) & isCommonConcept(x.concept)
=> nodes = { x.nodes }
type = commonConcept
concept = get-value(x.value)
values = { concept }
newNet(nodes, type, values)
STC-02 (x) :
atom(x) & isDataValue(x)
=> nodes = { x.nodes }
type = dataValue
value = get-value(x.value)
values = { value }
newNet(nodes, type, values)
STC-03 (x) :
atom(x) & is-predicate(x)
=> nodes = { x.nodes }
type = predicate
predicate = get-value(x.value)
values = { predicate }
newNet(nodes, type, values)
# --------------------------------------------------------
# STC niveau 1 : extraction des entités nommées
# --------------------------------------------------------
STC-11 (n, x) :
commonConcept(n) & dataValue(x) & n.concept = 'name' & op1(n, x)
=> nodes = { n.nodes, x.nodes }
type = namedEntities
depth = '1'
name = string(x.value)
values = { name }
newNet(nodes, type, values)
STC-12 (ne, x) :
namedEntities(ne) & dataValue(x) & ne.depth = 1 & op2(ne, x)
=> nodes = { ne.nodes, x.nodes }
type = namedEntities
depth = '2'
name = string(ne.name, '-', x.value)
values = { name }
newNet(nodes, type, values)
# --------------------------------------------------------
# STC niveau 2 : extraction de classes
# --------------------------------------------------------
STC-21 (x, y) :
commonConcept(x)
=> nodes = { x.nodes }
type = class
id = define-id(x.concept)
owl = string(id, ' a ', 'rdfs:Class')
values = { id, owl }
newNet(nodes, type, values)
STC-22 (x, y) :
:domain(x,y) & class(x) & class(y)
=> nodes = { x.nodes, y.nodes }
type = class
id = define-id(x.id, y.id)
owl = string(id, ' a ', 'rdfs:Class')
owl = string(id, ' rdfs:subClassOf ', y.id)
values = { id, owl }
newNet(nodes, type, values)
# --------------------------------------------------------
# STC niveau 3 : extraction des individus
# --------------------------------------------------------
STC-23 (x, y) :
:name(x, y) & class(x) & namedEntities(x, y)
=> nodes = { x.nodes }
type = individual
id = x.id
id = y.name
owl = string(id, ' a ', 'owl:individual')
owl = string(id, ' a ', id)
values = { id, id, owl }
newNet(nodes, type, values)
# --------------------------------------------------------
# STC niveau 4 : extraction de propriétés
# --------------------------------------------------------
STC-31 (x, y) :
predicate(x) & class(y)
=> nodes = { x.nodes }
type = objectProperty
property_id = define-id(x.predicate)
owl = string(property_id, ' a ', 'owl:objectProperty')
values = { property_id, owl }
newNet(nodes, type, values)
STC-32 (x, y) :
objectProperty(x) & :ARGi-of(x, y)
=> inverse_property_id = define-inverse-id(x.property_id)
owl = string(x.property_id, ' owl:inverseOf ', inverse_property_id)
x.values = x.values + { owl }
# --------------------------------------------------------
# STC niveau 5 : extraction de relations taxonomiques
# --------------------------------------------------------
STC-41 (x, y, z) :
:ARG1-of(x, y) & class(x) & objectProperty(y) & ARG0(y, z) & class(z)
=> nodes = { x.nodes }
type = class
id = define-id(z.id, y.property_id, x.id)
owl = string(id, ' a ', 'rdfs:Class')
owl = string(id, ' rdfs:subClassOf ', x.id)
owl = define-OWL-restriction (id, y.property_id, z.id)
values = { id, owl }
newNet(nodes, type, values)
exemple :
(s / system
:ARG1-of (b / bind-01
:ARG0 (g / gravitation))
=> nodes = { s, b, g }
type = class
id = "gravitation-bind-system"
owl = ":gravitation-bind-system a rdfs:Class"
owl = ":gravitation-bind-system a :system"
owl = ":gravitation-bind-system rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :bind-by ;
owl:hasValue :gravitation
] ."
# --------------------------------------------------------
# STC niveau 6 : extraction de relations non taxonomiques
# --------------------------------------------------------
# question sur restriction : voir ticket 1
STC-51 (c1, i1) :
:part-of(c1, i1) & class(c1) & individual(i1)
=> nodes = { c1.nodes, i1.nodes }
type = class
id = define-id(i1.id, c1.id)
owl = string(id, ' a ', 'rdfs:Class')
owl = string(id, ' rdfs:subClassOf ', c1.id)
owl = define-OWL-restriction (id, ':part-of', i1.id)
values = { id, owl }
newNet(nodes, type, values)
# --------------------------------------------------------
# STC niveau 7 : extraction d'axiomes complexes
# --------------------------------------------------------
# --
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment