scrapinghub / number-parser

Parse numbers written in natural language
BSD 3-Clause "New" or "Revised" License
104 stars 23 forks source link

`parse()` - whitespace around sentence separators consumed after numbers #76

Closed matth closed 1 year ago

matth commented 2 years ago

Small bug / issue. In normal operation the parse() function respects white space around sentence separators ...

>>> parse("foo , bar , baz .") 
'foo , bar , baz .'            

This is not the case when the white space follows a number ...

>>> parse("one , two , three .")
'1, 2, 3.'                     

Ideally the behaviour would be consistent and respect the original whitespace around any separators / words.

I have implemented a fix and pull request for this (issue #77).

serhii73 commented 1 year ago

Close because the PR is merged. Thanks.