MycroftAI / adapt

Adapt Intent Parser
Apache License 2.0
712 stars 154 forks source link

Context + one_of() issue #86

Closed forslund closed 3 years ago

forslund commented 6 years ago

When a keyword declared with one_of is provided via context the phrase isn't populated and is instead None:

{
    "intent_type": "WeatherIntent",
    "WeatherKeyword": "weather",
    "LocationContext": null,
    "target": null,
    "confidence": 1.0
}

above LocationContext is null/None

When specified as required it works as expected:

{
    "intent_type": "WeatherIntent",
    "WeatherKeyword": "weather",
    "LocationContext": "lizard",
    "target": null,
    "confidence": 0.375
}

here LocationContext is set to the value from context.

For a minimal example see https://gist.github.com/forslund/d98c98816dc90600aed7ad62bfd0f223

penrods commented 5 years ago

Once this is addressed, remove the Mycroft-Core workaround: https://github.com/MycroftAI/mycroft-core/pull/1789

forslund commented 3 years ago

This should be fixed now through #103, closing issue