Open drmfinlay opened 9 months ago
Maybe this formatting could be applied with a separate NumeralWordFormatter
class with the following function:
def format_words(input, min, max, language=None):
...
...
...
That way it could be used with any engine and could be subclassed to add in contextual spacing for things like phone numbers, if desired.
Maybe this formatting could be applied with a separate
NumeralWordFormatter
class with the following function:def format_words(input, min, max, language=None): ... ... ...
That way it could be used with any engine and could be subclassed to add in contextual spacing for things like phone numbers, if desired.
I do like that approach with any engine.
It would be nice if this feature also handled words like 'double', 'triple', 'dot' and 'point'. Of course, things common in one language are often not common in another. Apparently this is the case for double X and triple X. English has this, but the German language, for instance, does not.
So things like this should be done in language-specific functions under dragonfly.language.
Dragonfly's dictation word formatting does not include the transformation of number words into numerals. For example, if, as part of a command using a
Dictation
element, I say "forty two", the matching rule will receive the words "forty two", instead of the numeral form 42.Dragon itself has extensive support and configuration for this which would not be feasible to implement in Dragonfly. I think, however, some basic transformations could be done. These would be optional and would use the active
dragonfly.language
implementation (based on the SR engine language).