Skip to main content

A framework for building semantic parsers (including neural module networks) with AllenNLP, built by the authors of AllenNLP

Project description

allennlp-semparse

Build status PyPI codecov

A framework for building semantic parsers (including neural module networks) with AllenNLP, built by the authors of AllenNLP

Installing

allennlp-semparse is available on PyPI. You can install through pip with

pip install allennlp-semparse

Supported datasets

  • ATIS
  • Text2SQL
  • NLVR
  • WikiTableQuestions

Supported models

  • Grammar-based decoding models, following the parser originally introduced in Neural Semantic Parsing with Type Constraints for Semi-Structured Tables. The models that are currently checked in are all based on this parser, applied to various datasets.
  • Neural module networks. We don't have models checked in for this yet, but DomainLanguage supports defining them, and we will add some models to the repo once papers go through peer review. The code is slow (batching is hard), but it works.

Tutorials

Coming sometime in the future... You can look at this old tutorial, but the part about using NLTK to define a grammar is outdated. Now you can use DomainLanguage to define a python executor, and we analyze the type annotations in the functions in that executor to automatically infer a grammar for you. It is much easier to use than it used to be. Until we get around to writing a better tutorial for this, the best way to get started using this is to look at some examples. The simplest is the Arithmetic language in the DomainLanguage test (there's also a bit of description in the DomainLanguage docstring). After looking at those, you can look at more complex (real) examples in the domain_languages module. Note that the executor you define can have learned parameters, making it a neural module network. The best place to get an example of that is currently this unfinished implementation of N2NMNs on the CLEVR dataset. We'll have more examples of doing this in the not-too-distant future.

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

allennlp_semparse-0.0.4.tar.gz (178.6 kB view details)

Uploaded Source

Built Distribution

allennlp_semparse-0.0.4-py3-none-any.whl (227.1 kB view details)

Uploaded Python 3

File details

Details for the file allennlp_semparse-0.0.4.tar.gz.

File metadata

  • Download URL: allennlp_semparse-0.0.4.tar.gz
  • Upload date:
  • Size: 178.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for allennlp_semparse-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1e8842ac8520bd2bfd4ab089853489e4b4dc2372fb7b2c96a7da8f476eac977c
MD5 d1c3d365af8067f5fc025e107fde786c
BLAKE2b-256 0ff2c92271f0497016ce490327de9481349019219f354a917e065b8060d2e5e8

See more details on using hashes here.

File details

Details for the file allennlp_semparse-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: allennlp_semparse-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 227.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for allennlp_semparse-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8e2868e91a491d3ff9cfc5d8c89c23f754ee17a4ff25c1cfcc7335050526d145
MD5 3cf6d89504c47f513cc0f3b89f926dfc
BLAKE2b-256 a84c4555fa0a033cdb47cd01d40b577cfa8d622e5c0b1546835cee29aa50e2b6

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