padatious
padatious copied to clipboard
Support named-group entity matches
Right now I have a big long auto-generated list of different units, things like [meter,mile,amp,ampere,] etc. This list is created using a combination of auto-generation and hand-editing.
Right now I need to create copies of the file, unitFrom.entity and unitTo.entity as an example. You can see some sample vocab here:
How many {unitTo} is {unitFrom}
How many {unitFrom} are in a {unitTo}
How many {unitFrom} in a {unitTo}
What is {unitFrom} in {unitTo}
Duplicating the files is a bad solution because if those files get out-of-sync at any point it could create some very confusing and hard-to-debug issues. Using symlinks is also confusing and presumes that mycroft will only ever be deployed on linux.
I think the best solutions would be to allow named-capture-groups, perhaps something like
How many {unit:to} is {unit:from}
How many {unit:from} are in a {unit:to}
How many {unit:from} in a {unit:to}
What is {unit:from} in {unit:to}
Hi Alex,
Thanks for submitting this feature request and detailing the use case for it so clearly.
Is this something you would be interested in trying to implement?
This is a pretty big chunk of code. More than I've got the time to read through right now, especially with the "machine learning" factor. Can you give me a brief overview of how this works, and where I'd want to focus to make those changes?