Skip to main content

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.

Release files for allennlp-semparse 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for allennlp-semparse 0.0.4
File Size Uploaded
allennlp_semparse-0.0.4.tar.gz 178.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for allennlp-semparse 0.0.4
File Interpreter ABI Platform
allennlp_semparse-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 405.7 kB

Release files / allennlp_semparse-0.0.4.tar.gz

Download URL allennlp_semparse-0.0.4.tar.gz
Size 178.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1e8842ac8520bd2bfd4ab089853489e4b4dc2372fb7b2c96a7da8f476eac977c
BLAKE2b-256 checksum
How to use checksums
0ff2c92271f0497016ce490327de9481349019219f354a917e065b8060d2e5e8
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / allennlp_semparse-0.0.4-py3-none-any.whl

Download URL allennlp_semparse-0.0.4-py3-none-any.whl
Size 227.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e2868e91a491d3ff9cfc5d8c89c23f754ee17a4ff25c1cfcc7335050526d145
BLAKE2b-256 checksum
How to use checksums
a84c4555fa0a033cdb47cd01d40b577cfa8d622e5c0b1546835cee29aa50e2b6
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page