a61996ae5406ddfee4ac65ab647ebe858fc16260,beginner_source/chatbot_tutorial.py,,evaluateInput,#Any#Any#Any#Any#,1286
Before Change
input_sentence = normalizeString(input_sentence)
// Evaluate sentence
if beam_size == 1:
output_words = evaluate(encoder, decoder, voc, input_sentence, beam_size)
output_sentence = " ".join(output_words)
print("bot:", output_sentence)
else:
output_words_list = evaluate(encoder, decoder, voc, input_sentence, beam_size)
for output_words, score in output_words_list:
After Change
// Evaluate sentence
output_words = evaluate(encoder, decoder, searcher, voc, input_sentence)
// Format and print response sentence
output_words[:] = [x for x in output_words if not (x == "EOS" or x == "PAD")]
print("Bot:", " ".join(output_words))
except KeyError:
print("Error: Encountered unknown word.")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: pytorch/tutorials
Commit Name: a61996ae5406ddfee4ac65ab647ebe858fc16260
Time: 2018-09-17
Author: matthewinkawhich@gmail.com
File Name: beginner_source/chatbot_tutorial.py
Class Name:
Method Name: evaluateInput
Project Name: rodluger/starry
Commit Name: aae0988225f370b056d905f01807638a462f0d63
Time: 2018-05-08
Author: rodluger@gmail.com
File Name: tex/figures/ylms.py
Class Name:
Method Name: Static
Project Name: pytorch/tutorials
Commit Name: 69d978ed497856d05730c05564597e604713f5c4
Time: 2018-09-16
Author: minkawhich@fb.com
File Name: beginner_source/chatbot_tutorial.py
Class Name:
Method Name: evaluateInput