MycroftAI / padatious

A neural network intent parser
http://padatious.readthedocs.io
Apache License 2.0
159 stars 40 forks source link

Parsing Datetime #29

Closed Odianosen25 closed 4 years ago

Odianosen25 commented 4 years ago

Hello,

Thanks for the wonderful software. Pls is there a way to declare like a datetime entity, which gives as its output some utc or something?

For example I type, “What is the weather in London on Friday?” It gives me weather intent, alongside converting “Friday” to datetime string.

Thanks

MatthewScholefield commented 4 years ago

Sorry, you'll have to use a separate Python library for that. Since that functionality doesn't suite well to how Padatious works, I don't think it'd make sense to include as part of the software. Try something like Mycroft's Lingua Franca.

krisgesling commented 4 years ago

If you're using it in a Mycroft Skill you can use extract_datetime() https://mycroft-core.readthedocs.io/en/latest/source/mycroft.util.html?highlight=extract_datetime#mycroft.util.extract_datetime

Which comes from Lingua Franca

Odianosen25 commented 4 years ago

Ok thanks for the quick responses @MatthewScholefield and @krisgesling, that was kind of you guys.

I will give it a try, as suggested. I am trying to use padatious on its own for a local search engine I am building, so why I didn't want to use it as a Mycroft skill. Unless I can install Mycroft NLP (as possible with Snips) only on its own, without the rest, then that will be grand.

I will be closing this for now, but please if anyone has more info that could assist me, will still appreciate it.

Kind regards

Kind regards

krisgesling commented 4 years ago

Yep you can even pip install it :) https://pypi.org/project/lingua-franca/

Odianosen25 commented 4 years ago

Oh yes that's silly of me, I actually did look for it and didn't find it. Had to clone and manually install ;)

Thanks for the direction. Kind regards