Mycroft Community Forum

Help with Padatious (matching ambiguous things)


I’m trying to parse commands you could use in a Chatroom, like

ban hallowed for 1 week for trolling

This is my (simplified) .intend:
ban {user} for {time} for {reason}

The user and reason entities are just set to :0, but time is defined like this:

expected output would be:

user: hallowed
time: 1 week
reason: trolling

but instead i get:
user: hallowed
time: 1 week for trolling
reason: None

In this case, using regex would be probably better, but I’m still confused why I get that as a response because for trolling is nowhere near the .entity specified.

Thanks a lot in advance:)

I believe it is the ‘for {time}’ that is causing the issue everything after the for is considered {time}. Agreed regex is likely better. You may have to parse the second part separately.