Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The dragonfly file dictation_format.py provides autoformatting behavior for built-in Dragon vocabulary words with
property
values which indicate whether there should be for example a space before and/or after the word or whether the next word should be capitalized and things like that. However this does not currently work with custom words in the Dragon vocabulary. Even when you set those properties for your custom words in the Dragon vocabulary (using the word properties GUI or the XML file for your vocabulary), the value ofproperty
in dictation_format.py is just blank.This pull request allows people to set formatting flags for their custom words. Two example customer words are provided (commented out): "len" which is supposed to be a short name for "(" and "ren" which is supposed to be a short name for ")". In order for these to work, they would have to be added to the Dragon vocabulary by the user with (in the case of len) written form "(" and spoken form "len".
I also noticed that the formatting flags for the Dragon built-ins "slash", "open paren", "close paren" were not there, so I added them. There are other Dragon buildings like us but I didn't and them because they are less common and the ones I can think of or just other things that start with open and close (e.g. "open bracket") which are already covered by "left-" and "right-" which are included already.
Note: the autoformatting behavior appears only take into account what is said in the current utterance and does not use information from the previous utterance.
In some ways, this is an important limitation which I discussed in the issue #110
Aside: Perhaps this should be somehow linked up with Natlink functionality for adding custom words, many a time. I don't know how that works. I know Dragon stores vocabulary in text files and XML files and the XML (which are quite messy) files carry a bit more formatting information than the text files (though again that extra formatting information appears to be lost by the time he gets to dragonfly). The Dragon vocabulary text files have just spoken and written forms (and don't allow backslashes in the written forms since that is used as a separator).