Mismatched properties including subtype, modelType, recognitionSources and score.

This commit is contained in:
Chris McConnell 2019-07-16 15:03:04 -07:00
Родитель c8c08a027a
Коммит 8841617dfd
25 изменённых файлов: 1651 добавлений и 28 удалений

Просмотреть файл

@ -181,14 +181,12 @@ namespace Microsoft.Bot.Builder.AI.Luis
obj.score = (double)score;
}
/* Subtypes are not really useful
#pragma warning disable IDE0007 // Use implicit type
if (entity.AdditionalProperties.TryGetValue("resolution", out dynamic resolution) && resolution.subtype != null)
#pragma warning restore IDE0007 // Use implicit type
{
obj.subtype = resolution.subtype;
}
*/
}
return obj;

Просмотреть файл

@ -127,9 +127,7 @@ namespace Microsoft.Bot.Builder.AI.Luis
{
nobj.Add("endIndex", property.Value.Value<int>() + property.Parent["startIndex"].Value<int>());
}
else if (!((isStr && name == "modelType") ||
(isInt && name == "modelTypeId") ||
(isArr && name == "recognitionSources") ||
else if (!((isInt && name == "modelTypeId") ||
(isStr && name == "role")))
{
nobj.Add(name, val);

Просмотреть файл

@ -244,6 +244,12 @@ namespace Microsoft.Bot.Builder.AI.Luis.Tests
[TestMethod]
public async Task GeoPeopleOrdinal() => await TestJson<RecognizerResult>("GeoPeopleOrdinal.json");
[TestMethod]
public async Task Minimal() => await TestJson<RecognizerResult>("Minimal.json");
[TestMethod]
public async Task MinimalWithGeo() => await TestJson<RecognizerResult>("MinimalWithGeo.json");
[TestMethod]
public async Task PrebuiltDomains() => await TestJson<RecognizerResult>("Prebuilt.json");

Просмотреть файл

@ -4,6 +4,10 @@
"Composite1": [
{
"endIndex": 306,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.880988955,
"startIndex": 0,
"text": "12 years old and 3 days old and monday july 3rd, 2019 and every monday and between 3am and 5:30am and 4 acres and 4 pico meters and chrimc@hotmail.com and $4 and $4.25 and also 32 and 210.4 and first and 10% and 10.5% and 425-555-1234 and 3 degrees and -27.5 degrees c and the next one and the previous one",
@ -13,24 +17,40 @@
"ordinalV2": [
{
"endIndex": 47,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 44,
"text": "3rd",
"type": "builtin.ordinalV2"
},
{
"endIndex": 199,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 194,
"text": "first",
"type": "builtin.ordinalV2"
},
{
"endIndex": 285,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 277,
"text": "next one",
"type": "builtin.ordinalV2.relative"
},
{
"endIndex": 306,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 294,
"text": "previous one",
"type": "builtin.ordinalV2.relative"
@ -43,12 +63,20 @@
"age": [
{
"endIndex": 12,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "12 years old",
"type": "builtin.age"
},
{
"endIndex": 27,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 17,
"text": "3 days old",
"type": "builtin.age"
@ -57,30 +85,50 @@
"datetime": [
{
"endIndex": 8,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "12 years",
"type": "builtin.datetimeV2.duration"
},
{
"endIndex": 23,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 17,
"text": "3 days",
"type": "builtin.datetimeV2.duration"
},
{
"endIndex": 53,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 32,
"text": "monday july 3rd, 2019",
"type": "builtin.datetimeV2.date"
},
{
"endIndex": 70,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 58,
"text": "every monday",
"type": "builtin.datetimeV2.set"
},
{
"endIndex": 97,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 75,
"text": "between 3am and 5:30am",
"type": "builtin.datetimeV2.timerange"
@ -89,12 +137,20 @@
"dimension": [
{
"endIndex": 109,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 102,
"text": "4 acres",
"type": "builtin.dimension"
},
{
"endIndex": 127,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 114,
"text": "4 pico meters",
"type": "builtin.dimension"
@ -103,6 +159,10 @@
"email": [
{
"endIndex": 150,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 132,
"text": "chrimc@hotmail.com",
"type": "builtin.email"
@ -111,12 +171,20 @@
"money": [
{
"endIndex": 157,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 155,
"text": "$4",
"type": "builtin.currency"
},
{
"endIndex": 167,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 162,
"text": "$4.25",
"type": "builtin.currency"
@ -125,115 +193,162 @@
"number": [
{
"endIndex": 2,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 0,
"subtype": "integer",
"text": "12",
"type": "builtin.number"
},
{
"endIndex": 18,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 17,
"subtype": "integer",
"text": "3",
"type": "builtin.number"
},
{
"endIndex": 53,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 49,
"subtype": "integer",
"text": "2019",
"type": "builtin.number"
},
{
"endIndex": 92,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 91,
"subtype": "integer",
"text": "5",
"type": "builtin.number"
},
{
"endIndex": 103,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 102,
"subtype": "integer",
"text": "4",
"type": "builtin.number"
},
{
"endIndex": 115,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 114,
"subtype": "integer",
"text": "4",
"type": "builtin.number"
},
{
"endIndex": 157,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 156,
"subtype": "integer",
"text": "4",
"type": "builtin.number"
},
{
"endIndex": 167,
"startIndex": 163,
"subtype": "decimal",
"text": "4.25",
"type": "builtin.number"
},
{
"endIndex": 179,
"startIndex": 177,
"subtype": "integer",
"text": "32",
"type": "builtin.number"
},
{
"endIndex": 189,
"startIndex": 184,
"subtype": "decimal",
"text": "210.4",
"type": "builtin.number"
},
{
"endIndex": 206,
"startIndex": 204,
"subtype": "integer",
"text": "10",
"type": "builtin.number"
},
{
"endIndex": 216,
"startIndex": 212,
"subtype": "decimal",
"text": "10.5",
"type": "builtin.number"
},
{
"endIndex": 225,
"startIndex": 222,
"subtype": "integer",
"text": "425",
"type": "builtin.number"
},
{
"endIndex": 229,
"startIndex": 226,
"subtype": "integer",
"text": "555",
"type": "builtin.number"
},
{
"endIndex": 234,
"startIndex": 230,
"subtype": "integer",
"text": "1234",
"type": "builtin.number"
},
{
"endIndex": 240,
"startIndex": 239,
"subtype": "integer",
"text": "3",
"type": "builtin.number"
},
{
"endIndex": 258,
"startIndex": 253,
"subtype": "decimal",
"text": "-27.5",
"type": "builtin.number"
},
{
"endIndex": 285,
"startIndex": 282,
"subtype": "integer",
"text": "one",
"type": "builtin.number"
},
{
"endIndex": 306,
"startIndex": 303,
"subtype": "integer",
"text": "one",
"type": "builtin.number"
}
@ -255,7 +370,6 @@
"phonenumber": [
{
"endIndex": 234,
"score": 0.9,
"startIndex": 222,
"text": "425-555-1234",
"type": "builtin.phonenumber"

Просмотреть файл

@ -4,6 +4,10 @@
"Composite2": [
{
"endIndex": 69,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.97076714,
"startIndex": 0,
"text": "http://foo.com is where you can fly from seattle to dallas via denver",
@ -13,6 +17,10 @@
"geographyV2": [
{
"endIndex": 48,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 41,
"text": "seattle",
"type": "builtin.geographyV2.city"
@ -25,6 +33,10 @@
"City": [
{
"endIndex": 69,
"modelType": "Hierarchical Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.984581649,
"startIndex": 63,
"text": "denver",
@ -34,6 +46,10 @@
"From": [
{
"endIndex": 48,
"modelType": "Hierarchical Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.999511,
"startIndex": 41,
"text": "seattle",
@ -43,6 +59,10 @@
"To": [
{
"endIndex": 58,
"modelType": "Hierarchical Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.9984612,
"startIndex": 52,
"text": "dallas",
@ -52,6 +72,10 @@
"url": [
{
"endIndex": 14,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "http://foo.com",
"type": "builtin.url"

Просмотреть файл

@ -4,6 +4,10 @@
"Destination": [
{
"endIndex": 33,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.9818366,
"startIndex": 25,
"text": "12346 WA",
@ -13,6 +17,10 @@
"Source": [
{
"endIndex": 21,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.9345161,
"startIndex": 13,
"text": "12345 VA",
@ -26,7 +34,12 @@
"number": [
{
"endIndex": 30,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 25,
"subtype": "integer",
"text": "12346",
"type": "builtin.number"
}
@ -34,6 +47,10 @@
"State": [
{
"endIndex": 33,
"modelType": "Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.9893861,
"startIndex": 31,
"text": "WA",
@ -55,7 +72,12 @@
"number": [
{
"endIndex": 18,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 13,
"subtype": "integer",
"text": "12345",
"type": "builtin.number"
}
@ -63,6 +85,10 @@
"State": [
{
"endIndex": 21,
"modelType": "Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.941649556,
"startIndex": 19,
"text": "VA",
@ -277,7 +303,8 @@
"IncludeInstanceData": true,
"LogPersonalInformation": false,
"Slot": "production",
"Timeout": 100000.0
"Timeout": 100000.0,
"Version": "GeoPeople"
},
"response": {
"prediction": {

Просмотреть файл

@ -4,12 +4,20 @@
"Airline": [
{
"endIndex": 21,
"modelType": "List Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 4,
"text": "zimbabwe airlines",
"type": "Airline"
},
{
"endIndex": 39,
"modelType": "List Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 25,
"text": "delta airlines",
"type": "Airline"
@ -18,6 +26,10 @@
"geographyV2": [
{
"endIndex": 12,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 4,
"text": "zimbabwe",
"type": "builtin.geographyV2.countryRegion"

Просмотреть файл

@ -4,12 +4,20 @@
"number": [
{
"endIndex": 7,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"externalEntities"
],
"startIndex": 4,
"text": "hul",
"type": "builtin.number"
},
{
"endIndex": 13,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 12,
"text": "2",
"type": "builtin.number"

Просмотреть файл

@ -4,6 +4,10 @@
"Address": [
{
"endIndex": 13,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.7160641,
"startIndex": 8,
"text": "35 WA",
@ -11,6 +15,10 @@
},
{
"endIndex": 33,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"externalEntities"
],
"startIndex": 17,
"text": "repent harelquin",
"type": "Address"
@ -23,6 +31,10 @@
"number": [
{
"endIndex": 10,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 8,
"text": "35",
"type": "builtin.number"
@ -31,6 +43,10 @@
"State": [
{
"endIndex": 13,
"modelType": "Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.614376,
"startIndex": 11,
"text": "WA",

Просмотреть файл

@ -4,12 +4,20 @@
"Airline": [
{
"endIndex": 23,
"modelType": "List Entity Extractor",
"recognitionSources": [
"externalEntities"
],
"startIndex": 7,
"text": "humberg airlines",
"type": "Airline"
},
{
"endIndex": 32,
"modelType": "List Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 27,
"text": "Delta",
"type": "Airline"

Просмотреть файл

@ -4,12 +4,20 @@
"Part": [
{
"endIndex": 5,
"modelType": "Regex Entity Extractor",
"recognitionSources": [
"externalEntities"
],
"startIndex": 0,
"text": "42ski",
"type": "Part"
},
{
"endIndex": 26,
"modelType": "Regex Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 21,
"text": "kb423",
"type": "Part"

Просмотреть файл

@ -4,6 +4,10 @@
"Address": [
{
"endIndex": 13,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.7033113,
"startIndex": 8,
"text": "37 wa",
@ -13,6 +17,10 @@
"number": [
{
"endIndex": 19,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 17,
"text": "82",
"type": "builtin.number"
@ -21,6 +29,10 @@
"State": [
{
"endIndex": 22,
"modelType": "Entity Extractor",
"recognitionSources": [
"externalEntities"
],
"startIndex": 20,
"text": "co",
"type": "State"
@ -33,6 +45,10 @@
"number": [
{
"endIndex": 10,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 8,
"text": "37",
"type": "builtin.number"
@ -41,6 +57,11 @@
"State": [
{
"endIndex": 13,
"modelType": "Entity Extractor",
"recognitionSources": [
"model",
"externalEntities"
],
"score": 0.5987082,
"startIndex": 11,
"text": "wa",

Просмотреть файл

@ -4,6 +4,10 @@
"Address": [
{
"endIndex": 13,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.7033113,
"startIndex": 8,
"text": "37 wa",
@ -13,6 +17,10 @@
"number": [
{
"endIndex": 19,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 17,
"text": "82",
"type": "builtin.number"
@ -21,6 +29,10 @@
"State": [
{
"endIndex": 22,
"modelType": "Entity Extractor",
"recognitionSources": [
"externalEntities"
],
"startIndex": 20,
"text": "co",
"type": "State"
@ -33,6 +45,10 @@
"number": [
{
"endIndex": 10,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 8,
"text": "37",
"type": "builtin.number"
@ -41,6 +57,11 @@
"State": [
{
"endIndex": 13,
"modelType": "Entity Extractor",
"recognitionSources": [
"model",
"externalEntities"
],
"score": 0.5987082,
"startIndex": 11,
"text": "wa",

Просмотреть файл

@ -4,6 +4,10 @@
"child": [
{
"endIndex": 99,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 87,
"text": "lisa simpson",
"type": "builtin.personName"
@ -12,6 +16,10 @@
"endloc": [
{
"endIndex": 51,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 44,
"text": "jakarta",
"type": "builtin.geographyV2.city"
@ -20,6 +28,10 @@
"ordinalV2": [
{
"endIndex": 28,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 24,
"text": "last",
"type": "builtin.ordinalV2.relative"
@ -28,6 +40,10 @@
"parent": [
{
"endIndex": 69,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 56,
"text": "homer simpson",
"type": "builtin.personName"
@ -36,6 +52,10 @@
"startloc": [
{
"endIndex": 40,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 34,
"text": "london",
"type": "builtin.geographyV2.city"
@ -44,6 +64,10 @@
"startpos": [
{
"endIndex": 20,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 8,
"text": "next to last",
"type": "builtin.ordinalV2.relative"

Просмотреть файл

@ -0,0 +1,144 @@
{
"entities": {
"Airline": [
[
"Delta"
]
],
"datetime": [
{
"timex": [
"2019-07-17T15"
],
"type": "datetime"
}
],
"dimension": [
{
"number": 3,
"units": "Picometer"
}
]
},
"intents": {
"Roles": {
"score": 0.489722282
}
},
"sentiment": {
"label": "neutral",
"score": 0.5
},
"text": "fly on delta tomorrow at 3pm",
"v2": {
"options": {
"BingSpellCheckSubscriptionKey": null,
"IncludeAllIntents": false,
"IncludeInstanceData": false,
"Log": null,
"LogPersonalInformation": false,
"SpellCheck": null,
"Staging": null,
"Timeout": 100000.0,
"TimezoneOffset": null
},
"response": {
"entities": [
{
"endIndex": 27,
"entity": "tomorrow at 3pm",
"resolution": {
"values": [
{
"timex": "2019-07-17T15",
"type": "datetime",
"value": "2019-07-17 15:00:00"
}
]
},
"startIndex": 13,
"type": "builtin.datetimeV2.datetime"
},
{
"endIndex": 27,
"entity": "3pm",
"resolution": {
"unit": "Picometer",
"value": "3"
},
"startIndex": 25,
"type": "builtin.dimension"
},
{
"endIndex": 11,
"entity": "delta",
"resolution": {
"values": [
"Delta"
]
},
"startIndex": 7,
"type": "Airline"
}
],
"query": "fly on delta tomorrow at 3pm",
"sentimentAnalysis": {
"label": "neutral",
"score": 0.5
},
"topScoringIntent": {
"intent": "Roles",
"score": 0.489722282
}
}
},
"v3": {
"options": {
"IncludeAllIntents": false,
"IncludeInstanceData": false,
"LogPersonalInformation": false,
"Slot": "production",
"Timeout": 100000.0
},
"response": {
"prediction": {
"entities": {
"Airline": [
[
"Delta"
]
],
"datetimeV2": [
{
"type": "datetime",
"values": [
{
"timex": "2019-07-17T15",
"value": "2019-07-17 15:00:00"
}
]
}
],
"dimension": [
{
"number": 3,
"unit": "Picometer"
}
]
},
"intents": {
"Roles": {
"score": 0.489722282
}
},
"normalizedQuery": "fly on delta tomorrow at 3pm",
"sentiment": {
"label": "neutral",
"score": 0.5
},
"topIntent": "Roles"
},
"query": "fly on delta tomorrow at 3pm"
}
}
}

Просмотреть файл

@ -0,0 +1,739 @@
{
"entities": {
"geographyV2": [
{
"location": "dallas",
"type": "city"
},
{
"location": "texas",
"type": "state"
}
]
},
"intents": {
"EntityTests": {
"score": 0.149930492
}
},
"sentiment": {
"label": "neutral",
"score": 0.5
},
"text": "fly to dallas, texas",
"v2": {
"options": {
"BingSpellCheckSubscriptionKey": null,
"IncludeAllIntents": false,
"IncludeInstanceData": false,
"Log": null,
"LogPersonalInformation": false,
"SpellCheck": null,
"Staging": null,
"Timeout": 100000.0,
"TimezoneOffset": null
},
"response": {
"entities": [
{
"endIndex": 12,
"entity": "dallas",
"startIndex": 7,
"type": "builtin.geographyV2.city"
},
{
"endIndex": 19,
"entity": "texas",
"startIndex": 15,
"type": "builtin.geographyV2.state"
}
],
"query": "fly to dallas, texas",
"sentimentAnalysis": {
"label": "neutral",
"score": 0.5
},
"topScoringIntent": {
"intent": "EntityTests",
"score": 0.149930492
}
}
},
"v3": {
"options": {
"IncludeAllIntents": false,
"IncludeInstanceData": false,
"LogPersonalInformation": false,
"Slot": "production",
"Timeout": 100000.0
},
"response": {
"prediction": {
"entities": {
"$instance": {
"Composite1": [
{
"length": 306,
"modelType": "Composite Entity Extractor",
"modelTypeId": 4,
"recognitionSources": [
"model"
],
"score": 0.880988955,
"startIndex": 0,
"text": "12 years old and 3 days old and monday july 3rd, 2019 and every monday and between 3am and 5:30am and 4 acres and 4 pico meters and chrimc@hotmail.com and $4 and $4.25 and also 32 and 210.4 and first and 10% and 10.5% and 425-555-1234 and 3 degrees and -27.5 degrees c and the next one and the previous one",
"type": "Composite1"
}
],
"ordinalV2": [
{
"length": 3,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 44,
"text": "3rd",
"type": "builtin.ordinalV2"
},
{
"length": 5,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 194,
"text": "first",
"type": "builtin.ordinalV2"
},
{
"length": 8,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 277,
"text": "next one",
"type": "builtin.ordinalV2.relative"
},
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 294,
"text": "previous one",
"type": "builtin.ordinalV2.relative"
}
]
},
"Composite1": [
{
"$instance": {
"age": [
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "12 years old",
"type": "builtin.age"
},
{
"length": 10,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 17,
"text": "3 days old",
"type": "builtin.age"
}
],
"datetimeV2": [
{
"length": 8,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "12 years",
"type": "builtin.datetimeV2.duration"
},
{
"length": 6,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 17,
"text": "3 days",
"type": "builtin.datetimeV2.duration"
},
{
"length": 21,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 32,
"text": "monday july 3rd, 2019",
"type": "builtin.datetimeV2.date"
},
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 58,
"text": "every monday",
"type": "builtin.datetimeV2.set"
},
{
"length": 22,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 75,
"text": "between 3am and 5:30am",
"type": "builtin.datetimeV2.timerange"
}
],
"dimension": [
{
"length": 7,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 102,
"text": "4 acres",
"type": "builtin.dimension"
},
{
"length": 13,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 114,
"text": "4 pico meters",
"type": "builtin.dimension"
}
],
"email": [
{
"length": 18,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 132,
"text": "chrimc@hotmail.com",
"type": "builtin.email"
}
],
"money": [
{
"length": 2,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 155,
"text": "$4",
"type": "builtin.currency"
},
{
"length": 5,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 162,
"text": "$4.25",
"type": "builtin.currency"
}
],
"number": [
{
"length": 2,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "12",
"type": "builtin.number"
},
{
"length": 1,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 17,
"text": "3",
"type": "builtin.number"
},
{
"length": 4,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 49,
"text": "2019",
"type": "builtin.number"
},
{
"length": 1,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 91,
"text": "5",
"type": "builtin.number"
},
{
"length": 1,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 102,
"text": "4",
"type": "builtin.number"
},
{
"length": 1,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 114,
"text": "4",
"type": "builtin.number"
},
{
"length": 1,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 156,
"text": "4",
"type": "builtin.number"
},
{
"length": 4,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 163,
"text": "4.25",
"type": "builtin.number"
},
{
"length": 2,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 177,
"text": "32",
"type": "builtin.number"
},
{
"length": 5,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 184,
"text": "210.4",
"type": "builtin.number"
},
{
"length": 2,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 204,
"text": "10",
"type": "builtin.number"
},
{
"length": 4,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 212,
"text": "10.5",
"type": "builtin.number"
},
{
"length": 3,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 222,
"text": "425",
"type": "builtin.number"
},
{
"length": 3,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 226,
"text": "555",
"type": "builtin.number"
},
{
"length": 4,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 230,
"text": "1234",
"type": "builtin.number"
},
{
"length": 1,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 239,
"text": "3",
"type": "builtin.number"
},
{
"length": 5,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 253,
"text": "-27.5",
"type": "builtin.number"
},
{
"length": 3,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 282,
"text": "one",
"type": "builtin.number"
},
{
"length": 3,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 303,
"text": "one",
"type": "builtin.number"
}
],
"percentage": [
{
"length": 3,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 204,
"text": "10%",
"type": "builtin.percentage"
},
{
"length": 5,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 212,
"text": "10.5%",
"type": "builtin.percentage"
}
],
"phonenumber": [
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"score": 0.9,
"startIndex": 222,
"text": "425-555-1234",
"type": "builtin.phonenumber"
}
],
"temperature": [
{
"length": 9,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 239,
"text": "3 degrees",
"type": "builtin.temperature"
},
{
"length": 15,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 253,
"text": "-27.5 degrees c",
"type": "builtin.temperature"
}
]
},
"age": [
{
"number": 12,
"unit": "Year"
},
{
"number": 3,
"unit": "Day"
}
],
"datetimeV2": [
{
"type": "duration",
"values": [
{
"timex": "P12Y",
"value": "378432000"
}
]
},
{
"type": "duration",
"values": [
{
"timex": "P3D",
"value": "259200"
}
]
},
{
"type": "date",
"values": [
{
"timex": "2019-07-03",
"value": "2019-07-03"
}
]
},
{
"type": "set",
"values": [
{
"timex": "XXXX-WXX-1",
"value": "not resolved"
}
]
},
{
"type": "timerange",
"values": [
{
"end": "05:30:00",
"start": "03:00:00",
"timex": "(T03,T05:30,PT2H30M)"
}
]
}
],
"dimension": [
{
"number": 4,
"unit": "Acre"
},
{
"number": 4,
"unit": "Picometer"
}
],
"email": [
"chrimc@hotmail.com"
],
"money": [
{
"number": 4,
"unit": "Dollar"
},
{
"number": 4.25,
"unit": "Dollar"
}
],
"number": [
12,
3,
2019,
5,
4,
4,
4,
4.25,
32,
210.4,
10,
10.5,
425,
555,
1234,
3,
-27.5,
1,
1
],
"percentage": [
10,
10.5
],
"phonenumber": [
"425-555-1234"
],
"temperature": [
{
"number": 3,
"unit": "Degree"
},
{
"number": -27.5,
"unit": "C"
}
]
}
],
"ordinalV2": [
{
"offset": 3,
"relativeTo": "start"
},
{
"offset": 1,
"relativeTo": "start"
},
{
"offset": 1,
"relativeTo": "current"
},
{
"offset": -1,
"relativeTo": "current"
}
]
},
"intents": {
"Cancel": {
"score": 1.56337478E-06
},
"Delivery": {
"score": 0.0002846266
},
"EntityTests": {
"score": 0.953405857
},
"Greeting": {
"score": 8.20979437E-07
},
"Help": {
"score": 4.81870757E-06
},
"None": {
"score": 0.01040122
},
"Roles": {
"score": 0.197366714
},
"search": {
"score": 0.14049834
},
"SpecifyName": {
"score": 0.000137732946
},
"Travel": {
"score": 0.0100996653
},
"Weather.GetForecast": {
"score": 0.0143940123
}
},
"normalizedQuery": "12 years old and 3 days old and monday july 3rd, 2019 and every monday and between 3am and 5:30am and 4 acres and 4 pico meters and chrimc@hotmail.com and $4 and $4.25 and also 32 and 210.4 and first and 10% and 10.5% and 425-555-1234 and 3 degrees and -27.5 degrees c and the next one and the previous one",
"sentiment": {
"label": "neutral",
"score": 0.5
},
"topIntent": "EntityTests"
},
"query": "12 years old and 3 days old and monday july 3rd, 2019 and every monday and between 3am and 5:30am and 4 acres and 4 pico meters and chrimc@hotmail.com and $4 and $4.25 and also 32 and 210.4 and first and 10% and 10.5% and 425-555-1234 and 3 degrees and -27.5 degrees c and the next one and the previous one"
}
}
}

Просмотреть файл

@ -4,6 +4,10 @@
"extra": [
{
"endIndex": 76,
"modelType": "Pattern.Any Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 71,
"text": "kb435",
"type": "subject"
@ -12,6 +16,10 @@
"Part": [
{
"endIndex": 76,
"modelType": "Regex Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 71,
"text": "kb435",
"type": "Part"
@ -20,6 +28,10 @@
"person": [
{
"endIndex": 61,
"modelType": "Pattern.Any Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 49,
"text": "bart simpson",
"type": "person"
@ -28,6 +40,10 @@
"personName": [
{
"endIndex": 61,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 49,
"text": "bart simpson",
"type": "builtin.personName"
@ -36,6 +52,10 @@
"subject": [
{
"endIndex": 43,
"modelType": "Pattern.Any Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 12,
"text": "something wicked this way comes",
"type": "subject"

Просмотреть файл

@ -4,6 +4,10 @@
"Composite2": [
{
"endIndex": 66,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.7077416,
"startIndex": 0,
"text": "http://foo.com is where you can get a weather forecast for seattle",
@ -13,6 +17,10 @@
"geographyV2": [
{
"endIndex": 66,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 59,
"text": "seattle",
"type": "builtin.geographyV2.city"
@ -25,6 +33,10 @@
"url": [
{
"endIndex": 14,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "http://foo.com",
"type": "builtin.url"
@ -33,6 +45,10 @@
"Weather_Location": [
{
"endIndex": 66,
"modelType": "Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.76184386,
"startIndex": 59,
"text": "seattle",

Просмотреть файл

@ -4,26 +4,34 @@
"Name": [
{
"endIndex": 15,
"modelType": "Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.933022,
"startIndex": 11,
"text": "emad",
"text": "Emad",
"type": "Name"
}
],
"personName": [
{
"endIndex": 15,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 11,
"text": "emad",
"text": "Emad",
"type": "builtin.personName"
}
]
},
"Name": [
"emad"
"Emad"
],
"personName": [
"emad"
"Emad"
]
},
"intents": {

Просмотреть файл

@ -4,6 +4,10 @@
"Composite1": [
{
"endIndex": 306,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.880988955,
"startIndex": 0,
"text": "12 years old and 3 days old and monday july 3rd, 2019 and every monday and between 3am and 5:30am and 4 acres and 4 pico meters and chrimc@hotmail.com and $4 and $4.25 and also 32 and 210.4 and first and 10% and 10.5% and 425-555-1234 and 3 degrees and -27.5 degrees c and the next one and the previous one",
@ -13,24 +17,40 @@
"ordinalV2": [
{
"endIndex": 47,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 44,
"text": "3rd",
"type": "builtin.ordinalV2"
},
{
"endIndex": 199,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 194,
"text": "first",
"type": "builtin.ordinalV2"
},
{
"endIndex": 285,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 277,
"text": "next one",
"type": "builtin.ordinalV2.relative"
},
{
"endIndex": 306,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 294,
"text": "previous one",
"type": "builtin.ordinalV2.relative"
@ -43,12 +63,20 @@
"age": [
{
"endIndex": 12,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "12 years old",
"type": "builtin.age"
},
{
"endIndex": 27,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 17,
"text": "3 days old",
"type": "builtin.age"
@ -57,30 +85,50 @@
"datetime": [
{
"endIndex": 8,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "12 years",
"type": "builtin.datetimeV2.duration"
},
{
"endIndex": 23,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 17,
"text": "3 days",
"type": "builtin.datetimeV2.duration"
},
{
"endIndex": 53,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 32,
"text": "monday july 3rd, 2019",
"type": "builtin.datetimeV2.date"
},
{
"endIndex": 70,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 58,
"text": "every monday",
"type": "builtin.datetimeV2.set"
},
{
"endIndex": 97,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 75,
"text": "between 3am and 5:30am",
"type": "builtin.datetimeV2.timerange"
@ -89,12 +137,20 @@
"dimension": [
{
"endIndex": 109,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 102,
"text": "4 acres",
"type": "builtin.dimension"
},
{
"endIndex": 127,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 114,
"text": "4 pico meters",
"type": "builtin.dimension"
@ -103,6 +159,10 @@
"email": [
{
"endIndex": 150,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 132,
"text": "chrimc@hotmail.com",
"type": "builtin.email"
@ -111,12 +171,20 @@
"money": [
{
"endIndex": 157,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 155,
"text": "$4",
"type": "builtin.currency"
},
{
"endIndex": 167,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 162,
"text": "$4.25",
"type": "builtin.currency"
@ -125,114 +193,194 @@
"number": [
{
"endIndex": 2,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 0,
"subtype": "integer",
"text": "12",
"type": "builtin.number"
},
{
"endIndex": 18,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 17,
"subtype": "integer",
"text": "3",
"type": "builtin.number"
},
{
"endIndex": 53,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 49,
"subtype": "integer",
"text": "2019",
"type": "builtin.number"
},
{
"endIndex": 92,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 91,
"text": "5",
"type": "builtin.number"
"type": "builtin.number",
"subtype": "integer"
},
{
"endIndex": 103,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 102,
"text": "4",
"type": "builtin.number"
},
{
"endIndex": 115,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 114,
"text": "4",
"type": "builtin.number"
},
{
"endIndex": 157,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 156,
"text": "4",
"type": "builtin.number"
},
{
"endIndex": 167,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 163,
"text": "4.25",
"type": "builtin.number"
},
{
"endIndex": 179,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 177,
"text": "32",
"type": "builtin.number"
},
{
"endIndex": 189,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 184,
"text": "210.4",
"type": "builtin.number"
},
{
"endIndex": 206,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 204,
"text": "10",
"type": "builtin.number"
},
{
"endIndex": 216,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 212,
"text": "10.5",
"type": "builtin.number"
},
{
"endIndex": 225,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 222,
"text": "425",
"type": "builtin.number"
},
{
"endIndex": 229,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 226,
"text": "555",
"type": "builtin.number"
},
{
"endIndex": 234,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 230,
"text": "1234",
"type": "builtin.number"
},
{
"endIndex": 240,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 239,
"text": "3",
"type": "builtin.number"
},
{
"endIndex": 258,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 253,
"text": "-27.5",
"type": "builtin.number"
},
{
"endIndex": 285,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 282,
"text": "one",
"type": "builtin.number"
},
{
"endIndex": 306,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 303,
"text": "one",
"type": "builtin.number"
@ -241,12 +389,20 @@
"percentage": [
{
"endIndex": 207,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 204,
"text": "10%",
"type": "builtin.percentage"
},
{
"endIndex": 217,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 212,
"text": "10.5%",
"type": "builtin.percentage"
@ -255,6 +411,10 @@
"phonenumber": [
{
"endIndex": 234,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.9,
"startIndex": 222,
"text": "425-555-1234",
@ -264,12 +424,20 @@
"temperature": [
{
"endIndex": 248,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 239,
"text": "3 degrees",
"type": "builtin.temperature"
},
{
"endIndex": 268,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 253,
"text": "-27.5 degrees c",
"type": "builtin.temperature"

Просмотреть файл

@ -4,6 +4,10 @@
"Composite2": [
{
"endIndex": 66,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.7077416,
"startIndex": 0,
"text": "http://foo.com is where you can get a weather forecast for seattle",
@ -13,6 +17,10 @@
"geographyV2": [
{
"endIndex": 66,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 59,
"text": "seattle",
"type": "builtin.geographyV2.city"
@ -25,6 +33,10 @@
"url": [
{
"endIndex": 14,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "http://foo.com",
"type": "builtin.url"
@ -33,6 +45,10 @@
"Weather_Location": [
{
"endIndex": 66,
"modelType": "Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.76184386,
"startIndex": 59,
"text": "seattle",

Просмотреть файл

@ -4,6 +4,10 @@
"a": [
{
"endIndex": 309,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 299,
"text": "68 degrees",
"type": "builtin.temperature"
@ -12,6 +16,10 @@
"arrive": [
{
"endIndex": 373,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 370,
"text": "5pm",
"type": "builtin.datetimeV2.time"
@ -20,6 +28,10 @@
"b": [
{
"endIndex": 324,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 314,
"text": "72 degrees",
"type": "builtin.temperature"
@ -28,6 +40,10 @@
"begin": [
{
"endIndex": 76,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 65,
"text": "6 years old",
"type": "builtin.age"
@ -36,6 +52,10 @@
"buy": [
{
"endIndex": 124,
"modelType": "Regex Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 119,
"text": "kb922",
"type": "Part"
@ -44,6 +64,10 @@
"Buyer": [
{
"endIndex": 178,
"modelType": "List Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 173,
"text": "delta",
"type": "Airline"
@ -52,6 +76,10 @@
"Composite1": [
{
"endIndex": 172,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.01107535,
"startIndex": 0,
"text": "3 inches long by 2 inches wide and 5% to 10% and are you between 6 years old and 8 years old and can i trade kb457 for kb922 and change 425-777-1212 to 206-666-4123 and did",
@ -61,6 +89,10 @@
"Composite2": [
{
"endIndex": 283,
"modelType": "Composite Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.15191336,
"startIndex": 238,
"text": "http://foo.com changed to http://blah.com and",
@ -70,6 +102,10 @@
"destination": [
{
"endIndex": 233,
"modelType": "Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.985884964,
"startIndex": 226,
"text": "redmond",
@ -79,12 +115,20 @@
"dimension": [
{
"endIndex": 358,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 355,
"text": "3pm",
"type": "builtin.dimension"
},
{
"endIndex": 373,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 370,
"text": "5pm",
"type": "builtin.dimension"
@ -93,6 +137,10 @@
"end": [
{
"endIndex": 92,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 81,
"text": "8 years old",
"type": "builtin.age"
@ -101,12 +149,20 @@
"geographyV2": [
{
"endIndex": 218,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 212,
"text": "hawaii",
"type": "builtin.geographyV2.state"
},
{
"endIndex": 233,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 226,
"text": "redmond",
"type": "builtin.geographyV2.city"
@ -115,6 +171,10 @@
"leave": [
{
"endIndex": 358,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 355,
"text": "3pm",
"type": "builtin.datetimeV2.time"
@ -123,6 +183,10 @@
"length": [
{
"endIndex": 8,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "3 inches",
"type": "builtin.dimension"
@ -131,6 +195,10 @@
"likee": [
{
"endIndex": 344,
"modelType": "Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.9900547,
"startIndex": 340,
"text": "mary",
@ -140,6 +208,10 @@
"liker": [
{
"endIndex": 333,
"modelType": "Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.992201567,
"startIndex": 329,
"text": "john",
@ -149,6 +221,10 @@
"max": [
{
"endIndex": 403,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 399,
"text": "$500",
"type": "builtin.currency"
@ -157,6 +233,10 @@
"maximum": [
{
"endIndex": 44,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 41,
"text": "10%",
"type": "builtin.percentage"
@ -165,6 +245,10 @@
"min": [
{
"endIndex": 394,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 390,
"text": "$400",
"type": "builtin.currency"
@ -173,6 +257,10 @@
"minimum": [
{
"endIndex": 37,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 35,
"text": "5%",
"type": "builtin.percentage"
@ -181,6 +269,10 @@
"newPhone": [
{
"endIndex": 164,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.9,
"startIndex": 152,
"text": "206-666-4123",
@ -190,32 +282,56 @@
"number": [
{
"endIndex": 301,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 299,
"subtype": "integer",
"text": "68",
"type": "builtin.number"
},
{
"endIndex": 316,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 314,
"subtype": "integer",
"text": "72",
"type": "builtin.number"
},
{
"endIndex": 394,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 391,
"subtype": "integer",
"text": "400",
"type": "builtin.number"
},
{
"endIndex": 403,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 400,
"text": "500",
"type": "builtin.number"
"type": "builtin.number",
"subtype": "integer"
}
],
"old": [
{
"endIndex": 148,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.9,
"startIndex": 136,
"text": "425-777-1212",
@ -225,6 +341,10 @@
"oldURL": [
{
"endIndex": 252,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 238,
"text": "http://foo.com",
"type": "builtin.url"
@ -233,12 +353,20 @@
"personName": [
{
"endIndex": 333,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 329,
"text": "john",
"type": "builtin.personName"
},
{
"endIndex": 344,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 340,
"text": "mary",
"type": "builtin.personName"
@ -247,6 +375,10 @@
"receiver": [
{
"endIndex": 431,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 413,
"text": "chrimc@hotmail.com",
"type": "builtin.email"
@ -255,6 +387,10 @@
"sell": [
{
"endIndex": 114,
"modelType": "Regex Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 109,
"text": "kb457",
"type": "Part"
@ -263,6 +399,10 @@
"Seller": [
{
"endIndex": 189,
"modelType": "List Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 183,
"text": "virgin",
"type": "Airline"
@ -271,6 +411,10 @@
"sender": [
{
"endIndex": 451,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 437,
"text": "emad@gmail.com",
"type": "builtin.email"
@ -279,6 +423,10 @@
"source": [
{
"endIndex": 218,
"modelType": "Entity Extractor",
"recognitionSources": [
"model"
],
"score": 0.9713092,
"startIndex": 212,
"text": "hawaii",
@ -288,6 +436,10 @@
"width": [
{
"endIndex": 25,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 17,
"text": "2 inches",
"type": "builtin.dimension"
@ -334,12 +486,20 @@
"datetime": [
{
"endIndex": 72,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 65,
"text": "6 years",
"type": "builtin.datetimeV2.duration"
},
{
"endIndex": 88,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 81,
"text": "8 years",
"type": "builtin.datetimeV2.duration"
@ -348,72 +508,120 @@
"number": [
{
"endIndex": 1,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "3",
"type": "builtin.number"
},
{
"endIndex": 18,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 17,
"text": "2",
"type": "builtin.number"
},
{
"endIndex": 36,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 35,
"text": "5",
"type": "builtin.number"
},
{
"endIndex": 43,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 41,
"text": "10",
"type": "builtin.number"
},
{
"endIndex": 66,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 65,
"text": "6",
"type": "builtin.number"
},
{
"endIndex": 82,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 81,
"text": "8",
"type": "builtin.number"
},
{
"endIndex": 139,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 136,
"text": "425",
"type": "builtin.number"
},
{
"endIndex": 143,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 140,
"text": "777",
"type": "builtin.number"
},
{
"endIndex": 148,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 144,
"text": "1212",
"type": "builtin.number"
},
{
"endIndex": 155,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 152,
"text": "206",
"type": "builtin.number"
},
{
"endIndex": 159,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 156,
"text": "666",
"type": "builtin.number"
},
{
"endIndex": 164,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 160,
"text": "4123",
"type": "builtin.number"
@ -456,6 +664,10 @@
"url": [
{
"endIndex": 279,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
],
"startIndex": 264,
"text": "http://blah.com",
"type": "builtin.url"

Просмотреть файл

@ -24,6 +24,7 @@ namespace Microsoft.Bot.Builder.AI.Luis.TestUtils
// 5) Run the review.cmd file to review each file if approved the new oracle file will replace the old one.
// Changing this to false will cause running against the actual LUIS service.
// This is useful in order to see if the oracles for mocking or testing have changed.
// TODO: set to true
public bool Mock { get; set; } = true;
public void GetEnvironmentVars()

Просмотреть файл

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
@ -14,6 +15,11 @@ namespace Microsoft.Bot.Builder.AI.Luis.TestUtils
{
public class Utils
{
// These are properties that are found only in V3 or V2.
// We copy them over to allow for common oracle files.
// subtype is V2 only, the others are from V3
private static readonly List<string> _mismatches = new List<string> { "score", "modelType", "recognitionSources", "subtype" };
public static ITurnContext GetContext(string utterance)
{
var testAdapter = new TestAdapter();
@ -60,18 +66,23 @@ namespace Microsoft.Bot.Builder.AI.Luis.TestUtils
withinDelta = expected.Count == actual.Count;
if (!withinDelta)
{
// Try copying score which is added by V3 to some prebuilts
if (expected["score"] != null)
// Try copying extra V2/V3 information
foreach (var prop in _mismatches)
{
actual.Add("score", expected["score"]);
var copy = (JObject)actual.DeepClone();
actual.RemoveAll();
foreach (var prop in from cprop in copy.Properties() orderby cprop.Name select cprop)
if (actual[prop] == null && expected[prop] != null)
{
actual.Add(prop);
actual.Add(prop, expected[prop]);
}
}
withinDelta = expected.Count == actual.Count;
withinDelta = expected.Count == actual.Count;
// Order alphabetically
var copy = (JObject)actual.DeepClone();
actual.RemoveAll();
foreach (var prop in from cprop in copy.Properties() orderby cprop.Name select cprop)
{
actual.Add(prop);
}
}
@ -90,13 +101,9 @@ namespace Microsoft.Bot.Builder.AI.Luis.TestUtils
var arr1 = (JArray)expectedToken;
var arr2 = (JArray)actualToken;
withinDelta = arr1.Count == arr2.Count;
for (var i = 0; withinDelta && i < arr1.Count; ++i)
for (var i = 0; i < arr1.Count; ++i)
{
withinDelta = WithinDelta(arr1[i], arr2[i], delta);
if (!withinDelta)
{
break;
}
withinDelta = WithinDelta(arr1[i], arr2[i], delta) || withinDelta;
}
}
else if (!expectedToken.Equals(actualToken))
@ -181,7 +188,7 @@ namespace Microsoft.Bot.Builder.AI.Luis.TestUtils
// 2) Run this test which will fail and generate a <name>.json.new file.
// 3) Check the .new file and if correct, replace the original .json file with it.
// The version parameter controls where in the expected json the luisResult is put. This allows multiple endpoint responses like from
// LUIS V2 and V3 endpoints.
// LUIS V2 and V3 endpoints. You should run V3 first since it sometimes adds more information that V2.
public static async Task TestJsonOracle<T>(string expectedPath, string version, Func<JObject, IRecognizer> buildRecognizer, ITurnContext turnContext = null)
where T : IRecognizerConvert, new()
{

Просмотреть файл

@ -248,6 +248,13 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
[TestMethod]
public async Task GeoPeopleOrdinal() => await TestJson<RecognizerResult>("GeoPeopleOrdinal.json");
[TestMethod]
public async Task Minimal() => await TestJson<RecognizerResult>("Minimal.json");
// TODO: This is disabled until the bug requiring instance data for geo is fixed.
// [TestMethod]
public async Task MinimalWithGeo() => await TestJson<RecognizerResult>("MinimalWithGeo.json");
[TestMethod]
public async Task PrebuiltDomains() => await TestJson<RecognizerResult>("Prebuilt.json");