Percentage prebuilt entity for a LUIS app

Percentage numbers can appear as fractions, 3 1/2, or as percentage, 2%. Because this entity is already trained, you do not need to add example utterances containing percentage to the application intents. Percentage entity is supported in many cultures.

Types of percentage

Percentage is managed from the Recognizers-text GitHub repository

Resolution for prebuilt percentage entity

API version 2.x

The following example shows the resolution of the builtin.percentage entity.

{
  "query": "set a trigger when my stock goes up 2%",
  "topScoringIntent": {
    "intent": "SetTrigger",
    "score": 0.971157849
  },
  "intents": [
    {
      "intent": "SetTrigger",
      "score": 0.971157849
    }
  ],
  "entities": [
    {
      "entity": "2%",
      "type": "builtin.percentage",
      "startIndex": 36,
      "endIndex": 37,
      "resolution": {
        "value": "2%"
      }
    }
  ]
}

Preview API version 3.x

The following JSON is with the verbose parameter set to false:

{
    "query": "set a trigger when my stock goes up 2%",
    "prediction": {
        "normalizedQuery": "set a trigger when my stock goes up 2%",
        "topIntent": "None",
        "intents": {
            "None": {
                "score": 0.541765451
            }
        },
        "entities": {
            "percentage": [
                2
            ]
        }
    }
}

The following JSON is with the verbose parameter set to true:

{
    "query": "set a trigger when my stock goes up 2%",
    "prediction": {
        "normalizedQuery": "set a trigger when my stock goes up 2%",
        "topIntent": "None",
        "intents": {
            "None": {
                "score": 0.541765451
            }
        },
        "entities": {
            "percentage": [
                2
            ],
            "$instance": {
                "percentage": [
                    {
                        "type": "builtin.percentage",
                        "text": "2%",
                        "startIndex": 36,
                        "length": 2,
                        "modelTypeId": 2,
                        "modelType": "Prebuilt Entity Extractor"
                    }
                ]
            }
        }
    }
}

Next steps

Learn about the ordinal, number, and temperature entities.