Skip to content

Commit

Permalink
more code + sample data
Browse files Browse the repository at this point in the history
  • Loading branch information
cogan-shimizu committed Feb 5, 2024
1 parent d3fd911 commit 91908a8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 20 deletions.
28 changes: 8 additions & 20 deletions bookend/bookend.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
{
"cell_type": "code",
"execution_count": 110,
"id": "06777a4d",
"id": "72a0bbbc",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -310,7 +310,7 @@
{
"cell_type": "code",
"execution_count": 115,
"id": "bce85dbf",
"id": "6ee5b89e",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -342,7 +342,7 @@
{
"cell_type": "code",
"execution_count": 116,
"id": "9cb7965a",
"id": "e55c53d1",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -393,31 +393,19 @@
},
{
"cell_type": "code",
"execution_count": 119,
"id": "6cf822fb",
"execution_count": 120,
"id": "95c8782e",
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'g' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn [119], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m output_file \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124moutput.ttl\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m----> 2\u001b[0m temp \u001b[38;5;241m=\u001b[39m \u001b[43mg\u001b[49m\u001b[38;5;241m.\u001b[39mserialize(\u001b[38;5;28mformat\u001b[39m\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mturtle\u001b[39m\u001b[38;5;124m\"\u001b[39m, encoding\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mutf-8\u001b[39m\u001b[38;5;124m\"\u001b[39m, destination\u001b[38;5;241m=\u001b[39moutput_file)\n",
"\u001b[0;31mNameError\u001b[0m: name 'g' is not defined"
]
}
],
"outputs": [],
"source": [
"output_file = \"output.ttl\"\n",
"temp = g.serialize(format=\"turtle\", encoding=\"utf-8\", destination=output_file)"
"temp = graph.serialize(format=\"turtle\", encoding=\"utf-8\", destination=output_file)"
]
},
{
"cell_type": "code",
"execution_count": 118,
"id": "360c8e23",
"id": "4fc488fe",
"metadata": {},
"outputs": [],
"source": [
Expand Down
35 changes: 35 additions & 0 deletions bookend/bookend.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@prefix : <https://polyneme.xyz/bookend#> .
@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#> .
@prefix polyr: <https://polyneme.xyz/lod/resource#> .
@prefix poly-ont: <https://polyneme.xyz/lod/onotlogy#> .
@base <https://polyneme.xyz/bookend> .

<https://polyneme.xyz/bookend> rdf:type owl:Ontology .

#################################################################
# Classes
#################################################################

### https://polyneme.xyz/lod/ontology#Person
<https://polyneme.xyz/lod/ontology#Person> rdf:type owl:Class .


#################################################################
# Individuals
#################################################################

### https://polyneme.xyz/lod/resource#cogan
polyr:cogan rdf:type owl:NamedIndividual ,
<https://polyneme.xyz/lod/ontology#Person> .


### https://polyneme.xyz/lod/resource#donny
polyr:donny rdf:type owl:NamedIndividual ,
<https://polyneme.xyz/lod/ontology#Person> .


### Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z) https://github.com/owlcs/owlapi

0 comments on commit 91908a8

Please sign in to comment.