🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

owl-parser

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

owl-parser

Parse Input Text using One-or-More Ontology (OWL) files

0.1.18
PyPI
Maintainers
1

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_finder.multiquery.bp import FindOntologyData
    from owl_parser.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>")

Keywords

nlp

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts