GFSM finite state machine library

About GFSM

The gfsm package consists of libgfsm, an abstract C library of tools for manipulation of finite state machines, and the gfsm utilities, a set of command-line tools built on libgfsm. gfsm currently supports AT&T style weighted transducer text input and label definition files, as well as a number of common algebraic operations on finite state machines.


GFSM is distributed under the terms of the GNU Lesser General Public License (LGPL-v3), which itself incorporates the terms and conditions of the GNU General Public License.





libgfsmxl is a gfsm extension library for online (aka "lazy", aka "delayed", aka "dynamic" etc.) lookup operations in cascaded gfsm transducers.
Requires gfsm >= v0.0.10.


  • The Gtk Project, distributors of the Glib library, required by gfsm.
  • FOMA: C library and XFST-like compiler for unweighted transducers.
  • AT&T FSM Utilities: A robust and well-documented suite of command-line utilities by Cyril Allauzen, Mehryar Mohri, Fernando Pereira, and Michael Riley; available without cost for non-commercial use.
  • FSA Tools: A GPL Prolog-based package by Gertjan van Noord.
  • fsm2: An extensive template-based C++ library by Thomas Hanneforth and others, distributed under a BSD-like license.
  • Helsinki Finite-State Technology suite (HFST): High-level open-source C++ library and command-line suite incorporating FOMA, SFST, and OpenFst as back-ends. Includes a two-level rule compiler and other goodies.
  • OpenFst Library: A template-based C++ library for finite-state machines by M. Riley, J. Schalkwyk, W. Skut, C. Allauzen, and M. Mohri distributed under the Apache license.
  • RWTH FSA Toolkit: A C++ library for finite-state machine operations by S. Kanthak and H. Ney distributed under a Qt-type license. Includes a python interface.
  • SFST: the Stuttgart Finite State Transducer Tools by Helmut Schmid, a GPL C++ package for "the implementation of morphological analysers and other tools which are based on finite state transducer technology." Source for some of the gfsm code.