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

Bad grammar if the canonical form starts with "a" #1063

Open
gcampax opened this issue Aug 3, 2021 · 0 comments
Open

Bad grammar if the canonical form starts with "a" #1063

gcampax opened this issue Aug 3, 2021 · 0 comments
Labels
bug i18n Translation / internationalization issues P2 We need to fix it (backlog)

Comments

@gcampax
Copy link
Contributor

gcampax commented Aug 3, 2021

In case the query is not a list query, it's appropriate to use "a" instead of "the" in front of the canonical form: "get a random number" instead of "get the random number".

Currently, we don't handle "a random number" as canonical form, and we generate "get the a random number".
We should postprocess and grammar fix.

Log:

====
# main/723c1651-e531-4d0a-a0fd-f76d0191e91c
#! timestamp: 2021-08-03T19:18:21.961Z
U: find a random number between 100 and 500
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @org.thingpedia.builtin.thingengine.builtin.get_random_between(high=500, low=100);
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: @org.thingpedia.builtin.thingengine.builtin.get_random_between(high=500, low=100)
C: #[results=[
C:   { random=211, high=500, low=100 }
C: ]];
#! timestamp: 2021-08-03T19:18:22.296Z
A: 211.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_display_result;
#! timestamp: 2021-08-03T19:18:25.136Z
U: another one
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @org.thingpedia.builtin.thingengine.builtin.get_random_between(high=500, low=100);
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: @org.thingpedia.builtin.thingengine.builtin.get_random_between(high=500, low=100)
C: #[results=[
C:   { random=211, high=500, low=100 }
C: ]];
C: @org.thingpedia.builtin.thingengine.builtin.get_random_between(high=500, low=100)
C: #[results=[
C:   { random=447, high=500, low=100 }
C: ]];
#! timestamp: 2021-08-03T19:18:27.800Z
A: Did you mean get the a random number between 100 and 500?
A: 447.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_display_result;
#! timestamp: 2021-08-03T19:18:51.262Z
U: cancel
UT: $dialogue @org.thingpedia.dialogue.transaction.cancel;
C: $dialogue @org.thingpedia.dialogue.transaction.cancel;
C: @org.thingpedia.builtin.thingengine.builtin.get_random_between(high=500, low=100)
C: #[results=[
C:   { random=211, high=500, low=100 }
C: ]];
C: @org.thingpedia.builtin.thingengine.builtin.get_random_between(high=500, low=100)
C: #[results=[
C:   { random=447, high=500, low=100 }
C: ]];
#! timestamp: 2021-08-03T19:18:51.280Z
A: Alright, let me know if I can help you with anything else!
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_end;
@gcampax gcampax added bug i18n Translation / internationalization issues labels Aug 3, 2021
@nrser nrser added the P2 We need to fix it (backlog) label Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug i18n Translation / internationalization issues P2 We need to fix it (backlog)
Projects
None yet
Development

No branches or pull requests

2 participants