Hfst-minimise trick
From LING073
Revision as of 17:59, 30 March 2017 by FTyers1-guest (talk | contribs)
There's a "trick" using hfst-minimise that will get around some issues in converting hfst-format transducers to lttoolbox-format transducers. That is, if hfst-proc xyz.automorf.hfst and lt-proc xyz.automorf.bin seem to be acting differently, try this trick.
The trick
In your Makefile.am file:
- In the rule for making
$(LANG1).automorf.hfst, pipe the output ofhfst-invertintohfst-minimisebefore piping the output of that intohfst-fst2fst. So the relevant part of this line should now look something like this:- ...
| hfst-invert | hfst-minimise | hfst-fst2fst -O -o $
- ...
- In the rule for
$(LANG1).autogen.hfst, first runhfst-minimiseon the input before piping that intohfst-fst2fst. That rule should now look something like this:-
hfst-minimise $< | hfst-fst2fst -O -o $@
-
- Run
make clean, reinitialise your module (./autogen.sh), and runmaketo recompile. - Test the output of
lt-procandhfst-procagain.