diff --git a/Decode.py b/Decode.py index 96b205c2176bc122c81ceb473c0f8049c9a0cb48..d28ed5fb51afa895830bd4635f667791e7edc2e6 100644 --- a/Decode.py +++ b/Decode.py @@ -26,13 +26,14 @@ def randomDecode(ts, strat, config, debug=False) : ################################################################################ ################################################################################ -def oracleDecode(ts, strat, config, debug=False) : +def oracleDecode(transitionSets, strat, config, debug=False) : EOS = Transition("EOS") config.moveWordIndex(0) config.state = 0 moved = True while moved : missingLinks = getMissingLinks(config) + ts = transitionSets[config.state] candidates = sorted([[trans.getOracleScore(config, missingLinks), trans] for trans in ts if trans.appliable(config)]) if len(candidates) == 0 : break