-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Treat "an"s equal to "a"s #22
Conversation
@@ -101,7 +103,7 @@ def test_compatability | |||
assert_equal '1/2', Numerizer.numerize('1/2') | |||
assert_equal '05/06', Numerizer.numerize('05/06') | |||
assert_equal "3.5 hours", Numerizer.numerize("three and a half hours") | |||
assert_equal "1/2 an hour", Numerizer.numerize("half an hour") | |||
assert_equal "1/2 1 hour", Numerizer.numerize("half an hour") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jduff this might be an unintentional consequence of this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, I don't really like that this changes, a fraction next to 1
is kind of weird. Can you look into it and see if there's a way to make this work without it affecting this test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -101,7 +103,7 @@ def test_compatability | |||
assert_equal '1/2', Numerizer.numerize('1/2') | |||
assert_equal '05/06', Numerizer.numerize('05/06') | |||
assert_equal "3.5 hours", Numerizer.numerize("three and a half hours") | |||
assert_equal "1/2 an hour", Numerizer.numerize("half an hour") | |||
assert_equal "1/2 1 hour", Numerizer.numerize("half an hour") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, I don't really like that this changes, a fraction next to 1
is kind of weird. Can you look into it and see if there's a way to make this work without it affecting this test?
This PR adds
n?
to all occurrences of "a" so that "an" is also processed equivalently.Fixes #19.