63871d5ab3301d015805abddd8f4259680d6a24a,translate.py,,main,#,68

Before Change


                words = []
                for f in src_sent:
                    word = translator.fields["src"].vocab.itos[f]
                    if word == onmt.IO.PAD_WORD:
                        break
                    words.append(word)

                os.write(1, bytes("\nSENT %d: %s\n" %
                                  (count, " ".join(words)), "UTF-8"))

After Change


                (sent.squeeze(1) for sent in src.split(1, dim=1)))

        for pred_sents, gold_sent, pred_score, gold_score, src_sent in z_batch:
            n_best_preds = [" ".join(pred) for pred in pred_sents[:opt.n_best]]
            count += 1
            out_file.write("\n".join(n_best_preds))
            out_file.write("\n")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 63871d5ab3301d015805abddd8f4259680d6a24a
Time: 2017-09-21
Author: bpeters@coli.uni-saarland.de
File Name: translate.py
Class Name:
Method Name: main


Project Name: tensorlayer/tensorlayer
Commit Name: 35b2c4917344f338eda67c78673cf4064b3b4265
Time: 2020-02-07
Author: 34995488+Tokarev-TT-33@users.noreply.github.com
File Name: examples/reinforcement_learning/tutorial_DQN.py
Class Name:
Method Name:


Project Name: evilsocket/pwnagotchi
Commit Name: 90b0e10e81a5a0e03753715ec1034278bdd5f600
Time: 2019-10-07
Author: evilsocket@gmail.com
File Name: pwnagotchi/plugins/default/api.py
Class Name:
Method Name: parse_pcap