Parsing builtin slot values

With the probable arrival of builtin slots (for number, date, time, duration, etc.) the extracted text for these slots will need to be parsed to actionable values.

It would be pretty awesome to get a real date when saying tomorrow at six pm for example.

The Duckling library looks perfect for the job.

The Facebook updated version uses Haskell (instead of Clojure).

There is an interesting python library that plugs directly Facebook’s Duckling (still experimental but should easily be improved).

Also C bindings:

Snips also ported the Duckling library to Rust:

What do you guys think about this?

1 Like

Yes duckling seems very good for that !!

Seems their time is like snips instantTime but not sure it handle timeDelta ?

Snips did indeed improved the provided Duckling rules (durations with multiple units, etc.).

Duckling provides the engine to parse text using predefined rules.

Surely rules can be added/improved.

I think before improving it, having actual ducking into rhasspy would cover 90% of bultines slots.

It would be an enormeous big step for rhasspy. Let’s see add/improve this later once we can use them and have some experience/feedback :grin:

Agreed :slight_smile:

I was just saying the library also allows future improvements and additions.

For now:

  1. Grammar based slots for handling builtin slots
  2. Duckling (or similar?) for parsing builtin slots extracted values

Then the sky is the limit :wink:


Any news on supporting builtins slots ?

Can’t wait to test this

I guess I can even use it instead of some duation : (during | for) (0…60){number} minutes

Need a new docker version :grin:

The converters looks really nice! Great job @synesthesiam !

They open the way for builtin slots (I saw the weekday and months) and parsing using a library like Duckling or Lingua Franca directly from the NLU.

Looking forward to grammar based slots And parsing :blush:

1 Like

Thanks! The plan is for Kaldi-based profiles to use grammar slots in 2.5, and for the other speech systems (pocketsphinx, DeepSpeech, Julius) to use slot programs. There’s still some work to do to make them more efficient, but it should be fine for small cases right now.

1 Like

In the meantime that this is properly implemented, I made a quick and very dirty workaround for using Snips NLU builtin entity slots:

You can use it as if it was a slot program in a Rhasspy sentence:

Set a timer for ($snips/duration){duration}

Supported builtin entities are documented here.