rustling-ontology
rustling-ontology copied to clipboard
"One two three" should be parsed as 1, 2 and 3
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
Initially reported here: https://github.com/snipsco/next-release/issues/32
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)
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