MycroftAI / adapt

Adapt Intent Parser
Apache License 2.0
711 stars 155 forks source link

Entity Recognition Issue #79

Closed joony0123 closed 3 years ago

joony0123 commented 6 years ago

Hello, first of all I appreciate tremendously to the Mycroft AI team for dedicating their passion towards opensource AI. I am learning and benefiting so much from this personally.

I am not sure why this is happening but would like to ask if this is a bug internally in Adapt code for Python.

In identical environmental situations (Other code/config same), with a command

"remind me at 5 pm to do something" (after calling wake word)

if I have

reminder_keyword = [
'remind',
'remind me'
]

as reminder keyword entities, I get no intent that satisfies the query above. But then I tried, "can you remind me at 5 pm to do something" (after calling wake word) Then it magically returns the correct reminder intent.

So feeling suspicious, I changed my reminder_keyword list to

reminder_keyword = [
'remind',
'remind me',
' remind ',
' remind me '
]

having same words with one that has no space, and another with spaces next to the phrase. Then as I suspected, it correctly picked up the intent from the same query that it failed before ("remind me at 5 pm to do something"). (nothing changed other than this)

Conclusion : Why is Adapt returning the correct intent when I added the phrases with spaces on each end? I think this is a bug related to how Adapt handles spaces internally. For a better developing environment, I believe we shouldn't be required to add additional identical phrases with spaces at the end to make it work as intended.

Thank you.

joony0123 commented 6 years ago

I have found that there is definitely something with space. Unlike the issue above, it seems the way how Adapt interprets the query string is having issue.

When I queried as " remind me at 5pm to do something " (having spaces on both ends of the string) it was able to correctly identify the intent. But with "remind me at 5pm to do something", it was not able to identify any intent.

I used reminder_keyword = [ 'remind' ]

But without the additional spaces on each end, it was not able to do that. This may be critical as most of the STT queries sent to adapt do not add additional spaces on each end.

clusterfudge commented 6 years ago

Hi @joony0123, can you please provide a gist so we can reproduce? Is this a problem using adapt in the context of mycroft-core (and in that case, vanilla, or developing your own skill), or are you using adapt directly?

clusterfudge commented 3 years ago

Hey @joony0123, without a reproduction it's difficult for us to diagnose this. If you are still seeing this issue, I'll leave it open for the next 7 days, otherwise we'll close as cannot reproduce.

clusterfudge commented 3 years ago

Closing as cannot reproduce. In the future, if we've addressed https://github.com/MycroftAI/mycroft-core/issues/2883 , hopefully it'll be easier to debug issues like this.