LUIS 应用的数字预生成实体Number prebuilt entity for a LUIS app

有许多方式使用数字值来量化、表达和描述信息片段。There are many ways in which numeric values are used to quantify, express, and describe pieces of information. 本文仅包括了其中一些可能的示例。This article covers only some of the possible examples. LUIS 解释用户陈述中的变体并返回一致的数字值。LUIS interprets the variations in user utterances and returns consistent numeric values. 此实体已定型,因此不需要将包含数字的陈述示例添加到应用程序意向中。Because this entity is already trained, you do not need to add example utterances containing number to the application intents.

数字类型Types of number

数字托管在 Recognizers-text GitHub 存储库中Number is managed from the Recognizers-text GitHub repository

数字解析示例Examples of number resolution

话语Utterance 实体Entity 解决方法Resolution
one thousand times "one thousand" "1000"
1,000 people "1,000" "1000"
1/2 cup "1 / 2" "0.5"
one half the amount "one half" "0.5"
one hundred fifty orders "one hundred fifty" "150"
one hundred and fifty books "one hundred and fifty" "150"
a grade of one point five "one point five" "1.5"
buy two dozen eggs "two dozen" "24"

LUIS 在它返回的 JSON 响应的 resolution 字段中包括 builtin.number 实体的已识别值。LUIS includes the recognized value of a builtin.number entity in the resolution field of the JSON response it returns.

预构建数字解析Resolution for prebuilt number

查询返回以下实体对象:The following entity objects are returned for the query:

order two dozen eggs

以下 JSON 的 verbose 参数设置为 falseThe following JSON is with the verbose parameter set to false:

"entities": {
    "number": [
        24
    ]
}

后续步骤Next steps

详细了解 V3 预测终结点Learn more about the V3 prediction endpoint.

了解货币序号百分比Learn about the currency, ordinal, and percentage.