Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Return multiple values for an entity type #42

Closed
electrickite opened this issue Aug 9, 2016 · 2 comments
Closed

Suggestion: Return multiple values for an entity type #42

electrickite opened this issue Aug 9, 2016 · 2 comments

Comments

@electrickite
Copy link

In some cases, it may be useful to retrieve multiple values from an utterance for a given entity type. Using the single_intent_parser.py weather example, a user might enter: "Will the weather rain or snow in Seattle?"

It would be nice to know each WeatherType in the question, perhaps something like this:

{
    "intent_type": "WeatherIntent",
    "confidence": 0.3125,
    "target": null,
    "Location": "Seattle",
    "WeatherType": [
        "rain",
        "snow"
    ]
}
@clusterfudge
Copy link
Collaborator

Hey @electrickite, sorry I'm just seeing this as you close it! 4 years later, I still don't have a good mental model on what the implementation of this would look like; it's kind of cludge-y, but you could achieve your example with multiple properties of the same type. Based on your example, it doesn't seem like ordering matters.

@clusterfudge
Copy link
Collaborator

It looks like there's no docs on what I just suggested, but you can use the attribute_name to accomplish this for required or optional properties. This is not supported with "one_of"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants