facebook / duckling

Language, engine, and tooling for expressing, testing, and evaluating composable language rules on input strings.
Other
4.05k stars 720 forks source link

How to parse rules like "every two hours" , "every two days" etc #679

Open gongshaojie12 opened 2 years ago

gongshaojie12 commented 2 years ago

Hi,I want to parse the rules like "every two hours" , "every two days", "every two weeks", "every two months" etc. I'm a newbie and don't know what to do . Please help me, thanks!

chessai commented 2 years ago

this is a known lacking feature of duckling. I was working on it some months ago but couldn't devote too much time to it. I'm not even sure my approach was the best.

gongshaojie12 commented 2 years ago

Hi @chessai Thank you very much. Can you share your approach?

gongshaojie12 commented 2 years ago

I noticed that predEveryFrom in Time/Helper.hs can handle periodic events, but I don't know how to use it.