HFST: hfst-foma


Parse Xerox XFST scripts with foma and convert stacks to HFST format. This is just a wrapper around foma, the corresponding native HFST tool is hfst-xfst. HFST tools can only use results from scripts with save stack command (option -f) or scripts with save stack before interactive part (option -l).


hfst-foma [OPTIONS...]

-f scriptfile Execute the commands in scriptfile and exit.
-l scriptfile Execute the commands in scriptfile and launch interactive interface.
-q Do not print output.
-v Print verbosely while processing.
-h Print help message.
-F format Save stack in HFST back-end format format.

It is strongly suggested to only use -f scripts, for interactive use it is better to use foma and convert manually.

If you do run a script with hfst-foma that doesn't write anything, you can do eg.

hfst-foma -l rules.script

and after processing execute in the command window

write att > result.att

and postprocess the file result.att as you please.


Program is just a wrapper around foma. All foma bugs are inherited and new ones may be caused by the wrapper. Also the wrapper must be able to "see" the saved stack file names, so it cannot convert interactively saved stacks, only ones in scriptfiles (options -f and -l).

See also

HfstXfst, HfstLexcWrapper, HfstCommandLineTools

-- ErikAxelson - 2013-10-16