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

"One two three" should be parsed as 1, 2 and 3 #72

Open
ClemDoum opened this issue Dec 28, 2017 · 3 comments
Open

"One two three" should be parsed as 1, 2 and 3 #72

ClemDoum opened this issue Dec 28, 2017 · 3 comments
Assignees
Labels
bug fixpending Fix done. Version with fix will be added to ticket.

Comments

@ClemDoum
Copy link
Contributor

Parsing Error

Version

your.tag.number

Language

EN

Parser input

one two three

Parser output

parser = RustlingParser(u"en")
parser.parse(u"one two three")
>>> [{'char_range': {'end': 13, 'start': 4},
  'dim': 'Time',
  'latent': False,
  'value': {'grain': u'minute',
   'latent': False,
   'precision': u'exact',
   'type': 'value',
   'value': '2017-12-28 14:03:00 +01:00'}},
 {'char_range': {'end': 3, 'start': 0},
  'dim': 'Number',
  'latent': False,
  'value': {'type': 'value', 'value': 1}}]

Parser expected output (Optional)

We expect each number to be parsed separately as 1, 2 and 3

@ClemDoum
Copy link
Contributor Author

ClemDoum commented Dec 28, 2017

Initially reported here: https://github.com/snipsco/next-release/issues/32

@rosastern rosastern added the fix label Oct 23, 2018
@rosastern rosastern assigned rosastern and unassigned hdlj Oct 23, 2018
@rosastern rosastern added the bug label Oct 23, 2018
@rosastern rosastern removed the fix label Sep 27, 2019
@rosastern
Copy link
Collaborator

To do: reduce cardinal ranges allowed in time-of-day for number-only phrasings (e.g. "two forty-five" OK but "two three" not OK)

@rosastern
Copy link
Collaborator

rosastern commented Oct 5, 2019

Done: time-of-day with relative minutes > 10 in numeric only phrasings are not allowed. I.e.:
"one two" -> not a time-of-day - two consecutive numbers
"one o two" -> time-of-day, 1:02

@rosastern rosastern added the fixpending Fix done. Version with fix will be added to ticket. label Oct 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fixpending Fix done. Version with fix will be added to ticket.
Projects
None yet
Development

No branches or pull requests

3 participants