From 91908a84e9df719ce26de3087ecf607406d43117 Mon Sep 17 00:00:00 2001 From: Cogan Shimizu Date: Sun, 4 Feb 2024 20:25:15 -0500 Subject: [PATCH] more code + sample data --- bookend/bookend.ipynb | 28 ++++++++-------------------- bookend/bookend.ttl | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 20 deletions(-) create mode 100644 bookend/bookend.ttl diff --git a/bookend/bookend.ipynb b/bookend/bookend.ipynb index f6be64f..0e7df22 100644 --- a/bookend/bookend.ipynb +++ b/bookend/bookend.ipynb @@ -176,7 +176,7 @@ { "cell_type": "code", "execution_count": 110, - "id": "06777a4d", + "id": "72a0bbbc", "metadata": {}, "outputs": [], "source": [ @@ -310,7 +310,7 @@ { "cell_type": "code", "execution_count": 115, - "id": "bce85dbf", + "id": "6ee5b89e", "metadata": {}, "outputs": [], "source": [ @@ -342,7 +342,7 @@ { "cell_type": "code", "execution_count": 116, - "id": "9cb7965a", + "id": "e55c53d1", "metadata": {}, "outputs": [], "source": [ @@ -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": [ diff --git a/bookend/bookend.ttl b/bookend/bookend.ttl new file mode 100644 index 0000000..e1eac39 --- /dev/null +++ b/bookend/bookend.ttl @@ -0,0 +1,35 @@ +@prefix : . +@prefix owl: . +@prefix rdf: . +@prefix xml: . +@prefix xsd: . +@prefix rdfs: . +@prefix polyr: . +@prefix poly-ont: . +@base . + + rdf:type owl:Ontology . + +################################################################# +# Classes +################################################################# + +### 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/resource#donny +polyr:donny rdf:type owl:NamedIndividual , + . + + +### Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z) https://github.com/owlcs/owlapi