Skip to main content

Stand-alone OpenFST bindings for Python

Project description

OpenFst-Python

Build Status Python Version Code Style

OpenFst-Python exposes the official Python API to OpenFst (officially called pywrapfst), but includes all the required OpenFst libraries in the Python package, so you don't need to install it separately.

The version number of OpenFst-Python is the same as the OpenFst version used. The current version uses OpenFst 1.6.9.

Build Requirements

The build process will download and build OpenFst from the official webpage, so you need an Internet connection and all OpenFst dependencies. Essentially, you will need:

Installation

If you are installing from sources:

python setup.py install

Alternatively, if you want to avoid the build process, I recommend to install the package from PyPI.

pip install openfst-python

Documentation

The Python API is the official one provided by OpenFst. Please, refer to its documentation.

A toy example:

import openfst_python as fst

f = fst.Fst()
s0 = f.add_state()
s1 = f.add_state()
s2 = f.add_state()
f.add_arc(s0, fst.Arc(1, 2, fst.Weight(f.weight_type(), 3.0), s1))
f.add_arc(s0, fst.Arc(1, 3, fst.Weight.One(f.weight_type()), s2))
f.add_arc(s1, fst.Arc(2, 1, fst.Weight(f.weight_type(), 1.0), s2))
f.set_start(s0)
f.set_final(s2, fst.Weight(f.weight_type(), 1.5))

License

The OpenFst library is licensed under the Apache License, Version 2.0. OpenFst-Python is just a wrapper of its official Python API, so I am using the same license for most of the source code. ac_python_devel.m4 was not written by me and it is licensed under the GPL license.

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

openfst_python-1.6.9.tar.gz (11.0 kB view details)

Uploaded Source

Built Distributions

openfst_python-1.6.9-cp37-cp37m-manylinux1_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.7m

openfst_python-1.6.9-cp36-cp36m-manylinux1_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.6m

openfst_python-1.6.9-cp35-cp35m-manylinux1_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.5m

openfst_python-1.6.9-cp27-cp27mu-manylinux1_x86_64.whl (14.3 MB view details)

Uploaded CPython 2.7mu

File details

Details for the file openfst_python-1.6.9.tar.gz.

File metadata

  • Download URL: openfst_python-1.6.9.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.5.2

File hashes

Hashes for openfst_python-1.6.9.tar.gz
Algorithm Hash digest
SHA256 12303e9e0d6de65b7a0a96f9d895ddad89cd41348b5947c35d2e9d39bfe795e0
MD5 911e2f4c77f7f0ae3c1d23d58ddaec05
BLAKE2b-256 9012aba008ac37ad29c44794c1ba3d78d854ede1ac1dcc0e829c5ad654ab2eb5

See more details on using hashes here.

File details

Details for the file openfst_python-1.6.9-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: openfst_python-1.6.9-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 14.3 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.5.2

File hashes

Hashes for openfst_python-1.6.9-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a2cc94fdda82a41f3f3b90a37101ad66db0820f223e247bf81b7983fbcf3d329
MD5 c3417eca5f9700c30e1a1a6c70d254f9
BLAKE2b-256 56a9e6c5fe07a76ca7089420f85883686659e7c0cec05e68bf85587c9764da59

See more details on using hashes here.

File details

Details for the file openfst_python-1.6.9-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: openfst_python-1.6.9-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 14.3 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.5.2

File hashes

Hashes for openfst_python-1.6.9-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b330733802bc5dfad2e43c2215e8a3b8e3a654abb5bbe9543463993b1678bcd9
MD5 7bc7dff30b4b00fb0329b65be29a489c
BLAKE2b-256 9109c673b57aa497babd8f2dace0257044b1f8c0c32db3ae1daa5290e45b3dab

See more details on using hashes here.

File details

Details for the file openfst_python-1.6.9-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: openfst_python-1.6.9-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 14.3 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.5.2

File hashes

Hashes for openfst_python-1.6.9-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ea9b3813efc3b1feb04804e638b00e99727179ed77a36503ff6a9f8758954541
MD5 f223809cb655c56937c58acf7bf4e98f
BLAKE2b-256 f4bc8352490cf8bf8d8f0844712da331312e15749e79c6a6f78fdfd2b7b9a671

See more details on using hashes here.

File details

Details for the file openfst_python-1.6.9-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: openfst_python-1.6.9-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 14.3 MB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.5.2

File hashes

Hashes for openfst_python-1.6.9-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c4fbf380cc1e6d182bc923b037736da47cbe9270635b8334a9f6f85f1c90dc71
MD5 fab4adf732943f083199c11e39c371a8
BLAKE2b-256 39075215aedc7ce0299ba66347ef17042bcfbd622b2850cb48b9f0530d77b976

See more details on using hashes here.

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