-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Command line interface example added and rdflib based ontology generated
- Loading branch information
Showing
3 changed files
with
110 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import unittest | ||
from owlapy.owl_ontology_manager import SyncOntologyManager, OntologyManager, RDFLibOntologyManager | ||
from owlapy.owl_ontology import SyncOntology, Ontology, RDFLibOntology | ||
from owlapy.owl_ontology import RDFLibOntology | ||
|
||
|
||
class TestOntology(unittest.TestCase): | ||
def test_counting(self): | ||
o_sync: SyncOntology | ||
o_sync = SyncOntologyManager().load_ontology(path="KGs/Family/father.owl") | ||
o_owlready: Ontology | ||
o_owlready = OntologyManager().load_ontology(path="KGs/Family/father.owl") | ||
o_rdf: RDFLibOntology | ||
o_rdf = RDFLibOntologyManager().load_ontology(path="KGs/Family/father.owl") | ||
|
||
assert len({i for i in o_sync.get_tbox_axioms()})==len({i for i in o_rdf.get_tbox_axioms()}) | ||
assert len({i for i in o_sync.get_abox_axioms()})==len({i for i in o_rdf.get_abox_axioms()}) |