69d978ed497856d05730c05564597e604713f5c4,beginner_source/chatbot_tutorial.py,,evaluateInput,#,1286

Before Change


            // 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:
                    output_sentence = " ".join(output_words)

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.")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


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


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: lingpy/lingpy
Commit Name: 1a9a57c99e34502c044030e51bbfbb9694737782
Time: 2013-03-04
Author: mattis.list@posteo.de
File Name: test/test_sca.py
Class Name:
Method Name: