846e1fc00dd182b77494ff790d8e0352d756dfc0,t2t_csaky/scripts/benchmark_avg_embedding_sts.py,,main,#,28

Before Change


      if line_as_list[0] in vocab:
        dictionary[line_as_list[0]] = numpy.array(
          [float(num) for num in line_as_list[-300:]])
        vocab.remove(line_as_list[0])

  del vocab

  create_benchmark(args.input, dictionary)

After Change


  with open(split_input_fst, "r") as f:
    for line in f:
      for word in tokenize_sentence(line.strip().split()):
        vocab[word] = vocab.get(word, 0) + 1
        word_count += 1

  with open(split_input_snd, "r") as f:
    for line in f:
      for word in tokenize_sentence(line.strip().split()):
        vocab[word] = vocab.get(word, 0) + 1
        word_count += 1

  for word in vocab:
    vocab[word] /= word_count

  dictionary = {}
  with open(args.vocab, "r") as v:
    for line in v:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ricsinaruto/Seq2seqChatbots
Commit Name: 846e1fc00dd182b77494ff790d8e0352d756dfc0
Time: 2018-07-17
Author: purgai.patrik@gmail.com
File Name: t2t_csaky/scripts/benchmark_avg_embedding_sts.py
Class Name:
Method Name: main


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 869e56edc7e3153b534f065e6a73d924ec28bec3
Time: 2020-05-26
Author: tmatsuo@google.com
File Name: appengine/flexible/scipy/main_test.py
Class Name:
Method Name: test_index


Project Name: andresriancho/w3af
Commit Name: dac040ebba7bdf1482685a56e84a3afebed71cb7
Time: 2018-01-10
Author: andres.riancho@gmail.com
File Name: w3af/core/data/url/handlers/keepalive/connection_manager.py
Class Name: ConnectionManager
Method Name: remove_connection