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.1.tar.gz (165.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

allennlp_semparse-0.0.1-py3-none-any.whl (222.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: allennlp_semparse-0.0.1.tar.gz
  • Upload date:
  • Size: 165.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8

File hashes

Hashes for allennlp_semparse-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9171f9f7d7ea50a3a5a6eeb5ec893ece8d5e78cd2e5f91f3d28cc919431ae531
MD5 6ca4c28e307d082cb102cb606f6a6363
BLAKE2b-256 6b1ee993b98fdc69de6178e9512fc50cfc6393bb73858f2cdb9c7b816b94df43

See more details on using hashes here.

File details

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

File metadata

  • Download URL: allennlp_semparse-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 222.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8

File hashes

Hashes for allennlp_semparse-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ea1c3cd7e05695b4c73036a04b3f30c63c33604f7685b7fa1965261cc28d3b8
MD5 f695a86ff5e983ef3fd7ae34f03434f1
BLAKE2b-256 a5cd124aa948f3af4164839832a561d37f04ed73985c4f3b7eb731f826a499a5

See more details on using hashes here.

Supported by

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