Skip to content
Python Library to convert vector fsts ro special fsts
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
unitTest update readme Aug 10, 2017
rho.h add py, h, cpp, pyx files Jul 18, 2017
sigma.cpp add py, h, cpp, pyx files Jul 18, 2017


This repo provides an easy interface for the Special OpenFst operations through Python.

In addition to using Pywrapfst library that allows interacting with OpenFst, once compiled specializer library allows converting Vector type Fsts to sigma, rho, or phi fst types (as described in the OpenFST documentation).

The library is written in Cython for speedup and direct API of the C++ code of OpenFst. In order to compile it, the following files are required to be present in the directory:

  • ios.pxd
  • memory.pxd
  • basictypes.pxd
  • pywrapfst.pxd
  • pywrapfst.pyx
  • fst.pxd

These files can be found in the src/extensions/python/ directory of the OpenFST source distribution.

Additionally, the following files must be on your LD_LIBRARY_PATH both when you compile this library and also when you attempt to use it:


These files will likely be in /usr/local/lib/fst on Linux or OSX. If they are not present on your installation of OpenFST, you may need to recompile OpenFST with the --enable-special option.

To compile:

Ensure that has the required fields.

Run python build_ext --inplace

To unittest:

Go to unitTest folder and Ensure pywrapfst is installed

Run ./

You can’t perform that action at this time.