-
Notifications
You must be signed in to change notification settings - Fork 783
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
Add dictation auto formatting rules for time of day, currency, and percentages. #1102
Conversation
The pre-commit build failure should be fixed by #1101. |
Merging in main to try to pull in the pre commit fixes |
for more information, see https://pre-commit.ci
We should add a quick description of the added functionality in the PR description. |
for more information, see https://pre-commit.ci
Added a description. |
Thanks! |
Thanks, this looks really useful! I've made one change in functionality: I've require "hours" in times using "hundred", eg. "twelve hundred hours" will produce 12:00 but "twelve hundred" will not. Eventually we might want bare numbers in dictation mode to get turned into numerals, eg. "twelve hundred" -> 1200, assuming they're not too small (eg "one" -> 1 is not always desirable). So I'd like to find some way to make it clear whether you're speaking a time or a number. I'm not sure that I've made the best choice here, however; feel free to suggest another approach, especially if you feel strongly one way or the other. I've also made some small changes to the code to clean & simplify it. It looks good to me. I wouldn't mind more eyes on this, so I'll give it another week or so for people to look at it and merge it if nobody has objections or suggestions. |
We reviewed this in the knausj grooming session on Discord, by the way; scheduling is a little random at the moment but keep an eye on #community if you'd like to hop into future sessions :) |
Your changes seem to work fine. |
Oops, forgot to test on public. I have only a7d67f5 in my user directory. Picking out 'say one thousand two hundred thirty seven' as the test case, I can reproduce the issue. That is, on 0.3.1 (public with Conformer B) I get no output. On 0.3.1 (public with Conformer D, lol) I get '1237'. On 0.3.1-546-gc4cd (latest beta) with Conformer B or D I get 'one thousand two hundred thirty seven' (I guess an upgrade changed the behaviour here for me since yesterday). |
I've been absent from this PR for a while but hopefully should be able to stay engaged again. I've brought this PR up to date with upstream. I am now using 0.3.1-546-gc4cd with Conformer D. I can no longer reproduce the issue I originally reported on Feb 7:
I then tried saying each of these test cases that @brief posted a few days ago:
In short, my commands seem to be working and number word strings also seem to be working with 0.3.1-546-gc4cd with Conformer D. I realize that does not help with the public version, but it does suggest that there is not something wrong with the code changes themselves. Regarding @rntz's comments from a couple days ago about times versus years (e.g. "twenty twenty three"), I honestly do not think it will be possible to construct a high quality dictation system for things like this using static command grammars. It is going to require some kind of statistical/machine learning model to decide when "twenty twenty three" should be formatted as 20:23 or 2023. I currently have only the barest understanding of how machine learning works but I suspect that in 2023, this level of functionality should be quite simple achieve; after all, Dragon NaturallySpeaking had it over 20 years ago. My hope would be that it could be implemented as a secondary system after the recognition engine generates the sequence of words so that it does not require waiting for an entirely new recognition model. |
Yeah, since this is working on latest beta with conformer D, I'm even more inclined to think this is a talon issue. Unfortunate we can't merge it until it works on talon public. It would also be good if someone could test it on a Dragon+Talon setup, since there may be something about the complexity of the grammar here that's causing the issue? I would really appreciate lunixboch (the Talon developer)'s opinion on this, I might try to ping him on Slack. |
One to revisit now that Conformer D is officially out? |
On the community meetup we were not able to reproduce this either with conformer b or d on the public or beta versions. Any other comments or does this make sense to finally get into community? |
- Construct hours and minutes list using new functionality from numbers.py - move currency_denomination into a .talon-list
for more information, see https://pre-commit.ci
This is no longer an issue on the current public or beta versions of talon
I took a few minutes to bring this up to current standards, and reimplement the relevant lists using functionality from numbers. This allows us to define the numbers in one place. At the moment, I'm not aware of any reason we can't merge this. I'll leave it open for others to review however. |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Yippee! |
Add simple auto-formatting rules for:
There is some overlap between twenty-four hours times and years people are likely to say. e.g. "twenty twenty three" will be recognized as 20:23 and not "2023". However, without this change, it is recognized as "twenty twenty three" which is pretty much never right, and the existing command "numeral twenty twenty three" still gives "2023".