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.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
unitTest
LICENSE.md
License.md
ReadMe.md update readme Aug 10, 2017
phi.cpp
phi.h
rho.cpp
rho.h add py, h, cpp, pyx files Jul 18, 2017
setup.py
sigma.cpp add py, h, cpp, pyx files Jul 18, 2017
sigma.h
specializer.pyx

ReadMe.md

specializer

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:

  • sigma-fst.so, rho-fst.so, phi-fst.so

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 setup.py has the required fields.

Run python setup.py build_ext --inplace

To unittest:

Go to unitTest folder and Ensure pywrapfst is installed

Run ./test_specializer.sh

You can’t perform that action at this time.