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

[Feature Request] Defining valid time range within duckling plugin itself #81

Open
souravkgoyal opened this issue Mar 4, 2022 · 0 comments
Labels

Comments

@souravkgoyal
Copy link

Quoted the problem below that we face if we don't have a valid time range defined.
For कल 12:00 बजे duckling gives me
[
{
"body": "कल 12:00 बजे",
"start": 0,
"value": {
"values": [
{
"value": "2022-03-05T00:00:00.000+05:30",
"grain": "minute",
"type": "value"
},
{
"value": "2022-03-05T12:00:00.000+05:30",
"grain": "minute",
"type": "value"
}
],
"value": "2022-03-05T00:00:00.000+05:30",
"grain": "minute",
"type": "value"
},
"end": 12,
"dim": "time",
"latent": false
}
]
Now here the right value to capture would be 2022-03-05T12:00:00.000+05:30 but the duckling plugin chooses 2022-03-05T00:00:00.000+05:30 from
[
{
"value": "2022-03-05T00:00:00.000+05:30",
"grain": "minute",
"type": "value"
},
{
"value": "2022-03-05T12:00:00.000+05:30",
"grain": "minute",
"type": "value"
}
],
so how can I make it capture 2022-03-05T12:00:00.000+05:30? and for similar cases make sure that we will be only taking the values not coming in midnight
"value":"2022-03-05T03:00:00.000+05:30","grain":"hour","type":"value"},"end":5,"dim":"time","latent":false}]
Wrote a custom mutator here to tackle this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant