rustling-ontology icon indicating copy to clipboard operation
rustling-ontology copied to clipboard

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

Open ClemDoum opened this issue 7 years ago • 3 comments

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 avatar Dec 28 '17 07:12 ClemDoum

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

ClemDoum avatar Dec 28 '17 07:12 ClemDoum

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 avatar Sep 27 '19 09:09 rosastern

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 avatar Oct 05 '19 18:10 rosastern