Commit 726a47dc authored by ngimel's avatar ngimel Committed by Facebook Github Bot
Browse files

Fix "ignore-case" behavior (#339)

Summary:
Currently, if `ignore-case` is set, the same line will be yielded twice - once as lower-cased version, once as original version, leading to lower than expected uncased scores.
Pull Request resolved: https://github.com/pytorch/fairseq/pull/339

Differential Revision: D12890386

Pulled By: myleott

fbshipit-source-id: 0570e5f6e8f848f2c6439d615e70aca6df097eef
parent 50a671f7
......@@ -44,6 +44,7 @@ def main():
for line in fd.readlines():
if args.ignore_case:
yield line.lower()
else:
yield line
def score(fdsys):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment