Skip to main content

No project description provided

Project description

Actions Status

MWE Query

PyPI version

Run Locally

This will ask for the (local) BaseX-database to query.

pip install -r requirements.txt
python -m mwe_query

Use as Library

from mwe_query import Mwe
from alpino_query import parse_sentence

# the pronominal is marked with <>
sentence = 'iemand zal er <goed> voor staan'
mwe = Mwe(sentence)
# parse this sentence using Alpino
tree = parse_sentence(mwe.can_form)
mwe.set_tree(tree)

# This generates a list of MweQuery-objects
queries = mwe.generate_queries()

# precise = queries[0]
# near_miss = queries[1]
superset = queries[2]

print(superset.xpath)
# /node[..//node[@lemma="goed" and @pt="adj"] and ..//node[@lemma="staan" and @pt="ww"]]
print(superset.description)
# superset
print(superset.rank)
# 3

Upload to PyPi

pip install twine
python setup.py sdist
# this can be tested locally by creating a virtualenv and installing it:
# pip install dist/mwe-query-x.x.x.tar.gz
twine upload dist/*

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

mwe-query-0.0.5.tar.gz (35.8 kB view details)

Uploaded Source

File details

Details for the file mwe-query-0.0.5.tar.gz.

File metadata

  • Download URL: mwe-query-0.0.5.tar.gz
  • Upload date:
  • Size: 35.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for mwe-query-0.0.5.tar.gz
Algorithm Hash digest
SHA256 d4f028b64ca1afeffc7b7de16c97827fc48b3cf449a1debfdb4c424aad711098
MD5 eba2534bb197d3e71faf9bae848316f9
BLAKE2b-256 d8b980435aa5b7f56802a68bbd3bbb6e012855cdc4f85a86ee06c559d579a7a3

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