This is coming to Mycroft, unless something goes terribly wrong and the core devs object strongly. It’s not hypothetical
Also, and importantly, I don’t work for MycroftAI. I’m a collaborator on Lingua Franca, and the person responsible for a big refactor that’s finally happening.gif
Lingua Franca is Mycroft’s algorithmic NLP library (as opposed to ML.) Most of the parsing, formatting, and time-related functions that used to live in
mycroft.util have moved, or are moving, to that package (though you can still import them via mycroft.util for backwards compatibility.)
Jarbas has standardized the names and locations of various functions and data, and I’ve taken those naming conventions and used them to implement dynamic function loading. This means, among other things, that you’ll no longer be loading all the functions for every language into memory, just the ones for the languages you’re using.
Now that it’s basically done, we need testers! I’ve got an early, lazy integration at my repository, on this branch.
You can test it without cloning my fork by adding me as a remote and checking the branch out, like so (from your mycroft-core directory):
git remote add chance https://github.com/ChanceNCounter/mycroft-core git fetch chance git checkout chance/lf-refactor mycroft-pip uninstall lingua_franca ./dev_setup.sh
and then starting Mycroft. Please report any issues you find 1) here, 2) in chat, channel ~languages, or 3) at the relevant PR on GitHub.
* Datetime skill has problems with certain requests
* Weather skill fails, complaining about the number of positional arguments (reason known, issue filed)
Known breaking changes for skill devs:
- Don’t pass
- Ideally, don’t pass a language at all unless you have to. That won’t break anything, but Mycroft is now responsible for making sure the user’s language is chosen. You can still pass a language if you need it to use a specific language, but this may cause problems until this is addressed. In the meantime, you can ensure that your language is loaded by calling
Update: the known datetime-related problems have been patched, credit @forslund