HFST: Command Line Tool Functionalities

General

The Helsinki Finite-State Transducer software is intended for the implementation of morphological analysers and other tools which are based on weighted and unweighted finite-state transducer technology. This work is licensed under a GNU Lesser General Public License v3.0. The HFST software can be used through an API or command line tools.

HFST command line tools are a collection of command line utilities that can create, operate and print transducers using the HFST interface. This page gives a short preview of the tools. For more information, see HfstCommandLineTools and tool-specific wiki pages (by clicking the tool name). The command line tools are implemented by using the HFST API, so they also demonstrate many of the functionalities found in the API.

Functionalities

Compile and Test Transducers

  • hfst-xfst
    • Compile files in xfst language into HFST transducers.

Compile Lexicon to Transducer

  • hfst-lexc
    • Compile lexicon files in Xerox Lexc formalism into an HFST transducer.

Compile Rules to Transducers

  • hfst-twolc
    • Compile a two-level grammar in Xerox Twolc formalism into an HFST transducer.

Compose Lexicon with Rules

Use Finite-State Calculus to Create Transducers

  • hfst-sfstpl2fst
    • Compile files in SFST programming language into HFST transducers.

Perform Spell Checking

  • hfst-ospell
    • Spell check using HFST finite-state automata. Currently this is a separate tool not included in HFST command line tool set.

Testing Functions

Convert between Pair Strings and Transducers

Convert between Binary and Text Format

The text format is an easy solution for carrying information to another set of tools or for debugging.

  • hfst-txt2fst
    • Convert AT&T tabular format into a binary transducer

Convert between Binary Formats

Some functionalities may assume that they always get weighted or unweighted input transducers, and unweighted transducers may speed up the processing when weights are not needed.

  • hfst-fst2fst
    • Convert between HFST, OpenFst, SFST and foma transducers.

Basic Algebraic Operations

  • hfst-project
    • Project a transducer towards input or output level.

Optimizing Functions

Operate on Transducer Archives

  • hfst-head
    • Read n first transducers from input.

  • hfst-tail
    • Read n last transducers from input.

  • hfst-split
    • Split many transducers in separate files.