Skip to content

Commit

Permalink
Canonicalization for end of sentence and for hint change.
Browse files Browse the repository at this point in the history
  • Loading branch information
bvds committed Jan 13, 2011
1 parent 94bd833 commit c37a346
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions LogProcessing/rerun/rerun.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ function escapeHtml($bb){
$bbc=preg_replace($varUnique,'?VAR',$bbc);
$nbbc=preg_replace($varUnique,'?VAR',$nbbc);
// Canonicalize end of sentence.
// commit c828125f4bc0e6, Jan. 5, 2011
// commit c828125f4bc0e6, Jan. 5, 2011 (and others)
$bbc=preg_replace('/\.\s+/','. ',$bbc);
$nbbc=preg_replace('/\.\s+/','. ',$nbbc);
$bbc=preg_replace('/\. \s+/','. ',$bbc);
$nbbc=preg_replace('/\. \s+/','. ',$nbbc);

Expand All @@ -259,7 +261,10 @@ function escapeHtml($bb){
// Change hint wording for unmatched sought.
// January 7, 2011
$bbc=preg_replace('/Your entry does not match any quantities needed to solve this problem/','**unmatched-sought**',$bbc);
$nbbc=preg_replace('/Sorry, I was not able to understand your entry/','**unmatched-sought**',$nbbc);
$nbbc=preg_replace('/Sorry, I was not able to understand your entry/','**unmatched-sought**',$nbbc);
// Last hint for NSH sought
// eb5239f490dbb5, Jan 10, 2011
$nbbc=preg_replace('/Please try one more time/','Please try again',$nbbc);

if(strcmp($bbc,$nbbc)==0){ // match, go on to next pair
$i++; $ni++;
Expand Down

0 comments on commit c37a346

Please sign in to comment.