diff --git a/README.md b/README.md index 3ce127c9f77d431d0c1090d9458f65a107589753..a2c1867fc62c43e9a3319f8c7a79738ce50a38d2 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,24 @@ from [DBPedia](https://dbpedia.org/): ## Data -The "data" directery contains data in different representations: +The "data" directery contains data in different representations. These data are organized in sub-folders, +each folder corresponding to one sentence according to the following convention: + +- a first level from SSC-01 to SSC-23, corresponding to the 23 original sentences in solar system abstract +- a second level (to each folder SSC-XX) with several sub-folders, denoted SSC-XX-01, SSC-XX-02, etc), +corresponding to several sentence with similar meaning + +For example, SSC-01-01 corresponds to the first sentence of original english abstract, while SSC-01-02, +SSC-01-03, etc, correspond to some sentence with similar meaning (but not exactly the same) of the first +sentence of original english abstract. SSC-02-01 corresponds to the second sentence, and so on. + +To each sentence (in each sub-folder SSC-XX-YY), there is several files corresponding to different +representation of sentence. + +These data were obtained from the sources, by using +[cm-tool](https://gitlab.tetras-libre.fr/tetras-mars/corpus/cm-tool) project: - sequence of sentences ('dataRef.sentence.txt') - AMRs Graph ('dataRef.amr.graph') - AMR Linked Data ('dataRef.amr.rdf') -These data were obtained from the sources, by using -[cm-tool](https://gitlab.tetras-libre.fr/tetras-mars/corpus/cm-tool) project. - diff --git a/data/SSC-01/SSC-01-01/SSC-01-01.al.owl.nt b/data/SSC-01/SSC-01-01/SSC-01-01.al.owl.nt deleted file mode 100644 index b4e09d647f67284445727e3704985ee7def540a3..0000000000000000000000000000000000000000 --- a/data/SSC-01/SSC-01-01/SSC-01-01.al.owl.nt +++ /dev/null @@ -1,31 +0,0 @@ -@base <https://tetras-libre.fr/mars/ssc.rdfs> . - -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<solar-system> a rdfs:Class. -<system> a rdfs:Class. -<planet-system> a rdfs:Class. -<sun> a rdfs:Class. -<object> a rdfs:Class. -<object-orbit-sun> a rdfs:Class. -<object-orbit-sun-direct> a rdfs:Class. -<object-orbit-sun-no-direct> a rdfs:Class. -<gravitation> a rdfs:Class. - -<bind> a rdf:Property. -<orbit> a rdf:Property. - -<planet-system> rdfs:subClassOf <system>. -<solar-system> rdfs:subClassOf <planet-system>. -<object-orbit-sun> rdfs:subClassOf <object>. -<object-orbit-sun-direct> rdfs:subClassOf <object-orbit-sun>. -<object-orbit-sun-no-direct> rdfs:subClassOf <object-orbit-sun>. - -<solar-system> has-part <sun>. -<solar-system> has-part <object-orbit-sun>. - -<gravitation> <bind> <solar-system>. -<object-orbit-sun> [a owl:Restriction; - owl:onProperty :orbit; - owl:hasValue :sun] diff --git a/data/SSC-01/SSC-01-01/SSC-01-01.al.owl.ttl b/data/SSC-01/SSC-01-01/SSC-01-01.al.owl.ttl new file mode 100644 index 0000000000000000000000000000000000000000..a8f285ce269abb264945cba76052a585cb6955b4 --- /dev/null +++ b/data/SSC-01/SSC-01-01/SSC-01-01.al.owl.ttl @@ -0,0 +1,109 @@ +# ::id SSC-01-01 +# ::snt The Solar System is the gravitationally bound system of the Sun and the objects that orbit it, either directly or indirectly. + +@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:equivalentProperty [ + a owl:ObjectProperty ; + owl:complementOf :part-of + ] . + +:manner a owl:ObjectProperty . + + +# ::comment "The Solar System is the gravitationally bound system ..." + +:solar-system a + owl:individual , + :gravitationally-bound-system . + + +# ::comment "the gravitationally bound system" + +:gravitationally-bound-system + a rdfs:Class ; + rdfs:subClassOf :system ; + . + +:bind a owl:objectProperty . + +:gravitationally-bound-system + rdfs:subClassOf [ + a owl:Restriction ; + owl:onProperty :bind ; + owl:hasValue :gravitation + ] . + +:gravitation a rdfs:Class . + +:system a rdfs:Class . + + +# ::comment "Solar System is ... [compose] of the sun and the objects that orbit it" + +:sun a owl:individual ; + :part-of :solar-system . + +:object-orbit-sun a rdfs:Class ; + rdfs:subClassOf :object ; + rdfs:subClassOf [ + a owl:Restriction ; + owl:onProperty :orbit ; + owl:hasValue :sun + ] . + +:object-orbit-sun + rdfs:subClassOf [ + a owl:Restriction ; + owl:onProperty :part-of ; + owl:hasValue :solar-system + ] . + +:object a rdfs:Class . + +:orbit a owl:ObjectProperty . + + +# ::comment "the objects that orbit it, either directly or indirectly." + +:object-orbit-sun-directly a rdfs:Class ; + rdfs:subClassOf :object-orbit-sun ; + rdfs:subClassOf [ + a owl:Restriction ; + owl:onProperty :direct-orbit ; + owl:hasValue :sun + ] . + +:object-orbit-sun-indirectly a rdfs:Class ; + rdfs:subClassOf :object-orbit-sun ; + rdfs:subClassOf [ + a owl:Restriction ; + owl:onProperty :indirect-orbit ; + owl:hasValue :sun + ] . + +:direct-orbit a rdf:Property ; + rdfs:subPropertyOf :orbit ; + :manner :direct . + +:indirect-orbit a rdf:Property ; + rdfs:subPropertyOf :orbit ; + :manner :indirect . + +:direct a rdfs:Class . + +:indirect a rdfs:Class ; + owl:equivalentClass [ + a owl:Class ; + owl:complementOf :direct + ] . + diff --git a/data/SSC-01/SSC-01-01/SSC-01-01.stc.txt b/data/SSC-01/SSC-01-01/SSC-01-01.stc.txt index 52c36d1d0a9db0eb48c7c2c48475cc1b9765d593..4311190deaa5ebe8ce9cf353a7d7f1f90a624888 100644 --- a/data/SSC-01/SSC-01-01/SSC-01-01.stc.txt +++ b/data/SSC-01/SSC-01-01/SSC-01-01.stc.txt @@ -4,7 +4,7 @@ # # Pré-traitement = chaque noeud du graphe est associé à un filet de type ATOM # -# TYPE = { ATOM, COMMON-CONCEPT, PREDICATE, MODALITY } +# TYPE = { atom, commonConcept, predicate, dataValue, class } # # ----------------------------------- @@ -17,25 +17,111 @@ # exemple de concepts communs : boy, car, ... # ::function isPredicate -# ... +# isPredicate(x) retourne VRAI si x est un prédicat AMR # ::function isPhenomena -# ... +# isPhenomena(x) retourne VRAI si x est un phénomène linguistique -# ----------------------------------- -# STC -# ----------------------------------- +# ::function getValue +# getValue(x) retourne la chaine de caractère x sans guillemet + +# ::function getValue +# getValue(x, y) retourne la concaténation de getValue(x), '-' +# et getValue(y) + + +# -------------------------------------------------------- +# STC niveau 0 : analyse des filets atomiques +# -------------------------------------------------------- + +STC-01 (x) : + atom(x) & isCommonConcept(x.concept) + => nodes = { x.nodes } + type = commonConcept + concept = getValue(x.value) + values = { concept } + newNet(nodes, type, values) + + +STC-02 (x) : + atom(x) & isDataValue(x) + => nodes = { x.nodes } + type = dataValue + value = getValue(x.value) + values = { value } + newNet(nodes, type, values) + + +STC-03 (n, x) : + commonConcept(n) & dataValue(x) & n.concept = 'name' & op1(n, x) + => nodes = { n.nodes, x.nodes } + type = namedEntities + depth = '1' + name = getValue(x.value) + values = { name } + newNet(nodes, type, values) + + +STC-04 (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 1 : extraction des individus, classes et propriétés +# -------------------------------------------------------- + +STC-11 (x, y) : + commonConcept(x) + => nodes = { x.nodes } + type = class + class_id = string(x.concept) + owl = string(class_id, ' a ', 'rdfs:Class') + values = { class_id, owl } + newNet(nodes, type, values) -# ::stc STC-01 -[x] type(x, ATOM) & isCommonConcept(x.concept) - => { type = COMMON-CONCEPT ; concept = x.concept } +STC-12 (x, y) : + :domain(x,y) & class(x) & class(y) + => nodes = { x.nodes, y.nodes } + type = class + class_id = string(x.class_id, '-', y.class_id) + owl = string(class_id, ' a ', 'rdfs:Class') + owl = string(class_id, ' rdfs:subClassOf ', y.class_id) + values = { class_id, owl } + newNet(nodes, type, values) +STC-13 (x, y) : + :name(x, y) & class(x) & namedEntities(x, y) + => nodes = { x.nodes } + type = individual + class_id = x.class_id + individual_id = y.name + owl = string(individual_id, ' a ', 'owl:individual') + owl = string(individual_id, ' a ', class_id) + values = { class_id, individual_id, owl } + newNet(nodes, type, values) -# ::stc STC-02 -[x, y] domain(x,y) & type(x, COMMON-CONCEPT) & type(y, COMMON-CONCEPT) - => { type = CLASS ; - concept = x.concept + "-" + y.concept ; - class = defineNewClass(concept) - } +STC-14 (x, y) : + predicate(x) & class(y) + => nodes = { x.nodes } + type = objectProperty + property_id = string(x.concept) + owl = string(class_id, ' a ', 'owl:objectProperty') + values = { property_id, owl } + newNet(nodes, type, values) +STC-15 (x, y, z) : + :ARG1-of(x, y) & class(x) & objectProperty(y) & ARG0(y, z) & class(z) + => nodes = { x.nodes } + type = class + class_id = string(z.class_id, '-', y.property_id, '-', x.class_id) + owl = string(class_id, ' a ', 'rdfs:Class') + owl = string(class_id, ' rdfs:subClassOf ', x.class_id) + values = { class_id, owl } + newNet(nodes, type, values)