owl-parser


Nameowl-parser JSON
Version 0.1.18 PyPI version JSON
download
home_pagehttps://github.com/craigtrim/owl-parser
SummaryParse Input Text using One-or-More Ontology (OWL) files
upload_time2023-01-07 07:18:54
maintainerCraig Trim
docs_urlNone
authorCraig Trim
requires_python>=3.8.5,<4.0.0
licenseNone
keywords nlp nlu text classify classification
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.
```python
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
```python
from owl_parser import owl_parser
```

## Usage
```python
results = owl_parser(
    tokens,
    ontology_name="<ontology-name>",
    absolute_path="<absolute-path>")

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/craigtrim/owl-parser",
    "name": "owl-parser",
    "maintainer": "Craig Trim",
    "docs_url": null,
    "requires_python": ">=3.8.5,<4.0.0",
    "maintainer_email": "craigtrim@gmail.com",
    "keywords": "nlp,nlu,text,classify,classification",
    "author": "Craig Trim",
    "author_email": "craigtrim@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/13/fe/065eee68df542e4891f413821fa2c73f95b5ccb90d78382eb34e298a562b/owl-parser-0.1.18.tar.gz",
    "platform": null,
    "description": "# Ontology Parser (owl-parser)\nUse an Ontology model to parse unstructured text\n\n## Under the hood\nThis is the root level method.\n\nThe input parameters and return values have well-described data types.\n```python\ndef owl_parser(tokens: list,\n               ontology_name: str,\n               absolute_path: str) -> list:\n\n    Enforcer.is_list_of_dicts(tokens)\n    Enforcer.is_str(ontology_name)\n    FileIO.exists_or_error(absolute_path)\n\n    from owl_finder.multiquery.bp import FindOntologyData\n    from owl_parser.bp import MutatoAPI\n\n    finder = FindOntologyData(ontologies=[ontology_name],\n                              absolute_path=absolute_path)\n\n    results = MutatoAPI(finder).swap(tokens)\n    Enforcer.is_list_of_dicts(results)\n\n    return results\n```\n\n## Import\n```python\nfrom owl_parser import owl_parser\n```\n\n## Usage\n```python\nresults = owl_parser(\n    tokens,\n    ontology_name=\"<ontology-name>\",\n    absolute_path=\"<absolute-path>\")\n",
    "bugtrack_url": null,
    "license": "None",
    "summary": "Parse Input Text using One-or-More Ontology (OWL) files",
    "version": "0.1.18",
    "split_keywords": [
        "nlp",
        "nlu",
        "text",
        "classify",
        "classification"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "29b74de6ebe0527834bf2019b7e14450ba7ea2157627ee78f7a021da4de7f452",
                "md5": "71d3d99c043ac8a1d9dfa8c156b911b8",
                "sha256": "00cee8d50292fadb991db1e222acd97d3c860a48ea20119eacaefb9bf52994db"
            },
            "downloads": -1,
            "filename": "owl_parser-0.1.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "71d3d99c043ac8a1d9dfa8c156b911b8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.5,<4.0.0",
            "size": 28993,
            "upload_time": "2023-01-07T07:18:56",
            "upload_time_iso_8601": "2023-01-07T07:18:56.174162Z",
            "url": "https://files.pythonhosted.org/packages/29/b7/4de6ebe0527834bf2019b7e14450ba7ea2157627ee78f7a021da4de7f452/owl_parser-0.1.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "13fe065eee68df542e4891f413821fa2c73f95b5ccb90d78382eb34e298a562b",
                "md5": "73cc67cab1ed5b7456302479a64e6d53",
                "sha256": "c48c3de04636eb90d6215f449f5564919d99d16070c16e7df3a981a730966ae9"
            },
            "downloads": -1,
            "filename": "owl-parser-0.1.18.tar.gz",
            "has_sig": false,
            "md5_digest": "73cc67cab1ed5b7456302479a64e6d53",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.5,<4.0.0",
            "size": 13577,
            "upload_time": "2023-01-07T07:18:54",
            "upload_time_iso_8601": "2023-01-07T07:18:54.506607Z",
            "url": "https://files.pythonhosted.org/packages/13/fe/065eee68df542e4891f413821fa2c73f95b5ccb90d78382eb34e298a562b/owl-parser-0.1.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-07 07:18:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "craigtrim",
    "github_project": "owl-parser",
    "lcname": "owl-parser"
}
        
Elapsed time: 0.02968s