Skip to main content

qante - Query ANnotated TExt

Project description

Motivation

Extracting the highly-valuable data from unstructured text often results in hard-to-read, brittle, difficult-to-maintain code. The problem is that using regular expressions directly embedded in the program control flow does not provide the best level of abstraction. We propose a query language (based on the tuple relational calculus) that facilitates data extraction. Developers can explicitly express their intent declaratively, making their code much easier to write, read, and maintain.

Solution

This package allows programmers to express what they are searching for by using higher-level concepts to express their query as tags, locations, and expressions on location relations.

The location of a string of characters within the document is the interval defining its starting and ending position.

Locations are grouped into sets named by tags. Tags can be used in conjunctions and disjunctions of interval relations to query for tuples of locations.

Documentation

We invite you to view our YouTube video of our presentation from the Playlist for PyData Global 2022.

We presented this material from our GitHub repo:

Use one of these pip or python commands (rev 3 or above) to install from PyPI:

pip install qante
python -m pip install qante

Use python docstrings for API Documentation:

python    # rev 3 or above
  from quante.tagger import Tagger
  from quante.query import Query
  from quante import loctuple as lt
  from quant.table import get_table

  help(Tagger)    # annotate text with tags using tagRE('tagname', regexp)
  help(Query)     # Syntax for querying annotated text
  help(lt)        # Predicates used by queries
  help(get_table) # extract table (as dictionaries) from text

See also: “API Documentation” at the end of our jupyter notebook.

We welcome your questions by electronic mail at: qante{at}asgard.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qante-0.0.5.tar.gz (30.3 kB view details)

Uploaded Source

File details

Details for the file qante-0.0.5.tar.gz.

File metadata

  • Download URL: qante-0.0.5.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.10.0 pkginfo/1.2.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.9

File hashes

Hashes for qante-0.0.5.tar.gz
Algorithm Hash digest
SHA256 55cbf90454f36c0c9a67c1bfafbaa82ffad30e90b37c53919576db5ce7db6e4f
MD5 76e0dbd95008d7ab88463c44240a6d79
BLAKE2b-256 2c19ce6a7965ab4fe65079e2136d7d17773cba5a9daa1e0165d086469948f2d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page