From 1d4f19d0202a21f0eba71b1c9dbdece4f8c60632 Mon Sep 17 00:00:00 2001 From: ChipNowacek Date: Thu, 23 Mar 2017 19:57:16 -0400 Subject: [PATCH] My greatest concern has to do with the reordering of the comment lines with code. I made the changes because they felt most natural, that is, they feel more like what I see in the REPL. As I only hope to help, ignore that which doesn't. --- adoc/answers.adoc | 4 ++-- adoc/questions.adoc | 2 +- notes.org | 2 +- src/tawny/tutorial/amino_acid_build.clj | 20 ++++++++++---------- src/tawny/tutorial/amino_acid_pattern.clj | 8 +++----- src/tawny/tutorial/amino_acid_props.clj | 2 +- src/tawny/tutorial/amino_acid_tree.clj | 8 ++++---- src/tawny/tutorial/autosave.clj | 6 +++--- src/tawny/tutorial/core.clj | 6 +++--- src/tawny/tutorial/features.clj | 9 ++++----- src/tawny/tutorial/read_abc.clj | 8 ++++---- src/tawny/tutorial/whats_in_a_name.clj | 12 ++++++------ 12 files changed, 42 insertions(+), 45 deletions(-) diff --git a/adoc/answers.adoc b/adoc/answers.adoc index 12a9993..1b16e6d 100644 --- a/adoc/answers.adoc +++ b/adoc/answers.adoc @@ -232,7 +232,7 @@ endif::backend-slidy[] * OBO ontologies use numeric IDs * These are unreadable, so we syntactically transform labels -* If label changes (but ID remains the same) is a problem +* If label changes (but ID remains the same) it's a problem * Can use `tawny.memorize` to remember mappings * Which adds aliases to those now missing (with optional "deprecated" warnings) @@ -368,7 +368,7 @@ endif::backend-slidy[] * Added in Tawny-OWL and the Music Ontology * We now have software that plays a tune * And provides OWL metadata about that tune -* More to investigate here. +* More to investigate here ifndef::backend-slidy[] [NOTE] diff --git a/adoc/questions.adoc b/adoc/questions.adoc index 6fe5016..266c4d7 100644 --- a/adoc/questions.adoc +++ b/adoc/questions.adoc @@ -26,7 +26,7 @@ - What about advanced documentation for ontologies? - How do I collaboratively develop my ontology? - Can I internationalise my ontology? -- Can I scaffolding my ontology from existing sources? +- Can I scaffold my ontology from existing sources? - What happens if the labels of read ontologies change? - How do you convert an existing ontology to Tawny-OWL? - How fast is Tawny-OWL? diff --git a/notes.org b/notes.org index afa4946..2ad4c35 100644 --- a/notes.org +++ b/notes.org @@ -227,7 +227,7 @@ And I can't do the single slide thing. - How do you continously integrate your ontology? - What about advanced documentation for ontologies? - Can I internationalise my ontology? - - Can I scaffolding your ontology from existing sources? + - Can I scaffold my ontology from existing sources? - What happens if the labels of read ontologies change? - How do you convert an existing ontology to Tawny? - How fast is tawny? diff --git a/src/tawny/tutorial/amino_acid_build.clj b/src/tawny/tutorial/amino_acid_build.clj index a9d4043..511818c 100644 --- a/src/tawny/tutorial/amino_acid_build.clj +++ b/src/tawny/tutorial/amino_acid_build.clj @@ -201,7 +201,7 @@ ;; ---- (defmacro defaminoacids [& definitions] - `(tawny.pattern/intern-owl-entities + '(tawny.pattern/intern-owl-entities (apply amino-acids (tawny.util/name-tree ~definitions)))) ;; ---- @@ -399,8 +399,8 @@ ;; ---- (reasoner-factory :hermit) -;; => true (consistent?) +;; => true ;; ---- ;; ifndef::backend-slidy[] @@ -420,18 +420,18 @@ ;; == Reasoning -;; * When reasoning, working what happened can be tough +;; * When reasoning, working out what happened can be tough ;; * Especially when using a "Textual User Interface" ;; * But, we can count numbers ;; * We have reasoned many subclases of `AminoAcid` ;; [source,lisp] ;; ---- -;; => 20 (count (subclasses AminoAcid)) +;; => 20 -;; => 451 (count (isubclasses AminoAcid)) +;; => 451 ;; ---- ;; ifndef::backend-slidy[] @@ -446,17 +446,17 @@ ;; == Reasoning -;; * While we consistent, we are not coherent +;; * While we are consistent, we are not coherent ;; * In fact, we have many unsatisfiable classes ;; * What is happening? ;; [source,lisp] ;; ---- -;; => false (coherent?) +;; => false -;; => 242 (count (unsatisfiable)) +;; => 242 ;; ---- ;; == Visualising @@ -524,9 +524,9 @@ ;; [source,lisp] ;; ---- -;; => 242 (count (isubclasses SmallAminoAcid)) +;; => 242 ;; ---- ;; == As a query @@ -536,11 +536,11 @@ ;; [source,lisp] ;; ---- -;; => 0 (count (filter #(not (.isDefined % aabuild)) (isubclasses SmallAminoAcid))) +;; => 0 ;; ---- diff --git a/src/tawny/tutorial/amino_acid_pattern.clj b/src/tawny/tutorial/amino_acid_pattern.clj index 37934ba..31b0135 100644 --- a/src/tawny/tutorial/amino_acid_pattern.clj +++ b/src/tawny/tutorial/amino_acid_pattern.clj @@ -95,10 +95,8 @@ ;; ObjectProperty: aa:hasSize ;; Domain: ;; aa:AminoAcid - ;; Range: ;; aa:Size - ;; Characteristics: ;; Functional @@ -149,14 +147,14 @@ :super (facet Positive Hydrophilic Polar Aliphatic Large)) (defclass Asparagine - :super (facet Neutral Hydrophilic Polar Aliphatic Small)) + :super (facet Neutral Hydrophilic Polar Aliphatic Small))) ;; and the rest - ) + ;; ---- ;; == Task {task}: Conclusions ;; * Tawny-OWL directly supports the value partition ;; * This integrates with facets -;; * Together, can simply this (very common) form of ontology +;; * Together, can simplify this (very common) form of ontology diff --git a/src/tawny/tutorial/amino_acid_props.clj b/src/tawny/tutorial/amino_acid_props.clj index 040895e..5e89ac0 100644 --- a/src/tawny/tutorial/amino_acid_props.clj +++ b/src/tawny/tutorial/amino_acid_props.clj @@ -148,7 +148,7 @@ ;; * We can now create our amino acids using these three sizes ;; * We only create three amino acids here -;; * More would be needed. +;; * More would be needed ;; [source,lisp] ;; ---- diff --git a/src/tawny/tutorial/amino_acid_tree.clj b/src/tawny/tutorial/amino_acid_tree.clj index c44ec48..cae6db5 100644 --- a/src/tawny/tutorial/amino_acid_tree.clj +++ b/src/tawny/tutorial/amino_acid_tree.clj @@ -144,9 +144,9 @@ (defclass Alanine) (defclass Arginine) - (defclass Asparagine) + (defclass Asparagine)) ;; and the rest... - ) + ;; ---- ;; ifndef::backend-slidy[] @@ -183,9 +183,9 @@ (defclass Alanine) (defclass Arginine) - (defclass Asparagine) + (defclass Asparagine)) ;; and the rest... - ) + ;; ---- ;; ifndef::backend-slidy[] diff --git a/src/tawny/tutorial/autosave.clj b/src/tawny/tutorial/autosave.clj index a48838d..c431b75 100644 --- a/src/tawny/tutorial/autosave.clj +++ b/src/tawny/tutorial/autosave.clj @@ -95,9 +95,9 @@ "Autosave the current ontology everytime any change happens." ([o filename format] (let [listener (proxy [org.semanticweb.owlapi.model.OWLOntologyChangeListener] - [] - (ontologiesChanged[l] - (o/save-ontology o filename format)))] + [] + (ontologiesChanged[l] + (o/save-ontology o filename format)))] (reset! auto-save-listener listener) (.addOntologyChangeListener (o/owl-ontology-manager) listener) diff --git a/src/tawny/tutorial/core.clj b/src/tawny/tutorial/core.clj index 377d191..17cf202 100644 --- a/src/tawny/tutorial/core.clj +++ b/src/tawny/tutorial/core.clj @@ -6,9 +6,9 @@ amino-acid-tree amino-acid-props amino-acid-pattern whats-in-a-name use-abc read-abc amino-acid-build - autosave amino-acid-sio] - ) - ) + autosave amino-acid-sio])) + + (defonce output-file-path "./output/") diff --git a/src/tawny/tutorial/features.clj b/src/tawny/tutorial/features.clj index cfbae4d..26b8b04 100644 --- a/src/tawny/tutorial/features.clj +++ b/src/tawny/tutorial/features.clj @@ -358,7 +358,7 @@ ;; == Broadcasting ;; * Tawny-OWL does something similar -;; * `owl-some` expand to *two* existential restrictions +;; * `owl-some` expands to *two* existential restrictions ;; [source,lisp] ;; ---- @@ -411,7 +411,6 @@ ;; [source,omn] ;; ---- ;; Class: o:D - ;; SubClassOf: ;; o:r some o:A, ;; o:r some o:B, @@ -500,13 +499,13 @@ (defclass F :equivalent (owl-some r (owl-or A B))) -;; #{} (subclasses F) +;; #{} (reasoner-factory :hermit) -;; #{C D E} (isubclasses F) +;; #{C D E} ;; ---- ;; ifndef::backend-slidy[] @@ -565,7 +564,7 @@ ;; * Editing ;; ** IDEs: Eclipse, IntelliJ, Netbeans -;; ** Power Editors: Emacs, Vim, Sublime +;; ** Power Editors: Emacs, Vim, Sublime, Cursive (via IntelliJ) ;; ** Web Editors: Catnip, GorrilaRepl ;; ** Novel: LightTable diff --git a/src/tawny/tutorial/read_abc.clj b/src/tawny/tutorial/read_abc.clj index fbb791e..4e4298c 100644 --- a/src/tawny/tutorial/read_abc.clj +++ b/src/tawny/tutorial/read_abc.clj @@ -7,9 +7,9 @@ ;; * We showed that we can import existing Tawny-OWL ontologies ;; * By using and importing the relevant namespace -;; * In order for this to work, we need the Tawny-OWL source code -;; * What if we do not have it? -;; * Or worse, what if it does not exist? +;; * In order for this to work, we need the ontologies defined using Tawny-OWL +;; * What if they aren't? +;; * What if all we have are ontologies defined in other languages? ;; * Tawny-OWL supports this ;; ifndef::backend-slidy[] @@ -33,7 +33,7 @@ ;; * As usual, we declare the namespace ;; * It is different -;; * `Require` the `tawny.owl` and `tawny.read` +;; * `require` the `tawny.owl` and `tawny.read` ;; * Have access to the symbols but do not import them into the local ;; namespace ;; * Ensures that the namespace has nothing else in it diff --git a/src/tawny/tutorial/whats_in_a_name.clj b/src/tawny/tutorial/whats_in_a_name.clj index 0a9d1b3..981fc26 100644 --- a/src/tawny/tutorial/whats_in_a_name.clj +++ b/src/tawny/tutorial/whats_in_a_name.clj @@ -130,9 +130,9 @@ ;; ---- (defontology o) -;; => #> (defclass A :ontology o) +;; => #> ;; ---- ;; * Generates a random UUID @@ -172,9 +172,9 @@ (defontology i :iri "http://www.w3id.org/ontolink/example/i") -;; => #> (defclass B :ontology i) +;; => #> ;; ---- ;; == Symbols and IRIs @@ -194,9 +194,9 @@ "#" (s/reverse name))))) -;; => #> (defclass CDE :ontology r) +;; => #> ;; ---- ;; ifndef::backend-slidy[] @@ -254,17 +254,17 @@ ;; [source,lisp] ;; ---- -;; => #> (defclass F :ontology obo) +;; => #> -;; => #> (defclass G :ontology obo) +;; => #> -;; => #> (defoproperty ro :ontology obo) +;; => #> ;; ---- ;; ifndef::backend-slidy[]