lookup_optimize() should not remove the weights
koskenni opened this issue · 1 comments
koskenni commented
lookup_optimize (self) documentation says: "Optimize the transducer for lookup. This effectively converts the transducer into HFST_OL_TYPE."
It would be very convenient if the conversion of weighted FSTs into the OLW type could be done inside Python, e.g. if lookup_optimize would simply convert weighted FSTs into OLW and unweighted into OL type.
According to the present documentation, one has to produced OLWs by command line tools outside the Python HFST framework.
koskenni commented
According to the documentation, convert() seems to do the optimization both into the HFST_OL_TYPE and the HFST_OLW_TYPE. Maybe one could revise the documentation of lookup_optimize() to refer to convert() when one needs to keep the weights.