Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeming problems with generated ontology file #83

Open
Trevoke opened this issue Nov 5, 2024 · 4 comments
Open

Seeming problems with generated ontology file #83

Trevoke opened this issue Nov 5, 2024 · 4 comments

Comments

@Trevoke
Copy link

Trevoke commented Nov 5, 2024

Hello! Thanks again for this project, it's allowing me to explore my ability to reason about these things and try to define concepts so much better.

I've found a problem with the generated ontology as I try to iterate.

Before the generated code, here's hopefully all the possibly relevant clojure code:

;;; project.clj
(defproject pizza "0.0.1-SNAPSHOT"
  :description "An ontology for pizza"
  :dependencies [[uk.org.russet/tawny-owl "2.3.3"]]
  :main pizza.core

  :profiles
  {:light {:plugins [[nightlight/lein-nightlight "2.4.4"]]}}
  )

;;; src/pizza/core.clj
(ns pizza.core
  [:use [tawny.owl]]
  [:require [pizza.pizza]])


(defn -main [& args]
  (tawny.owl/save-ontology pizza.pizza/pizza "pizza.omn"))

;;; src/pizza/pizza.clj
(ns pizza.pizza
  (:require [tawny.owl :refer :all]
            [tawny.reasoner :as r]))


(defontology pizza
  :iri "http://mo.com/pizza")
;; And there's classes and stuff below but only things from the Take Wing tutorial

And I had issues loading the generated .omn file in Protege 5.6.4. Here's how I get around it when I generate a file:

## This file was created by Tawny-OWL
## It should not be edited by hand
Prefix: http://www.w3.org/2002/07/owl#: <http://www.purl.org/ontolink/tawny#>
Prefix: owl: <http://www.w3.org/2002/07/owl#>
Prefix: pizza: <http://mo.com/pizza#>
Prefix: rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Prefix: rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Prefix: xml: <http://www.w3.org/XML/1998/namespace>
Prefix: xsd: <http://www.w3.org/2001/XMLSchema#>
Prefix: : <http://mo.com/pizza>

Ontology: <http://mo.com/pizza>

Import: <http://www.purl.org/ontolink/tawny>

This chunk gave us some trouble. We had to do a few changes:

Fix 1

Remove

Prefix: http://www.w3.org/2002/07/owl#: <http://www.purl.org/ontolink/tawny#>

And replace in file
http://www.w3.org/2002/07/owl# with owl (except for prefix definition)

Fix 2

Remove

Import: <http://www.purl.org/ontolink/tawny>

Link seems dead.

Hopefully it's just something I'm doing wrong, but maybe there's something on your end?

@bartkl
Copy link

bartkl commented Mar 9, 2025

I stumbled upon the same issue. I am unsure if this repo is very actively maintained.

Thanks for your workaround though 👍

@phillord
Copy link
Owner

Sorry, didn't answer this at the time.

Can you try:

(defontology pizza
  :iri "http://mo.com/pizza"
  :noname true
  )

I thought a lot about whether I should add tawny specific to the generated ontology. In the end, I think, I came to the wrong conclusion and I should swap the default around.

In answer to the status of the repo, I maintain it when I can. Tawny is mostly feature complete though.

@bartkl
Copy link

bartkl commented Mar 11, 2025

In answer to the status of the repo, I maintain it when I can. Tawny is mostly feature complete though.

Good to know, thanks 🙂

@bartkl
Copy link

bartkl commented Mar 11, 2025

Can you try:

(defontology pizza
  :iri "http://mo.com/pizza"
  :noname true
  )

The :noname addition does indeed fix the issue, using the empty prefix as default.

I thought a lot about whether I should add tawny specific to the generated ontology. In the end, I think, I came to the wrong conclusion and I should swap the default around.

You mean so that this :noname behavior becomes default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants