**Version 2.1.6 is now available for download.**

Pynini is now available on conda-forge. Users users who already have Conda can install Pynini and all dependencies using the following command: `conda install -c conda-forge pynini`

Pynini can now be used from a Colab notebook, as shown here. Add the following to the top of your notebook: `!pip install --only-binary :all: pynini`

When using Pynini from a Colab notebook, logging and error messages sent to standard error are lost. To recover them, install `wurlitzer`

(e.g., `!pip install wurlitzer`

) and then add the following at the top of your notebook: `%load_ext wurlitzer`

*OpenGrm* *Pynini*, like Thrax, compiles grammars expressed as strings, regular expressions, and context-dependent rewrite rules into weighted finite-state transducers. It uses the OpenFst library and its Python extension to create, access and manipulate compiled grammars. Pynini is embedded in a Python module, allowing users to write Thrax-like grammars using Python's flexible syntax (including imperative programming constructs not available in Thrax) and powerful toolchain.

It is (loosely) named after Pāṇini (पाणिनि), the renowned Sanskrit grammarian.

- Download
- Documentation
- C++ API documentation (for advanced users):

If you use this library in your research, we would appreciate it if you cited one of:

- K. Gorman. 2016. Pynini: A Python library for weighted finite-state grammar compilation. In
*Proceedings of the ACL Workshop on Statistical NLP and Weighted Automata*, pages 75-80. - K. Gorman & R. Sproat. 2021.
*Finite-State Text Processing*. Morgan & Claypool.

Third-party information about the library:

Topic revision: r81 - 2024-06-07 - KyleGorman

Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Ideas, requests, problems regarding TWiki? Send feedback

Ideas, requests, problems regarding TWiki? Send feedback