Skip to content

Commit

Permalink
fix #167: remove a lingering match property that is no longer set
Browse files Browse the repository at this point in the history
  • Loading branch information
lowe committed Sep 24, 2016
1 parent 6391857 commit e98f2bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/scoring.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,6 @@ scoring =
# base guesses: (year distance from REFERENCE_YEAR) * num_days * num_years
year_space = Math.max(Math.abs(match.year - @REFERENCE_YEAR), @MIN_YEAR_SPACE)
guesses = year_space * 365
# double for four-digit years
guesses *= 2 if match.has_full_year
# add factor of 4 for separator selection (one of ~4 choices)
guesses *= 4 if match.separator
guesses
Expand Down
4 changes: 2 additions & 2 deletions test/test-scoring.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ test 'date guesses', (t) ->
month: 1
day: 1
msg = "recent years assume MIN_YEAR_SPACE."
msg += " extra guesses is added for separators and a 4-digit year."
t.equal scoring.date_guesses(match), 365 * scoring.MIN_YEAR_SPACE * 4 * 2, msg
msg += " extra guesses are added for separators."
t.equal scoring.date_guesses(match), 365 * scoring.MIN_YEAR_SPACE * 4, msg
t.end()

test 'spatial guesses', (t) ->
Expand Down

0 comments on commit e98f2bf

Please sign in to comment.