Error parsing word with possessive apostrophe

I’m playing around building a couple of skills, and I seem to be getting an error with utterances containing a possessive apostrophe. Here’s the extract from the skills log:

2017-07-23 06:27:27,527 - Skills - DEBUG - {"type": "Command: mouth.reset", "data": {}, "context": null} 2017-07-23 06:27:34,381 - Skills - DEBUG - {"type": "recognizer_loop:utterance", "data": {"lang": "en-US", "session": "0185f28d-7910-446e-abbf-1c4f76c5bff7", "utterances": ["how many days until mommy's birthday"]}, "context": null} 2017-07-23 06:27:34,400 - mycroft.skills.intent_service - ERROR - Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/mycroft_core-0.8.17-py2.7.egg/mycroft/skills/intent_service.py", line 54, in handle_utterance normalize(utterance, lang), 100)) StopIteration 2017-07-23 06:27:34,404 - Skills - DEBUG - {"type": "intent_failure", "data": {"lang": "en-US", "utterance": "how many days until mommy's birthday"}, "context": null} 2017-07-23 06:27:34,406 - skill-wolfram-alpha__init__ - DEBUG - WolframAlpha fallback attempt: how many days until mommy's birthday 2017-07-23 06:27:34,407 - skill-wolfram-alpha__init__ - DEBUG - Falling back to WolframAlpha: how many days until mommy's birthday 2017-07-23 06:27:34,410 - Skills - DEBUG - {"type": "enclosure.mouth.think", "data": {}, "context": null}

If I take a look at the code that it is pointing at, there is some code relating to replacing common contractions with their expanded forms, which I assume that this doesn’t get picked up by, but I’m not too sure what happens after that.

I’m on 0.8.17. I’d upgrade, but I’m wary of the issues discussed at Mark 1 fails to connect after upgrade.

Hi,

Did you resolve this already or are you still stuck?

As you’ve seen there is some normalization going on which removes contractions and 's and such. The vocab keywords should not contain any contractions or possessive apostrophes when declaring them for a skill.

No, I’m afraid I never figured this out. I’ve got a file in the regex directory with “when is (?P\w+) birthday”. If I say something like, “when is mum birthday” as opposed to “when is mum’s birthday”, I can get it to work fine. But obviously, that’s not natural speech.

I haven’t tried in Mycroft yet but this regexp doesn’t allow any special chars such as possessive appostroph. (\w stands for word chars I think, which are basically alphanumerical characters)

Can you try with

when is (?P<person>.+) birthday

?

A bit more explanation: The error you see in the log is what happens when there is no match for the utterance and the fallback engine is triggered (more general queries, like what is a dog, etc) This is fully normal but your regex isn’t triggering.

https://pythex.org/ is a good resource for testing regexes.

/Åke