diff --git a/ontologies/semopenalex-ontology-shacl.ttl b/ontologies/semopenalex-ontology-shacl.ttl index 29f8a40..8f68c26 100644 --- a/ontologies/semopenalex-ontology-shacl.ttl +++ b/ontologies/semopenalex-ontology-shacl.ttl @@ -17,7 +17,7 @@ ; dct:issued "2022-05-12"^^xsd:date; dct:license ; - dct:modified "2023-10-24"^^xsd:date; + dct:modified "2024-05-24"^^xsd:date; dct:publisher , ; dct:title "SemOpenAlex Ontology"@en; rdfs:comment "The Semantic OpenAlex Ontology, described using W3C RDF Schema and the Web Ontology Language OWL."@en; @@ -45,7 +45,7 @@ rdfs:label "Linn Aung"; foaf:mbox . - a owl:ObjectProperty; + a owl:ObjectProperty; rdfs:isDefinedBy . a owl:DatatypeProperty; @@ -191,7 +191,7 @@ soa:013f2f63f0b01681bb2b6bee1410bea9 a sh:PropertyShape; soa:031c9716dcc41536893fe766a943dca2 a sh:PropertyShape; sh:datatype xsd:string; - sh:path . + sh:path . soa:0505f27824e6216f6cefdbd4e005817d a sh:PropertyShape . @@ -225,7 +225,7 @@ soa:0d30180e88607a9b9f3e7efdf6a5a920 a sh:PropertyShape; soa:1332c0bb9ba85ee3d259b28b69384e8d a sh:PropertyShape; sh:datatype xsd:float; - sh:path . + sh:path . soa:189d841b1771b070e525aa80a66987e5 a sh:PropertyShape; sh:class soa:Source; @@ -237,7 +237,7 @@ soa:1bb749c62c841583be769092b22db6b8 a sh:PropertyShape; soa:1c15feb6789e3ab6b591b6963f5fabd8 a sh:PropertyShape; sh:datatype xsd:float; - sh:path . + sh:path . soa:2183731b5316d244e42f7f4bb5d53178 a sh:PropertyShape . @@ -518,9 +518,8 @@ soa:Geo a owl:Class; rdfs:label "Geo"@en . soa:GeoShape a sh:NodeShape; - sh:property soa:031c9716dcc41536893fe766a943dca2, soa:1332c0bb9ba85ee3d259b28b69384e8d, - soa:1c15feb6789e3ab6b591b6963f5fabd8, soa:2b3c29e0b34e9bc29556f5229eb14a97, soa:6ea4e05d3608eb027517e565a2f1103c, - soa:e38f3b3c38e508f7aa6cceb7394b6c8b, soa:eb7e6709e5e9634bfcc6232b56028bce; + sh:property soa:031c9716dcc41536893fe766a943dca2, soa:1332c0bb9ba85ee3d259b28b69384e8d, soa:2b3c29e0b34e9bc29556f5229eb14a97, + soa:1c15feb6789e3ab6b591b6963f5fabd8, soa:eb7e6709e5e9634bfcc6232b56028bce, soa:6ea4e05d3608eb027517e565a2f1103c ; sh:targetClass soa:Geo . soa:HostVenueShape a sh:NodeShape; @@ -842,13 +841,9 @@ soa:ddcebb3ed512f8f49c20e7d8d168d087 a sh:PropertyShape; sh:datatype xsd:string; sh:path soa:umlsAui . -soa:e38f3b3c38e508f7aa6cceb7394b6c8b a sh:PropertyShape; - sh:datatype xsd:string; - sh:path . - soa:e6d6f1fbf0cd5a66ac9208072882dea6 a sh:PropertyShape; sh:class soa:Geo; - sh:path . + sh:path . soa:e87cdd7b584967125d063d517eed6e4e a sh:PropertyShape; sh:class soa:Author; diff --git a/ontologies/semopenalex-ontology.ttl b/ontologies/semopenalex-ontology.ttl index d2f0618..9318be0 100644 --- a/ontologies/semopenalex-ontology.ttl +++ b/ontologies/semopenalex-ontology.ttl @@ -12,7 +12,7 @@ rdfs:label "SemOpenAlex Ontology"@en; rdfs:comment "The Semantic OpenAlex Ontology, described using W3C RDF Schema and the Web Ontology Language OWL."@en ; dcterms:created "2022-05-12"^^xsd:date ; - dcterms:modified "2023-10-24"^^xsd:date ; + dcterms:modified "2024-05-24"^^xsd:date ; dcterms:license ; dcterms:issued "2023-10-18"^^xsd:date ; dcterms:publisher ; @@ -262,7 +262,7 @@ foaf:name a owl:DatatypeProperty; rdfs:label "OpenAccess"@en ; rdfs:comment "This class represents an open access status."@en. - a owl:ObjectProperty; + a owl:ObjectProperty; rdfs:domain ; rdfs:range ; rdfs:comment "This property specifies the location of an institution."@en; @@ -606,31 +606,25 @@ foaf:name a owl:DatatypeProperty; rdfs:comment "This property specifies the city of a geo."@en; rdfs:label "city"@en . - a owl:DatatypeProperty; - rdfs:domain ; - rdfs:range xsd:string ; - rdfs:comment "This property specifies the geonames ID of a geo."@en; - rdfs:label "geonames ID"@en . - a owl:DatatypeProperty; rdfs:domain ; rdfs:range xsd:string ; rdfs:comment "This property specifies the region of a geo."@en; rdfs:label "region"@en . - a owl:DatatypeProperty; + a owl:DatatypeProperty; rdfs:domain ; rdfs:range xsd:string ; rdfs:comment "This property specifies the country code of a geo."@en; rdfs:label "country code"@en . - a owl:DatatypeProperty; + a owl:DatatypeProperty; rdfs:domain ; rdfs:range xsd:float ; rdfs:comment "This property specifies the latitude of a geo."@en; rdfs:label "latitude"@en . - a owl:DatatypeProperty; + a owl:DatatypeProperty; rdfs:domain ; rdfs:range xsd:float ; rdfs:comment "This property specifies the longitude of a geo."@en; diff --git a/semopenalex-app/config/namespaces.prop b/semopenalex-app/config/namespaces.prop index 1067d30..b5f9a40 100644 --- a/semopenalex-app/config/namespaces.prop +++ b/semopenalex-app/config/namespaces.prop @@ -3,3 +3,6 @@ dct = http://purl.org/dc/terms/ foaf = http://xmlns.com/foaf/0.1/ fabio = http://purl.org/spar/fabio/ soa = https://semopenalex.org/ontology/ +wgs = http://www.w3.org/2003/01/geo/wgs84_pos# +dbpedia-owl = https://dbpedia.org/ontology/ +dbprop = https://dbpedia.org/property/ diff --git a/transformation-scripts/semopenalex-institutions.py b/transformation-scripts/semopenalex-institutions.py index 711d9d3..6a527c4 100644 --- a/transformation-scripts/semopenalex-institutions.py +++ b/transformation-scripts/semopenalex-institutions.py @@ -158,9 +158,9 @@ def clean_url(nameStr): city_predicate = URIRef("https://dbpedia.org/property/city") region_predicate = URIRef("https://dbpedia.org/property/region") country_predicate = URIRef("https://dbpedia.org/property/country") -country_code_geo_predicate = URIRef("http://www.geonames.org/ontology#countryCode") -lat_geo_predicate = URIRef("http://www.geonames.org/ontology#lat") -long_geo_predicate = URIRef("http://www.geonames.org/ontology#long") +country_code_geo_predicate = URIRef("https://dbpedia.org/property/countryCode") +lat_geo_predicate = URIRef("http://www.w3.org/2003/01/geo/wgs84_pos#lat") +long_geo_predicate = URIRef("http://www.w3.org/2003/01/geo/wgs84_pos#long") associated_institution_predicate = URIRef("https://semopenalex.org/ontology/hasAssociatedInstitution") year_predicate = URIRef("https://semopenalex.org/ontology/year") @@ -302,22 +302,18 @@ def clean_url(nameStr): if not geo_city is None: institutions_graph.add((geo_uri,city_predicate,Literal(geo_city,datatype=XSD.string))) + geo_country_code = institution_geo['country_code'] + if not geo_country_code is None: + institutions_graph.add((geo_uri,country_code_geo_predicate,Literal(geo_country_code,datatype=XSD.string))) + geo_geonames_city_id = institution_geo['geonames_city_id'] if not geo_geonames_city_id is None: - institutions_graph.add((geo_uri,geoname_id_predicate,Literal(geo_geonames_city_id,datatype=XSD.string))) + institutions_graph.add((geo_uri, OWL.sameAs, URIRef('https://sws.geonames.org/' + geo_geonames_city_id))) geo_region = institution_geo['region'] if not geo_region is None: institutions_graph.add((geo_uri,region_predicate,Literal(geo_region,datatype=XSD.string))) - geo_country_code = institution_geo['country_code'] - if not geo_country_code is None: - institutions_graph.add((geo_uri,country_code_geo_predicate,Literal(geo_country_code,datatype=XSD.string))) - - geo_country = institution_geo['country'] - if not geo_country is None: - institutions_graph.add((geo_uri,country_predicate,Literal(geo_country,datatype=XSD.string))) - geo_latitude = institution_geo['latitude'] if not geo_latitude is None: institutions_graph.add((geo_uri,lat_geo_predicate,Literal(geo_latitude,datatype=XSD.float))) @@ -326,6 +322,9 @@ def clean_url(nameStr): if not geo_longitude == None: institutions_graph.add((geo_uri,long_geo_predicate,Literal(geo_longitude,datatype=XSD.float))) + geo_country = institution_geo['country'] + if not geo_country is None: + institutions_graph.add((geo_uri,country_predicate,Literal(geo_country,datatype=XSD.string))) #international #to do