e18df168c65541107227e567de3a99cb21cfa426,theanolm/commands/decode.py,,decode,#Any#,91
Before Change
best_token = tokens[0]
words = vocabulary.id_to_word[best_token.history]
if args.output == "ref":
args.output_file.write("{} {}\n".format(utterance_id, " ".join(words)))
elif args.output == "trn":
args.output_file.write("{} ({})\n".format(" ".join(words), utterance_id))
elif args.output == "n-best":
ac_logprob = best_token.ac_logprob / log_scale
lm_logprob = best_token.ac_logprob / log_scale
args.output_file.write("{} {} {} {}\n".format(
utterance_id, logprob, len(words), " ".join(words)))
else:
print("Invalid output format requested:", args.output)
sys.exit(1)
After Change
args.job)
tokens = decoder.decode(lattice)
for index in range(min(args.n_best, len(tokens) )):
line = format_token(tokens[index],
utterance_id,
vocabulary,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: senarvi/theanolm
Commit Name: e18df168c65541107227e567de3a99cb21cfa426
Time: 2016-08-03
Author: seppo.git@marjaniemi.com
File Name: theanolm/commands/decode.py
Class Name:
Method Name: decode
Project Name: erikbern/ann-benchmarks
Commit Name: b4672a00aa69ec9e44f32251a83576ffb3d1badc
Time: 2020-10-20
Author: aklibisz@gmail.com
File Name: ann_benchmarks/algorithms/elastiknn.py
Class Name: L2Lsh
Method Name: query
Project Name: google/language-resources
Commit Name: a847e176cb012c8d0469693961e4e90c8131136d
Time: 2016-01-07
Author: mjansche@google.com
File Name: xh/evaluate_pronunciation_rules.py
Class Name:
Method Name: