Skip to main content

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.7.2.

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

Most likely, you want to avoid the build process. Then, simply install the package from PyPI:

pip install openfst-python

Alternatively, if you are installing from sources, you can simply do:

python setup.py install

Notice that this downloads the appropriate version of OpenFst directly from the Internet. If you don't have an Internet connection but are already in possession of the appropriate tar.gz file, you can use the following command:

python setup.py build --download-dir=DIRECTORY_CONTAINING_OPENFST_TAR_GZ
python setup.py install

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.

Metadata

Release files for openfst-python 1.7.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for openfst-python 1.7.3
File
openfst_python-1.7.3-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
openfst_python-1.7.3-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
openfst_python-1.7.3-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
openfst_python-1.7.3-cp27-cp27mu-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 Details

Total release size: 60.0 MB

Release files / openfst_python-1.7.3-cp37-cp37m-manylinux1_x86_64.whl

Download URL openfst_python-1.7.3-cp37-cp37m-manylinux1_x86_64.whl
Size 15.0 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
0b71c37a471784e2c0a44dfc1b61181517325af557d16afabcb095c6fc56f60e
BLAKE2b-256 checksum
How to use checksums
dd4ba9729ed62c1fd7be8a31c5fe550641af5da7d9fa408b40f413a4d5852ee5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

Release files / openfst_python-1.7.3-cp36-cp36m-manylinux1_x86_64.whl

Download URL openfst_python-1.7.3-cp36-cp36m-manylinux1_x86_64.whl
Size 15.0 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
08e63546cb800afa06e120a1d9875d9e176f08f4a9dbca829b3dec749396ebd0
BLAKE2b-256 checksum
How to use checksums
ee918d930766cfe34d4488f8aaded264c4fe8d160715b8885db57184f4833612
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

Release files / openfst_python-1.7.3-cp35-cp35m-manylinux1_x86_64.whl

Download URL openfst_python-1.7.3-cp35-cp35m-manylinux1_x86_64.whl
Size 15.0 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
ca39cac80aef9aa5ed6bfb0d1e5d3027ecc95c7f35137471c50944b2930c205f
BLAKE2b-256 checksum
How to use checksums
e99dc9d607567d78c0edb38dc8f4672e8b5d883fbcb5811cd5796049c72f6da5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

Release files / openfst_python-1.7.3-cp27-cp27mu-manylinux1_x86_64.whl

Download URL openfst_python-1.7.3-cp27-cp27mu-manylinux1_x86_64.whl
Size 15.0 MB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
acd48dfe1433d058aad6b4d4057c66747399e54434418a8cc1333dd71af4edc4
BLAKE2b-256 checksum
How to use checksums
7bd517d8c6bee133e8dc4b2ef6e093a320d557d3614039a1ea1af909866c0bb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.7.3 This release

4 release files

1.7.2

5 release files

1.6.9

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page