Skip to content

Conversation

@rozele
Copy link
Contributor

@rozele rozele commented Nov 19, 2020

This change allows users to declaratively specify hierarchical entities in their expected utterance results. For example, a user may declare the following:

{
  "text": "Order a pepperoni pizza",
  "intent": "OrderFood",
  "entities": {
    "entity": "FoodItem",
    "startPos": 8,
    "endPos": 22,
    "children": [
      {
        "entity": "Topping",
        "startPos": 8,
        "endPos": 16
      },
      {
        "entity": "FoodType",
        "startPos": 18,
        "endPos": 22
      }
    ]
  }
}

This would result in 3 test cases, one for the parent entity (the "FoodItem" entity), and two additional test cases for each of the two nested entities ("FoodItem::Topping" and "FoodItem::FoodType").

Child entity type names are prefixed by their parent entity type names in the format parentType::childType. As such, the recursive entity parsing for the LUIS V3 provider has been updated to use this convention.

Fixes #335

This change allows users to declaratively specify hierarchical entities in their expected utterance results. For example, a user may declare the following:

```json
{
  "text": "Order a pepperoni pizza",
  "intent": "OrderFood",
  "entities": {
    "entity": "FoodItem",
    "startPos": 8,
    "endPos": 22,
    "children": [
      {
        "entity": "Topping",
        "startPos": 8,
        "endPos": 16
      },
      {
        "entity": "FoodType",
        "startPos": 18,
        "endPos": 22
      }
    ]
  }
}
```

This would result in 3 test cases, one for the parent entity (the "FoodItem" entity), and two additional test cases for each of the two nested entities ("FoodItem::Topping" and "FoodItem::FoodType").

Child entity type names are prefixed by their parent entity type names in the format `parentType::childType`. As such, the recursive entity parsing for the LUIS V3 provider has been updated to use this convention.

Fixes microsoft#335
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

Successfully merging this pull request may close these issues.

Support nested children entities in expected JSON for LUIS

1 participant