HFST: Examples of HFST Command Line Tools

The examples listed here are taken from Beesley & Karttunen. They show how basic HFST command line tools can be combined to create scripts that perform same tasks as programs written with the XFST formalism. In more complex cases we must resort to more elaborate HFST tools that allow us to use regular expressions when constructing transducers, but basic functionalities are enough in simpler cases as can be seen in the solutions.

The main purpose of the examples is to demonstrate how basic HFST command line tools are used, not to market them as an equally matched alternative to the more sophisticated XFST scripting language. For that purpose, native HFST command line tool for parsing XFST scripts, hfst-xfst can be used.

Results from all examples are verified by comparing them with the results from Xerox's xfst tool. However, a non-professional version of xfst that we are using does not allow some resulting transducers to be saved because they are too large. In that case, we use foma instead.

Examples
HfstBetterColaMachine
HfstBrazilianPortuguese
HfstDateParser
HfstEinsteinsPuzzle
HfstEnglishNumerals
HfstEsperanto
HfstFinnishNumerals
HfstFinnishOTProsody
HfstFinnishProsody
HfstLingala
HfstMonishAnalysis
HfstMonishGuesserAnalyzer
HfstNumbersToNumerals
HfstPalindromes
HfstPlusOrMinus
HfstYaleShooting


-- ErikAxelson - 2011-08-22