8b18491b26e4b8271db757a3245008882ea112b3,official/transformer/compute_bleu.py,,bleu_wrapper,#Any#Any#Any#,88

Before Change



def bleu_wrapper(ref_filename, hyp_filename, case_sensitive=False):
  Compute BLEU for two files (reference and hypothesis translation).
  ref_lines = tokenizer.native_to_unicode(
      tf.gfile.Open(ref_filename, "r").read()).split("\n")
  hyp_lines = tokenizer.native_to_unicode(
      tf.gfile.Open(hyp_filename, "r").read()).split("\n")

  if len(ref_lines) != len(hyp_lines):

After Change



def bleu_wrapper(ref_filename, hyp_filename, case_sensitive=False):
  Compute BLEU for two files (reference and hypothesis translation).
  ref_lines = tokenizer.native_to_unicode(
      tf.io.gfile.GFile(ref_filename).read()).strip().splitlines()
  hyp_lines = tokenizer.native_to_unicode(
      tf.io.gfile.GFile(hyp_filename).read()).strip().splitlines()

  if len(ref_lines) != len(hyp_lines):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 2

Instances


Project Name: tensorflow/models
Commit Name: 8b18491b26e4b8271db757a3245008882ea112b3
Time: 2019-06-05
Author: 14104855+guptapriya@users.noreply.github.com
File Name: official/transformer/compute_bleu.py
Class Name:
Method Name: bleu_wrapper


Project Name: kmike/pymorphy2
Commit Name: 47e33878a913e08694da03d38b641f5a6ff6a2d7
Time: 2013-03-08
Author: kmike84@gmail.com
File Name: tests/test_lexemes.py
Class Name:
Method Name:


Project Name: WheatonCS/Lexos
Commit Name: 0008c1cd7cf1e563cbc75ea81809bf8e4816fb90
Time: 2017-08-09
Author: darias0826@gmail.com
File Name: lexos/processors/prepare/cutter.py
Class Name:
Method Name: cut_by_lines


Project Name: osmr/imgclsmob
Commit Name: d9f6e28568406c162b79f582ae037a89a3118d26
Time: 2021-02-16
Author: osemery@gmail.com
File Name: prep_model.py
Class Name:
Method Name: post_process


Project Name: biotite-dev/biotite
Commit Name: 8dafa43d1ddc159c2e013ccfc9e4aa4f6a35fb69
Time: 2020-07-07
Author: patrick.kunzm@gmail.com
File Name: doc/scraper.py
Class Name:
Method Name: static_image_scraper