Skip to main content

Finite-state grammar compilation library

Reason this release was yanked:

post release

Project description

Pynini is a Python extension module which allows the user to compile, optimize, and apply grammar rules. Rules can be compiled into weighted finite state transducers, pushdown transducers, or multi-pushdown transducers. For general information and a detailed tutorial, see pynini.opengrm.org.

Pynini is primarily developed by Kyle Gorman with the help of contributors. If you use Pynini in your research, we would appreciate if you cite the following paper:

K. Gorman. 2016. Pynini: A Python library for weighted finite-state grammar compilation. In Proc. ACL Workshop on Statistical NLP and Weighted Automata, 75-80.

(Note that some of the code samples in the paper are now out of date and not expected to work.)

Dependencies

Pynini depends on:

  • A standards-compliant C++ 11 compiler (GCC >= 4.8 or Clang >= 700)
  • The most recent version of OpenFst (at the time of writing, 1.7.4) built with the far, pdt, mpdt, and script extensions (i.e., built with ./configure --enable-grm) and headers
  • Python 2.7 or 3.6+ and headers

It is tested with: Debian Linux 4.19.37 on x86_64, GCC 7.3.0, Cython 0.29.13 and Python 3.7.2.

Installation instructions

Execute python setup.py install. Depending on your environment, you may need to be superuser while running this command for installation to complete. To confirm successful installation, execute python setup.py test.

Pynini will be available from PyPi eventually. In the meantime, we do maintain a periodically updated read-only GitHub mirror which can be used to install the current version of the library by executing pip install -e git+git@github.com:kylebgorman/pynini.git#egg=pynini.

Python 3 support

Python 3 support is available as of Pynini 2.0.0.

License

Pynini is released under the Apache license. See LICENSE for more information.

Interested in contributing?

See CONTRIBUTING for more information.

Mandatory disclaimer

This is not an official Google product.

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

pynini-2.0.9.post2.tar.gz (536.6 kB view details)

Uploaded Source

File details

Details for the file pynini-2.0.9.post2.tar.gz.

File metadata

  • Download URL: pynini-2.0.9.post2.tar.gz
  • Upload date:
  • Size: 536.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for pynini-2.0.9.post2.tar.gz
Algorithm Hash digest
SHA256 d1989141894a3b76dfb9e88fe4e84fc21fb128a8a8be2b9f0833ba0aa610c223
MD5 16606856c96d097ee0251cc17638a196
BLAKE2b-256 5b5867dea899f0483b0f5efa7f094dcb97a580882972a22d118dc2590da1ce98

See more details on using hashes here.

Provenance

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