You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using "next hour" in a sentence does not return a TimeInterval slot like "next one hour" does.
This is true when using snips/datetime or snips/timePeriod.
The following example only focuses on snips/timePeriod though.
To Reproduce
importjsonfromsnips_nluimportSnipsNLUEngine, load_resourcesdeftest_snips(phrase):
data= {
'language': 'en',
'entities': {
'snips/timePeriod': {}
},
'intents': {
'weather.will_rain': {
'utterances': [{
'data': [{
'text': 'Will it rain in the '
}, {
'text': 'next two hours',
'slot_name': 'date_time',
'entity': 'snips/timePeriod'
}]
}]
},
'weather.will_snow': {
'utterances': [{
'data': [{
'text': 'Will it snow in the '
}, {
'text': 'next hour',
'slot_name': 'date_time',
'entity': 'snips/timePeriod'
}]
}]
}
},
}
engine=SnipsNLUEngine(resources=load_resources('snips_nlu_en'))
engine.fit(data)
parsing=engine.parse(phrase)
print(json.dumps(parsing, indent=2))
# Works as expectedtest_snips('Will it rain in the next one hour?')
# Doesn't worktest_snips('Will it snow in the next hour?')
Expected behavior
I would expect a TimeInterval slot just like I get for ...in the next one hour?
Describe the bug
Using "next hour" in a sentence does not return a
TimeInterval
slot like "next one hour" does.This is true when using
snips/datetime
orsnips/timePeriod
.The following example only focuses on
snips/timePeriod
though.To Reproduce
Expected behavior
I would expect a
TimeInterval
slot just like I get for...in the next one hour?
Environment:
3.8.5
snips-nlu==0.20.2
,snips_nlu_en-0.2.3
The text was updated successfully, but these errors were encountered: