Closed tommasobertoni closed 3 years ago
@kczornik can you re-run the attached test with the new implementation? are they all matching to 100%?
I can confirm, it all returns 100%
Results:
Compare ( 'Turn on the Light.' 'Turn on the Light.' ) = 1
// missing final period
Compare ( 'Turn on the Light.' 'Turn on the Light' ) = 1
// lower case work
Compare ( 'Turn on the Light.' 'Turn on the light.' ) = 1
// lower case and no period
Compare ( 'Turn on the Light.' 'Turn on the light' ) = 1
// all lowercase without punctuation
Compare ( 'Turn on the Light.' 'turn on the light' ) = 1
@kczornik let's also trim the values, so initial and final whitespaces are excluded. e.g. "Turn on the Light. ", " Turn on the Light.", " Turn on the Light. ".
Due to upper/lower cases and punctuation, the matching of input and targets may vary quite a bit:
Results:
We should normalize input and target, by evaluating lower case and punctuation-less values.