pynini


Namepynini JSON
Version 2.1.6 PyPI version JSON
download
home_pagehttp://pynini.opengrm.org
SummaryFinite-state grammar compilation
upload_time2024-01-13 05:20:20
maintainer
docs_urlNone
authorKyle Gorman <kbg@google.com>
requires_python>=3.6
licenseApache 2.0
keywords computational linguistics morphology natural language processing language
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OpenGrm Pynini

This is a a Python extension module for compiling, optimizing and applying
grammar rules. Rules can be compiled into weighted finite state transducers,
pushdown transducers, or multi-pushdown transducers. It uses OpenFst
finite-state transducers (FSTs) and FST archives (FArs) as inputs and outputs.

This library is primarily developed by [Kyle Gorman](mailto:kbg@google.com).

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](http://openfst.cs.nyu.edu/twiki/pub/GRM/Pynini/pynini-paper.pdf).
> 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

-   A standards-compliant C++17 compiler (GCC \>= 7 or Clang \>= 700)
-   The compatible recent version of [OpenFst](http://openfst.org) (see
    [`NEWS`](NEWS) for this) built with the `grm` extensions (i.e., built with
    `./configure --enable-grm`) and headers
-   [Python 3.7+](https://www.python.org) and headers

## Installation instructions

There are various ways to install Pynini depending on your platform.

### Windows

While Pynini is neither designed for nor tested on Windows, it can be installed
using the
[Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
(WSL). Simply enter the WSL environment and follow the Linux instructions below.

### MacOS

The pre-compiled library can be installed from
[`conda-forge`](https://conda-forge.org/) by running `conda install -c
conda-forge pynini`.

Alternatively, one can build from source from [PyPI](https://pypi.org/) by
running `pip install pynini`.

Finally, one can use [Bazel](https://bazel.build) to build from source by
running `bazel build //:all` anywhere in the source tree.

### Linux

The pre-compiled library can be installed from
[`conda-forge`](https://conda-forge.org/) by running `conda install -c
conda-forge pynini`.

Alternatively, one can install a pre-compiled
[`manylinux`](https://github.com/pypa/manylinux) wheel from
[PyPI](https://pypi.org/) by running `pip install pynini`. This will install the
pre-compiled `manylinux` wheel (if available for the release and compatible with
your platform), and build and install from source if not. Unlike the
`conda-forge` option above, which also installs [OpenFst](http://openfst.org/)
and [Graphviz](https://graphviz.org/), this does not install the OpenFst or
Graphviz command-line tools. See the enclosed
[`Dockerfile`](third_party/Dockerfile) for instructions for building and
deploying `manylinux` wheels.

Finally, one can use [Bazel](https://bazel.build) to build from source by
running `bazel build //:all` anywhere in the source tree.

## Testing

To confirm successful installation, run `pip install -r requirements`, then
`python tests/pynini_test.py`. If all tests pass, the final line will read `OK`;
a successful run will log some errors to STDERR (this is working as expected).

## Python version support

Pynini 2.0.0 and onward support Python 3. Pynini 2.1 versions (onward) drop
Python 2 support. The current release supports Python 3.6--3.12.

# License

Pynini is released under the Apache license. See [`LICENSE`](LICENSE) for more
information.

# Interested in contributing?

See [`CONTRIBUTING`](CONTRIBUTING) for more information.

# Mandatory disclaimer

This is not an official Google product.

            

Raw data

            {
    "_id": null,
    "home_page": "http://pynini.opengrm.org",
    "name": "pynini",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "computational linguistics,morphology,natural language processing,language",
    "author": "Kyle Gorman <kbg@google.com>",
    "author_email": "kbg@google.com",
    "download_url": "https://files.pythonhosted.org/packages/9b/69/4b59968b0fd351a153d7a3c2feaa6e7514c903c063bbd7f7e1e3f1c079b0/pynini-2.1.6.tar.gz",
    "platform": null,
    "description": "# OpenGrm Pynini\n\nThis is a a Python extension module for compiling, optimizing and applying\ngrammar rules. Rules can be compiled into weighted finite state transducers,\npushdown transducers, or multi-pushdown transducers. It uses OpenFst\nfinite-state transducers (FSTs) and FST archives (FArs) as inputs and outputs.\n\nThis library is primarily developed by [Kyle Gorman](mailto:kbg@google.com).\n\nIf you use Pynini in your research, we would appreciate if you cite the\nfollowing paper:\n\n> K. Gorman. 2016.\n> [Pynini: A Python library for weighted finite-state grammar compilation](http://openfst.cs.nyu.edu/twiki/pub/GRM/Pynini/pynini-paper.pdf).\n> In *Proc. ACL Workshop on Statistical NLP and Weighted Automata*, 75-80.\n\n(Note that some of the code samples in the paper are now out of date and not\nexpected to work.)\n\n## Dependencies\n\n-   A standards-compliant C++17 compiler (GCC \\>= 7 or Clang \\>= 700)\n-   The compatible recent version of [OpenFst](http://openfst.org) (see\n    [`NEWS`](NEWS) for this) built with the `grm` extensions (i.e., built with\n    `./configure --enable-grm`) and headers\n-   [Python 3.7+](https://www.python.org) and headers\n\n## Installation instructions\n\nThere are various ways to install Pynini depending on your platform.\n\n### Windows\n\nWhile Pynini is neither designed for nor tested on Windows, it can be installed\nusing the\n[Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10)\n(WSL). Simply enter the WSL environment and follow the Linux instructions below.\n\n### MacOS\n\nThe pre-compiled library can be installed from\n[`conda-forge`](https://conda-forge.org/) by running `conda install -c\nconda-forge pynini`.\n\nAlternatively, one can build from source from [PyPI](https://pypi.org/) by\nrunning `pip install pynini`.\n\nFinally, one can use [Bazel](https://bazel.build) to build from source by\nrunning `bazel build //:all` anywhere in the source tree.\n\n### Linux\n\nThe pre-compiled library can be installed from\n[`conda-forge`](https://conda-forge.org/) by running `conda install -c\nconda-forge pynini`.\n\nAlternatively, one can install a pre-compiled\n[`manylinux`](https://github.com/pypa/manylinux) wheel from\n[PyPI](https://pypi.org/) by running `pip install pynini`. This will install the\npre-compiled `manylinux` wheel (if available for the release and compatible with\nyour platform), and build and install from source if not. Unlike the\n`conda-forge` option above, which also installs [OpenFst](http://openfst.org/)\nand [Graphviz](https://graphviz.org/), this does not install the OpenFst or\nGraphviz command-line tools. See the enclosed\n[`Dockerfile`](third_party/Dockerfile) for instructions for building and\ndeploying `manylinux` wheels.\n\nFinally, one can use [Bazel](https://bazel.build) to build from source by\nrunning `bazel build //:all` anywhere in the source tree.\n\n## Testing\n\nTo confirm successful installation, run `pip install -r requirements`, then\n`python tests/pynini_test.py`. If all tests pass, the final line will read `OK`;\na successful run will log some errors to STDERR (this is working as expected).\n\n## Python version support\n\nPynini 2.0.0 and onward support Python 3. Pynini 2.1 versions (onward) drop\nPython 2 support. The current release supports Python 3.6--3.12.\n\n# License\n\nPynini is released under the Apache license. See [`LICENSE`](LICENSE) for more\ninformation.\n\n# Interested in contributing?\n\nSee [`CONTRIBUTING`](CONTRIBUTING) for more information.\n\n# Mandatory disclaimer\n\nThis is not an official Google product.\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Finite-state grammar compilation",
    "version": "2.1.6",
    "project_urls": {
        "Homepage": "http://pynini.opengrm.org",
        "homepage": "https://pynini.opengrm.org"
    },
    "split_keywords": [
        "computational linguistics",
        "morphology",
        "natural language processing",
        "language"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "56814bb768d67943088a0bc12d9f3581e7edc9addf4b29b91f65b4ed733c0a0f",
                "md5": "8b90be5c1da905b64a0abf386ddfd89e",
                "sha256": "d04d3000cda1cd006c791d8c08ecf9472e3710430024b3130eac3fad26afee60"
            },
            "downloads": -1,
            "filename": "pynini-2.1.6-cp310-cp310-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "8b90be5c1da905b64a0abf386ddfd89e",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.6",
            "size": 154541768,
            "upload_time": "2024-01-13T05:19:49",
            "upload_time_iso_8601": "2024-01-13T05:19:49.447211Z",
            "url": "https://files.pythonhosted.org/packages/56/81/4bb768d67943088a0bc12d9f3581e7edc9addf4b29b91f65b4ed733c0a0f/pynini-2.1.6-cp310-cp310-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c83801b61aba6e089209387bf47e4bde5201acea990bb8311ddabca9e547e92",
                "md5": "8ef8c6f631812e60239591ec6079bf37",
                "sha256": "a9c2b168bc2b5c6cee82a77515122ad14cbdcd9292cb050eb2824b1b48be1b37"
            },
            "downloads": -1,
            "filename": "pynini-2.1.6-cp311-cp311-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "8ef8c6f631812e60239591ec6079bf37",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.6",
            "size": 154760794,
            "upload_time": "2024-01-13T05:20:12",
            "upload_time_iso_8601": "2024-01-13T05:20:12.151160Z",
            "url": "https://files.pythonhosted.org/packages/6c/83/801b61aba6e089209387bf47e4bde5201acea990bb8311ddabca9e547e92/pynini-2.1.6-cp311-cp311-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b334403a5e792a8454168c9b9e8b7d8141027e9fb5453013d2f9320e0b083333",
                "md5": "47972e69bb5c87b5004d0bfb455bbf2a",
                "sha256": "f32d1c0b3aa05a76153c7e0e395e553e93acddf4a436cbec5d50d1eb1d354bcd"
            },
            "downloads": -1,
            "filename": "pynini-2.1.6-cp312-cp312-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "47972e69bb5c87b5004d0bfb455bbf2a",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.6",
            "size": 154695139,
            "upload_time": "2024-01-13T05:20:35",
            "upload_time_iso_8601": "2024-01-13T05:20:35.048759Z",
            "url": "https://files.pythonhosted.org/packages/b3/34/403a5e792a8454168c9b9e8b7d8141027e9fb5453013d2f9320e0b083333/pynini-2.1.6-cp312-cp312-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b08996579401213151c79653265cf5796de9b64ad646557da143b5e8d54a72f0",
                "md5": "79d3d88a7bc917d80b4080b44fcae6d1",
                "sha256": "36813f54676b212cea8342f37b6ed2b05b6a501918e8a216fad93fbd279b2839"
            },
            "downloads": -1,
            "filename": "pynini-2.1.6-cp37-cp37m-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "79d3d88a7bc917d80b4080b44fcae6d1",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.6",
            "size": 154402779,
            "upload_time": "2024-01-13T05:20:57",
            "upload_time_iso_8601": "2024-01-13T05:20:57.898690Z",
            "url": "https://files.pythonhosted.org/packages/b0/89/96579401213151c79653265cf5796de9b64ad646557da143b5e8d54a72f0/pynini-2.1.6-cp37-cp37m-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ae8f7fc640d272504912b64d1c5611100fc143ae3e729aa44a76c69b61416f55",
                "md5": "b903582b612a9ad8a4bcc3e58272579e",
                "sha256": "58cf8cfb4a7ec951cf6602bb7f1683139a1ae1cd55aa3d0b89aad76017158904"
            },
            "downloads": -1,
            "filename": "pynini-2.1.6-cp38-cp38-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b903582b612a9ad8a4bcc3e58272579e",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.6",
            "size": 154668590,
            "upload_time": "2024-01-13T05:21:22",
            "upload_time_iso_8601": "2024-01-13T05:21:22.331051Z",
            "url": "https://files.pythonhosted.org/packages/ae/8f/7fc640d272504912b64d1c5611100fc143ae3e729aa44a76c69b61416f55/pynini-2.1.6-cp38-cp38-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "168f8cf07be05502187bb5fad3f711399a13b67185cd684f97c7114d1398ac2c",
                "md5": "1aa53e42fe670ac670e2c3c5b5326a4e",
                "sha256": "294c9ae1c9db54f6d3f235f240332c9f5c84409df5f62c695fe609b337277f4d"
            },
            "downloads": -1,
            "filename": "pynini-2.1.6-cp39-cp39-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "1aa53e42fe670ac670e2c3c5b5326a4e",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.6",
            "size": 154546389,
            "upload_time": "2024-01-13T05:21:45",
            "upload_time_iso_8601": "2024-01-13T05:21:45.722087Z",
            "url": "https://files.pythonhosted.org/packages/16/8f/8cf07be05502187bb5fad3f711399a13b67185cd684f97c7114d1398ac2c/pynini-2.1.6-cp39-cp39-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f325e5c69822c420a9fbde5f76df6e482e370d24bcebd6cacd9e12c829aaabaf",
                "md5": "48e467163b1d914c5c400d07fbedaf34",
                "sha256": "bb6bef42826b015d778ae6874e3972e8d06417c7f48c7d7635a2bef7d13eb840"
            },
            "downloads": -1,
            "filename": "pynini-2.1.6-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "48e467163b1d914c5c400d07fbedaf34",
            "packagetype": "bdist_wheel",
            "python_version": "pp310",
            "requires_python": ">=3.6",
            "size": 98750429,
            "upload_time": "2024-01-13T05:22:01",
            "upload_time_iso_8601": "2024-01-13T05:22:01.150346Z",
            "url": "https://files.pythonhosted.org/packages/f3/25/e5c69822c420a9fbde5f76df6e482e370d24bcebd6cacd9e12c829aaabaf/pynini-2.1.6-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "46f2853a7b923a3c6654de2acc2606618fe8455ebf550bc454594b8b5e3bb8c4",
                "md5": "887ad79c00c3f72710990aa651660cae",
                "sha256": "f9ad3b8eac04a02510cfb4628e45eba2d34cce01d742cdacb591acc9c294dfa2"
            },
            "downloads": -1,
            "filename": "pynini-2.1.6-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "887ad79c00c3f72710990aa651660cae",
            "packagetype": "bdist_wheel",
            "python_version": "pp37",
            "requires_python": ">=3.6",
            "size": 98794167,
            "upload_time": "2024-01-13T05:22:17",
            "upload_time_iso_8601": "2024-01-13T05:22:17.486392Z",
            "url": "https://files.pythonhosted.org/packages/46/f2/853a7b923a3c6654de2acc2606618fe8455ebf550bc454594b8b5e3bb8c4/pynini-2.1.6-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7fefea8bd3327d1ded63aea3833933f07fa688bcdaf1a5029097b80af3122f35",
                "md5": "f6ffd27d911fa685fae1c41dc429195d",
                "sha256": "e40421f06f0b95301078fe64899d83f7d102cf437a0ac283e99eac8d7d17626b"
            },
            "downloads": -1,
            "filename": "pynini-2.1.6-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f6ffd27d911fa685fae1c41dc429195d",
            "packagetype": "bdist_wheel",
            "python_version": "pp38",
            "requires_python": ">=3.6",
            "size": 98774323,
            "upload_time": "2024-01-13T05:22:33",
            "upload_time_iso_8601": "2024-01-13T05:22:33.187278Z",
            "url": "https://files.pythonhosted.org/packages/7f/ef/ea8bd3327d1ded63aea3833933f07fa688bcdaf1a5029097b80af3122f35/pynini-2.1.6-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dc2972cbb297d90441221bee50e47b5bdfb01ab6c1c50aca6aa2b016bac211ae",
                "md5": "08941622d169af27bdd3eaf7693a2627",
                "sha256": "1a856cb4314602db27b293b9380ba1c77077e33e21860ece24eedcc1a70aa3f0"
            },
            "downloads": -1,
            "filename": "pynini-2.1.6-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "08941622d169af27bdd3eaf7693a2627",
            "packagetype": "bdist_wheel",
            "python_version": "pp39",
            "requires_python": ">=3.6",
            "size": 98751905,
            "upload_time": "2024-01-13T05:22:50",
            "upload_time_iso_8601": "2024-01-13T05:22:50.262981Z",
            "url": "https://files.pythonhosted.org/packages/dc/29/72cbb297d90441221bee50e47b5bdfb01ab6c1c50aca6aa2b016bac211ae/pynini-2.1.6-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9b694b59968b0fd351a153d7a3c2feaa6e7514c903c063bbd7f7e1e3f1c079b0",
                "md5": "7e5cddfed3833767661b3bca470d4cc4",
                "sha256": "b09b6dda73608cedf962dbfbcfa5826b0984d1b43a8f995761972e6e032921c6"
            },
            "downloads": -1,
            "filename": "pynini-2.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "7e5cddfed3833767661b3bca470d4cc4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 789830,
            "upload_time": "2024-01-13T05:20:20",
            "upload_time_iso_8601": "2024-01-13T05:20:20.851462Z",
            "url": "https://files.pythonhosted.org/packages/9b/69/4b59968b0fd351a153d7a3c2feaa6e7514c903c063bbd7f7e1e3f1c079b0/pynini-2.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-13 05:20:20",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pynini"
}
        
Elapsed time: 0.15993s