e18df168c65541107227e567de3a99cb21cfa426,theanolm/commands/decode.py,,decode,#Any#,91
Before Change
args.job)
tokens = decoder.decode(lattice)
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: 3
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: AllenCellModeling/pytorch_fnet
Commit Name: 14db8e4673cbbfd58ffb01e4374d5c87d7e5b6e3
Time: 2017-11-01
Author: chek.o@outlook.com
File Name: tools/colorize_tifs.py
Class Name:
Method Name:
Project Name: pantsbuild/pants
Commit Name: 8069653f78aefeff2bf5699770722867d3cd3541
Time: 2019-02-22
Author: 1305167+cosmicexplorer@users.noreply.github.com
File Name: src/python/pants/backend/python/tasks/python_tool_prep_base.py
Class Name: PythonToolPrepBase
Method Name: execute