Parse Input Text using One-or-More Ontology (OWL) files
Project description
Ontology Parser (owl-parser)
Use an Ontology model to parse unstructured text
Under the hood
This is the root level method.
The input parameters and return values have well-described data types.
def owl_parser(tokens: list,
ontology_name: str,
absolute_path: str) -> list:
Enforcer.is_list_of_dicts(tokens)
Enforcer.is_str(ontology_name)
FileIO.exists_or_error(absolute_path)
from owl_parser.multiquery.bp import FindOntologyData
from owl_parser.mutato.bp import MutatoAPI
finder = FindOntologyData(ontologies=[ontology_name],
absolute_path=absolute_path)
results = MutatoAPI(finder).swap(tokens)
Enforcer.is_list_of_dicts(results)
return results
Import
from owl_parser import owl_parser
Usage
results = owl_parser(
tokens,
ontology_name="<ontology-name>",
absolute_path="<absolute-path>")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
owl-parser-0.1.5.tar.gz
(38.6 kB
view hashes)
Built Distribution
owl_parser-0.1.5-py3-none-any.whl
(80.6 kB
view hashes)
Close
Hashes for owl_parser-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3ee43e041f7110c5315178d978f048e1f4287176211bbfe9ca51c5e67b3d2b9 |
|
MD5 | d554bf49db4a8bcf6299e2d946a5d950 |
|
BLAKE2b-256 | 3831f87512b85f750c1ca9ea092e24aeda2f9d61d8ddec848033850af5c2e1ed |