treat weighted epsilons as non-epsilons - #201
Conversation
|
Treating weighted epsilons as non-epsilons seems reasonable to me. I can't think of a better way. But there are a lot of other places in the code where epsilons are referred to so I can't say I feel very confident all cases are covered (for example But if it passes tests and solves bugs we could just merge and see what happens :) Unless @flammie knows of something relevant in The Literature? |
|
yeah I don't know the whole lttoolbox code so well but yeah weighted epsilons processing as non-epsilons is quite common, in openfst style if you wanna use non-weight aware algorithms for weighted automaton there's the weight encode- thing which just turns all labels into label+weight so non-zero weights make epsilons into a non-epsilon symbol too. For traversal as or such weighted epsilons just need to semiring + and - the weight traversing like any symbol, not sure if there's anything elegant written about it anywhere. as a bottom line I agree, if it passes the tests we just have to test and see :-D |
So one alternative would be to do this in compilation – that might mean fewer places in the runtime code to check for correctness? Might have some effect on transducer size though. |
|
I suppose a more accurate name for this PR would be to specify that it only changes the behavior of I would like to add |
|
Oh hah I for some reason thought this was happening in fst_processor. Then it makes more sense. |
fixes #44, I think.
@flammie @unhammer is there a better way to accomplish this?