Skip to content

Commit

Permalink
Fix "ignore-case" behavior (facebookresearch#339)
Browse files Browse the repository at this point in the history
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: facebookresearch#339

Differential Revision: D12890386

Pulled By: myleott

fbshipit-source-id: 0570e5f6e8f848f2c6439d615e70aca6df097eef
  • Loading branch information
ngimel authored and facebook-github-bot committed Nov 1, 2018
1 parent 50a671f commit 726a47d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion score.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def readlines(fd):
for line in fd.readlines():
if args.ignore_case:
yield line.lower()
yield line
else:
yield line

def score(fdsys):
with open(args.ref) as fdref:
Expand Down

0 comments on commit 726a47d

Please sign in to comment.