BY SOME SOME

BY SOME SOME

For a in detail explanation of the BY SOME inferencing c.f. Milch (DE).

We provide here a minimal stand alone example.

from gd05 import GenDifS_Map
mm = "BY-SOME-SOME"
o = GenDifS_Map(f"../mm/{mm}.mm", verbose=1)
cwd into input_dir: /home/dsci/a/l/lib/gendifs_05/mm
reading /home/dsci/a/l/lib/gendifs_05/mm > BY-SOME-SOME.mm (18 nodes)
Parsing XML: #1 start nodes
ontology node IDs: {'ID_1640681749': 'ONTOLOGY'}
RDF: 104 502
updated mindmap with backup to /home/dsci/a/l/lib/gendifs_05/mm/BY-SOME-SOME.mm_backup_2022-09-08T14-54-01
o.rdflib.serialize(destination=f"../ttl/{mm}.ttl")
<Graph identifier=N1b55000c95554f0e9f4449e889c7c304 (<class 'rdflib.graph.Graph'>)>
o.parser_markdown()
  • horse

    • BY has_sex SOME sex

      • stallion

        • SOME male

      • female_horse

        • SOME female

print(o.show_turtle([]))
# 1
# COLLECTION.a, context
#   None: None
#     None: None
#       None: None



# 1
# BY.a, owl
:topProperty
   rdf:type owl:ObjectProperty .


# 1
# BY.b, owl
:topConcept
   a owl:Class .


# 1
# BY.c, owl-test
ex:topConcept_None
   a :topConcept .



# 1
# BY.g, owl-classification
:BY_1_restriction
   a owl:Class ;
   rdfs:label "BY topProperty SOME topConcept" ;
   owl:equivalentClass [ a owl:Restriction ;
      owl:onProperty :topProperty ;
      owl:someValuesFrom :topConcept ] .



# 1
# BY.h, owl-classification
:BY_1_intersection
   a owl:Class ;
   rdfs:label "(BY topProperty SOME topConcept) INTERSECT None_None" ;
   rdfs:subClassOf :None ;
   owl:equivalentClass [ a owl:Class ;
      owl:intersectionOf (
         :BY_1_restriction
         :None ) ] .



# 2
# OBJECT_BY.a, owl
:horse
   a owl:Class ; # 
   rdfs:subClassOf :None .


# 2
# OBJECT_BY.b, owl-test
ex:horse_ID_1237637323
   a :horse .



# 2
# OBJECT_BY.c, skos
cpt:horse
   a skos:Concept ;
   skos:broaderTransitive cpt:None .


# 3
# COLLECTION.a, context
#   None: None
#     2: horse
#       3: has_sex%20SOME%20sex



# 3
# BY.a, owl
:has_sex
   rdf:type owl:ObjectProperty .


# 3
# BY.b, owl
:sex
   a owl:Class .


# 3
# BY.c, owl-test
ex:sex_ID_865448472
   a :sex .



# 3
# BY.g, owl-classification
:BY_3_restriction
   a owl:Class ;
   rdfs:label "BY has_sex SOME sex" ;
   owl:equivalentClass [ a owl:Restriction ;
      owl:onProperty :has_sex ;
      owl:someValuesFrom :sex ] .



# 3
# BY.h, owl-classification
:BY_3_intersection
   a owl:Class ;
   rdfs:label "(BY has_sex SOME sex) INTERSECT 2_horse" ;
   rdfs:subClassOf :horse ;
   owl:equivalentClass [ a owl:Class ;
      owl:intersectionOf (
         :BY_3_restriction
         :horse ) ] .



# 4
# OBJECT_BY.a, owl
:stallion
   a owl:Class ; # 
   rdfs:subClassOf :horse .


# 4
# OBJECT_BY.b, owl-test
ex:stallion_ID_1582003873
   a :stallion .



# 4
# OBJECT_BY.c, skos
cpt:stallion
   a skos:Concept ;
   skos:broaderTransitive cpt:horse .


# 5
# COLLECTION.a, context
#   3: has_sex%20SOME%20sex
#     4: stallion
#       5: male



# 5
# SOME.b, owl
:male
   a owl:Class ;
    rdfs:subClassOf :sex .


# 5
# SOME.c, owl-test
ex:male_ID_1136391439
   a :male .



# 5
# SOME.g, owl-classification
:SOME_5_restriction
   a owl:Class ;
   rdfs:label "BY 3_has_sex SOME male" ;
   owl:equivalentClass [ a owl:Restriction ;
      owl:onProperty :has_sex ;
      owl:someValuesFrom :male ] .



# 5
# SOME.h, owl-classification
:SOME_5_intersection
   a owl:Class ;
   rdfs:label "(BY 3_has_sex SOME male) INTERSECT 2_horse" ;
   rdfs:subClassOf :stallion ;
   owl:equivalentClass [ a owl:Class ;
      owl:intersectionOf (
          :SOME_5_restriction
          :horse ) ] .



# 5
# SOME.i, owl-test
# horse has_sex male -> stallion
ex:horse_ID_1136391439
   a :horse ;
   :has_sex ex:male_ID_1136391439 ;
   ex:classifyLike ex:stallion_ID_1136391439 .
ex:male_ID_1136391439
   a :male .
ex:stallion_ID_1136391439
   a :stallion .



# 6
# COLLECTION.a, context
#   3: has_sex%20SOME%20sex
#     4: stallion
#       6: 



# 7
# LITERAL.a, owl
:stallion 
    rdfs:comment '''A stallion is a male horse that has not been gelded (castrated). <https://en.wikipedia.org/wiki/Stallion>''' .  # None


# 7
# LITERAL.c, skos
cpt:stallion 
    skos:definition '''A stallion is a male horse that has not been gelded (castrated). <https://en.wikipedia.org/wiki/Stallion>''' . # None 


# 8
# OBJECT_BY.a, owl
:female_horse
   a owl:Class ; # 
   rdfs:subClassOf :horse .


# 8
# OBJECT_BY.b, owl-test
ex:female_horse_ID_1486568633
   a :female_horse .



# 8
# OBJECT_BY.c, skos
cpt:female_horse
   a skos:Concept ;
   skos:broaderTransitive cpt:horse .


# 9
# COLLECTION.a, context
#   3: has_sex%20SOME%20sex
#     8: female_horse
#       9: female



# 9
# SOME.b, owl
:female
   a owl:Class ;
    rdfs:subClassOf :sex .


# 9
# SOME.c, owl-test
ex:female_ID_1061356652
   a :female .



# 9
# SOME.g, owl-classification
:SOME_9_restriction
   a owl:Class ;
   rdfs:label "BY 3_has_sex SOME female" ;
   owl:equivalentClass [ a owl:Restriction ;
      owl:onProperty :has_sex ;
      owl:someValuesFrom :female ] .



# 9
# SOME.h, owl-classification
:SOME_9_intersection
   a owl:Class ;
   rdfs:label "(BY 3_has_sex SOME female) INTERSECT 2_horse" ;
   rdfs:subClassOf :female_horse ;
   owl:equivalentClass [ a owl:Class ;
      owl:intersectionOf (
          :SOME_9_restriction
          :horse ) ] .



# 9
# SOME.i, owl-test
# horse has_sex female -> female_horse
ex:horse_ID_1061356652
   a :horse ;
   :has_sex ex:female_ID_1061356652 ;
   ex:classifyLike ex:female_horse_ID_1061356652 .
ex:female_ID_1061356652
   a :female .
ex:female_horse_ID_1061356652
   a :female_horse .