mowl.corpus

Corpus

mowl.corpus.base.extract_and_save_axiom_corpus(ontology, out_file, mode='w')[source]

Method to extract axioms of a particular ontology and save it into a file.

Parameters:
  • ontology (org.semanticweb.owlapi.model.OWLOntology) – Input ontology.

  • out_file (str) – File path to save the extracted axioms.

  • mode (str, optional) – mode for opening the out_file, defaults to “w”

mowl.corpus.base.extract_axiom_corpus(ontology)[source]

Method to extract axioms of a particular ontology. Similar to extract_and_save_axiom_corpus() but this method returns a list instead saving into a file.

Parameters:

ontology (org.semanticweb.owlapi.model.OWLOntology) – Input ontology.

Return type:

list[str]

mowl.corpus.base.extract_and_save_annotation_corpus(ontology, out_file, mode='w')[source]

This method generates a textual representation of the annotation axioms in an ontology following the Manchester Syntax.

Parameters:
  • ontology (org.semanticweb.owlapi.model.OWLOntology) – OWL ontology from which the annotations will be extracted.

  • out_file (str) – File path to save the extracted annotations.

  • mode (str ,optional) – mode for opening the out_file, defaults to “w”

mowl.corpus.base.extract_annotation_corpus(ontology)[source]

This method generates a textual representation of the annotation axioms in an ontology following the Manchester Syntax. Similar to extract_and_save_annotation_corpus() but this method returns a list instead saving into a file.

Parameters:

ontology (org.semanticweb.owlapi.model.OWLOntology) – Input ontology

Return type:

list[str]