talonvoice / talon

Issue Tracker for the main Talon app
85 stars 0 forks source link

parser appears to be dropping command keyword #42

Closed jcooper-korg closed 5 years ago

jcooper-korg commented 6 years ago

Using the example std.py. Saying "sentence this is a sentence" outputs "This is a" Saying "sentence this is a sentence over" outputs nothing.

Here's the log for the latter example:

2018-05-31 21:20:16    IO phrase {'cmd': 'p.end', 'grammar': 'talon', 'phrase': ['sentence', 'this', 'is', 'a\\determiner', 'sentence', 'over'], 'words': [{'word': 'sentence', 'id': 254, 'rule': 379, 'start': 1527826813901, 'end': 1527826814541}, {'word': 'this', 'id': 0, 'rule': 1000000, 'start': 1527826814541, 'end': 1527826814721}, {'word': 'is', 'id': 381, 'rule': 1000000, 'start': 1527826814721, 'end': 1527826814861}, {'word': 'a\\determiner', 'id': 0, 'rule': 1000000, 'start': 1527826814861, 'end': 1527826814921}, {'word': 'sentence', 'id': 254, 'rule': 379, 'start': 1527826814921, 'end': 1527826815361}, {'word': 'over', 'id': 253, 'rule': 379, 'start': 1527826815361, 'end': 1527826816011}], 'ts': 144951240605, 'path': [{'rule': 'input.keymap_sentence___dgndictation____over_', 'words': [{'word': 'sentence', 'start': 1527826813901, 'end': 1527826814541}, {'rule': 'dgndictation', 'words': [{'word': 'this', 'start': 1527826814541, 'end': 1527826814721}, {'word': 'is', 'start': 1527826814721, 'end': 1527826814861}, {'word': 'a\\determiner', 'start': 1527826814861, 'end': 1527826814921}]}, {'word': 'this', 'start': 1527826814541, 'end': 1527826814721}]}, {'word': 'sentence', 'start': 1527826813901, 'end': 1527826814541}]}
2018-05-31 21:20:16  INFO failed to dispatch phrase (invalid rule)
2018-05-31 21:20:16    IO phrase {'cmd': 'p.end', 'grammar': 'sleepy', 'phrase': [], 'ts': 144951241368, 'path': []}
2018-05-31 21:20:18    IO cmd {'success': True, 'cmd': {'name': 'talon', 'cmd': 'g.unload'}, 'ts': 144953782691}
2018-05-31 21:20:18    IO [grammar reloaded]

Ryan's initial response is at https://talonvoice.slack.com/archives/C9MHQ4AGP/p1527826929000075

lunixbochs commented 5 years ago

Fixed in 0.0.8, now outputs:

This is a sentence This is aOver