Skip to content
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

Resolves #43 by using grammar to parse English number phrases. #46

Merged
merged 5 commits into from
Jul 30, 2019

Conversation

bethard
Copy link
Collaborator

@bethard bethard commented Jul 26, 2019

I realized that I already solved this problem in my old SCFG-based time expression parser. So I extracted out just the number portion of the grammar.

@EgoLaparra: Try it out a bit, and if you think this is better than the current WordToNumber, merge the pull request.

@bethard bethard requested a review from EgoLaparra July 26, 2019 20:56
@EgoLaparra
Copy link
Contributor

If the text cannot be parsed an UnsupportedOperationException is thrown. In this case, we should return at least the original text. For example, several in in the past several months. is identified as a Number so the SCFG is called.

@bethard bethard merged commit 206bc4a into master Jul 30, 2019
@bethard bethard deleted the number-grammar branch July 30, 2019 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants