Skip to content

Commit

Permalink
annotation filters
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasakhilesh committed Oct 10, 2023
1 parent dbf5548 commit e42df3c
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 720 deletions.
59 changes: 58 additions & 1 deletion annotation properties/annotation_correction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,65 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 113,
"id": "9d1b49d1-74f4-4863-b23b-4b1604d498da",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# Find relevant annotation properties in file\n",
"\n",
"relevant_ann_l = []\n",
"with open('./WebProtege/digitrubber-full.ttl', 'r') as f:\n",
" for line in f.readlines():\n",
" if ' rdf:type owl:AnnotationProperty' in line:\n",
" relevant_ann_l.append(line.split(sep=' rdf:type owl:AnnotationProperty')[0])"
]
},
{
"cell_type": "code",
"execution_count": 115,
"id": "8169ae38-c7a6-4e12-bbf6-c7e3dc7c3656",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"(103, 103)"
]
},
"execution_count": 115,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(relevant_ann_l), len(set(relevant_ann_l))"
]
},
{
"cell_type": "code",
"execution_count": 123,
"id": "89db8211-9f56-4d07-a302-ba9ed712f2ef",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"with open('annotation properties/annotation_v8_no_duplicate.ttl', 'r') as f:\n",
" with open('./annotation properties/annotation_v8_no_duplicate_only_rel_ann.ttl', 'w') as fw:\n",
" for line in f.readlines():\n",
" if line.split(sep=' <http')[0] in relevant_ann_l:\n",
" fw.write(line)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c9f4c53a-3efe-4c56-86c7-05b7df2ec9fb",
"metadata": {},
"outputs": [],
"source": []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
@prefix : <http://purl.obolibrary.org/obo/digitrubber/digitrubber-full.owl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://purl.obolibrary.org/obo/digitrubber/digitrubber-full.owl> .

<http://purl.obolibrary.org/obo/digitrubber/digitrubber-full.owl> rdf:type owl:Ontology ;
owl:versionIRI <http://purl.obolibrary.org/obo/digitrubber/releases/2023-06-01/digitrubber-full.owl> ;
<http://omv.ontoware.org/2005/05/ontology#hasOntologySyntax> <http://www.w3.org/ns/formats/RDF_XML> ;
<http://purl.obolibrary.org/obo/IAO_0000700> <http://www.purl.org/OntoMeta/DigitRubber#1> ;
<http://purl.org/dc/elements/1.1/creator> <https://orcid.org/0000-0000-0000-0000> ;
<http://purl.org/dc/terms/bibliographicCitation> "TIB (2023): DigitRubber Ontology. An ontology demonstrating rich ontology for rubber extrusion. PURL: http://www.purl.org/OntoMeta/DigitRubberOntology."@en ;
<http://purl.org/dc/terms/contributor> <http://purl.obolibrary.org/obo/digitrubber/0000-0000-0000-0000> ;
<http://purl.org/dc/terms/created> "2023-06-01T08:05:00"^^xsd:dateTime ;
<http://purl.org/dc/terms/description> "DigitRubber Ontology"@en ;
<http://purl.org/dc/terms/format> <https://www.iana.org/assignments/media-types/application/rdf+xml> ;
<http://purl.org/dc/terms/license> <https://creativecommons.org/licenses/unspecified> ;
<http://purl.org/dc/terms/modified> "2023-09-26T10:19:00"^^xsd:dateTime ;
<http://purl.org/dc/terms/references> <https://zenodo.org/record/0000000> ;
<http://purl.org/dc/terms/subject> <https://purl.org/linsearch/fer> ;
<http://purl.org/dc/terms/title> "DigitRubber Ontology"@en ;
<http://purl.org/ontology/bibo/status> "active"@en ;
<http://purl.org/pav/derivedFrom> <http://www.purl.org/DigitRubberOntology/0.0.1> ;
<http://purl.org/vocab/vann/preferredNamespacePrefix> "DRO"^^xsd:string ;
<http://schema.org/funder> <https://ror.org/> ;
<http://schema.org/inLanguage> <https://id.loc.gov/vocabulary/iso639-2/eng> ;
<http://usefulinc.com/ns/doap#audience> "DigitRubber ontology has been developed for rubber extrusion"@en ;
<http://usefulinc.com/ns/doap#bug-database> <https://github.com/TIBHannover/DIGIT-RUBBER/issues> ;
<http://usefulinc.com/ns/doap#repository> <https://github.com/TIBHannover/DIGIT-RUBBER> ;
<http://www.geneontology.org/formats/oboInOwl#date> "01:06:2023 08:05" ;
<http://www.loc.gov/premis/rdf/v3/documentation> <https://tibhannover.github.io/DIGIT-RUBBER/> ;
owl:versionInfo "v2023-Sep-26" ;
<http://www.w3.org/ns/adms#versionNotes> "A description of changes between last version and current version of the ontology."@en ;
<http://www.w3.org/ns/dcat#distribution> <http://www.purl.org/OntoMeta/DigitRubber.owl> ;
<https://vocab.org/vann/example> <http://www.purl.org/OntoMeta/DigitRubber/docs/descriptionOfUse> ;
<https://w3id.org/mod#acronym> "DRO"^^xsd:string ;
<https://w3id.org/mod#competencyQuestion> <https://github.com/TIBHannover/DIGIT-RUBBER/tree/main/preliminary_data/Competeny%20Questions> ;
<https://w3id.org/mod#hasFormalityLevel> "The DigitRubber ontology aplies OWL2 EL (cf. https://www.w3.org/TR/2012/REC-owl2-profiles-20121211/#OWL_2_EL)"@en .

#################################################################
# Annotation properties
#################################################################



<http://purl.obolibrary.org/obo/BFO_0000179> <http://purl.obolibrary.org/obo/IAO_0000111> "BFO OWL specification label" .
<http://purl.obolibrary.org/obo/BFO_0000179> <http://purl.obolibrary.org/obo/IAO_0000111> "BFO OWL规范标签" .
<http://purl.obolibrary.org/obo/BFO_0000179> <http://purl.obolibrary.org/obo/IAO_0000115> "Relates an entity in the ontology to the name of the variable that is used to represent it in the code that generates the BFO OWL file from the lispy specification." .
Expand Down Expand Up @@ -1034,4 +1081,4 @@
<http://www.w3.org/2004/02/skos/core#closeMatch> <http://www.w3.org/2000/01/rdf-schema#label> "has close match" .
<http://www.w3.org/2004/02/skos/core#closeMatch> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://www.w3.org/2004/02/skos/core#mappingRelation> .
<http://www.w3.org/2004/02/skos/core#closeMatch> <http://www.w3.org/2004/02/skos/core#definition> "skos:closeMatch is used to link two concepts that are sufficiently similar that they can be used interchangeably in some information retrieval applications. In order to avoid the possibility of compound errors when combining mappings across more than two concept schemes, skos:closeMatch is not declared to be a transitive property." .
<http://purl.org/dc/terms/description> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
<http://purl.org/dc/terms/description> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> .
Loading

0 comments on commit e42df3c

Please sign in to comment.