91184b6bdcdbce3a37cc91a54801b98356910849,theanolm/commands/score.py,,_score_utterances,#Any#Any#Any#Any#Any#,141

Before Change


        word_ids = dictionary.words_to_ids(words)
        num_words += len(word_ids)
        num_unks += word_ids.count(dictionary.unk_id)
        word_ids = numpy.array([[x] for x in word_ids]).astype("int64")
        
        probs = dictionary.words_to_probs(words)
        probs = numpy.array([[x] for x in probs]).astype(theano.config.floatX)

After Change


    for line_num, line in enumerate(input_file):
        words = line.split()
        if words[0] != "<s>":
            words.insert(0, "<s>")
        if words[-1] != "</s>":
            words.append("</s>")

        word_ids = dictionary.words_to_ids(words)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: senarvi/theanolm
Commit Name: 91184b6bdcdbce3a37cc91a54801b98356910849
Time: 2015-11-22
Author: seppo.git@marjaniemi.com
File Name: theanolm/commands/score.py
Class Name:
Method Name: _score_utterances


Project Name: EpistasisLab/tpot
Commit Name: 45c9fcd8b1df849a0c3b19403d13da38b7cd68c3
Time: 2016-07-07
Author: supacoofoo@gmail.com
File Name: tpot/operators/preprocessors/zero_count.py
Class Name: ZeroCount
Method Name: transform


Project Name: dmlc/dgl
Commit Name: 68a978d4de27b6625870e1ea4242075e990922f4
Time: 2020-07-29
Author: coin2028@hotmail.com
File Name: examples/pytorch/jtnn/jtnn/jtnn_dec.py
Class Name: DGLJTNNDecoder
Method Name: run