Mycroft Community Forum

Call for testers: Mycroft with pending parser/formatter refactor

This is coming to Mycroft, unless something goes terribly wrong and the core devs object strongly. It’s not hypothetical :stuck_out_tongue:

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
git fetch chance
git checkout chance/lf-refactor
mycroft-pip uninstall lingua_franca

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.

Known issues:

* 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 lang=None anymore
  • 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 lingua_franca.load_language(<lang_code: str>)

Update: the known datetime-related problems have been patched, credit @forslund


Wanted to give it a try but git checkout chance/lf-refactor gives me following error:

error: pathspec 'chance/lf-refactor' did not match any file(s) known to git.

Don’t know if this matters but I am trying this on my own fork of mycroft-core…

I forgot to have people fetch the remote! I’ll edit the instructions. Thanks and sorry.

You’ll have to do git fetch chance and then the checkout should work.

git fetch ... worked, thanks for quick response…

Followed the updated instructions, everything looks to be working.
I am using a git install on a Rpi 3b. But I don’t use mycroft alot.

Thanks very much for testing!