Before switch to ordinalV2 only.

This commit is contained in:
Chris McConnell 2019-07-10 10:02:39 -07:00
Родитель 46cc6501af
Коммит da2a7b4ee8
22 изменённых файлов: 1192 добавлений и 5063 удалений

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

@ -164,17 +164,15 @@ namespace Microsoft.Bot.Builder.AI.Luis
internal static JObject ExtractEntityMetadata(EntityModel entity, string utterance)
{
var start = (int)entity.StartIndex;
var end = (int)entity.EndIndex + 1;
dynamic obj = JObject.FromObject(new
{
startIndex = (int)entity.StartIndex,
endIndex = (int)entity.EndIndex + 1,
text = entity.Entity,
startIndex = start,
endIndex = end,
text = entity.Entity.Length == end - start ? entity.Entity : utterance.Substring(start, end - start),
type = entity.Type,
});
if (obj.text.length != obj.endIndex - obj.startIndex)
{
obj.text = utterance.Substring(obj.startIndex, obj.endIndex - obj.startIndex);
}
if (entity.AdditionalProperties != null)
{

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

@ -404,7 +404,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview
ModelID = _application.ApplicationId,
},
luisOptions = luisPredictionOptions,
luisResponse,
luisResult = luisResponse,
});
await turnContext.TraceActivityAsync("LuisRecognizer", traceInfo, LuisTraceType, LuisTraceLabel, cancellationToken).ConfigureAwait(false);

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

@ -15,7 +15,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview
{
internal const string _metadataKey = "$instance";
internal const string _geoV2 = "builtin.geographyV2.";
internal static readonly HashSet<string> _dateSubtypes = new HashSet<string> { "date", "daterange", "datetimerange", "duration", "set", "time", "timerange" };
internal static readonly HashSet<string> _dateSubtypes = new HashSet<string> { "date", "daterange", "datetime", "datetimerange", "duration", "set", "time", "timerange" };
internal static string NormalizedIntent(string intent) => intent.Replace('.', '_').Replace(' ', '_');
@ -76,18 +76,17 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview
// Fix datetime by reverting to simple timex
if (!inInstance && obj.TryGetValue("type", out var type) && type.Type == JTokenType.String && _dateSubtypes.Contains(type.Value<string>()))
{
var timex = obj["values"]?.First()["timex"].Value<string>();
var timexs = obj["values"];
var arr = new JArray();
if (timex != null)
if (timexs != null)
{
if (timex.StartsWith("(") && timex.EndsWith(")"))
var unique = new HashSet<string>();
foreach (var elt in timexs)
{
foreach (var expr in timex.Substring(1, timex.Length - 2).Split(','))
{
arr.Add(expr);
}
unique.Add(elt["timex"]?.Value<string>());
}
else
foreach (var timex in unique)
{
arr.Add(timex);
}

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

@ -1045,7 +1045,6 @@ namespace Microsoft.Bot.Builder.AI.Luis.Tests
return new LuisRecognizer(luisApp, options, verbose, httpClientHandler);
}
private MockedHttpClientHandler GetMockHttpClientHandlerObject(string example, string responsePath)
{
var response = GetResponse(responsePath);

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -4,9 +4,9 @@
"Composite2": [
{
"endIndex": 69,
"score": 0.962469339,
"score": 0.9501543,
"startIndex": 0,
"text": "http : / / foo . com is where you can fly from seattle to dallas via denver",
"text": "http://foo.com is where you can fly from seattle to dallas via denver",
"type": "Composite2"
}
],
@ -25,7 +25,7 @@
"City": [
{
"endIndex": 69,
"score": 0.984729,
"score": 0.9857553,
"startIndex": 63,
"text": "denver",
"type": "City"
@ -34,7 +34,7 @@
"From": [
{
"endIndex": 48,
"score": 0.9992566,
"score": 0.9997592,
"startIndex": 41,
"text": "seattle",
"type": "City::From"
@ -43,7 +43,7 @@
"To": [
{
"endIndex": 58,
"score": 0.998420954,
"score": 0.9990426,
"startIndex": 52,
"text": "dallas",
"type": "City::To"
@ -81,37 +81,37 @@
},
"intents": {
"Cancel": {
"score": 0.000226470322
"score": 0.000227437369
},
"Delivery": {
"score": 0.0013232599
"score": 0.001310123
},
"EntityTests": {
"score": 0.944987357
"score": 0.94500196
},
"Greeting": {
"score": 0.000151786517
"score": 0.000152356763
},
"Help": {
"score": 0.0005449379
"score": 0.000547201431
},
"None": {
"score": 0.004223796
"score": 0.004187195
},
"Roles": {
"score": 0.0297764745
"score": 0.0300086979
},
"search": {
"score": 0.008871362
"score": 0.0211907644
},
"SpecifyName": {
"score": 0.00236839615
"score": 0.00157370011
},
"Travel": {
"score": 0.0452092439
"score": 0.0778588
},
"Weather_GetForecast": {
"score": 0.0231683664
"score": 0.0237181056
}
},
"sentiment": {
@ -148,28 +148,28 @@
{
"endIndex": 57,
"entity": "dallas",
"score": 0.998420954,
"score": 0.9990426,
"startIndex": 52,
"type": "City::To"
},
{
"endIndex": 47,
"entity": "seattle",
"score": 0.9992566,
"score": 0.9997592,
"startIndex": 41,
"type": "City::From"
},
{
"endIndex": 68,
"entity": "denver",
"score": 0.984729,
"score": 0.9857553,
"startIndex": 63,
"type": "City"
},
{
"endIndex": 68,
"entity": "http : / / foo . com is where you can fly from seattle to dallas via denver",
"score": 0.962469339,
"score": 0.9501543,
"startIndex": 0,
"type": "Composite2"
},
@ -192,47 +192,47 @@
"intents": [
{
"intent": "EntityTests",
"score": 0.944987357
"score": 0.94500196
},
{
"intent": "Travel",
"score": 0.0452092439
"score": 0.0778588
},
{
"intent": "Roles",
"score": 0.0297764745
"score": 0.0300086979
},
{
"intent": "Weather.GetForecast",
"score": 0.0231683664
"score": 0.0237181056
},
{
"intent": "search",
"score": 0.008871362
"score": 0.0211907644
},
{
"intent": "None",
"score": 0.004223796
"score": 0.004187195
},
{
"intent": "SpecifyName",
"score": 0.00236839615
"score": 0.00157370011
},
{
"intent": "Delivery",
"score": 0.0013232599
"score": 0.001310123
},
{
"intent": "Help",
"score": 0.0005449379
"score": 0.000547201431
},
{
"intent": "Cancel",
"score": 0.000226470322
"score": 0.000227437369
},
{
"intent": "Greeting",
"score": 0.000151786517
"score": 0.000152356763
}
],
"query": "http://foo.com is where you can fly from seattle to dallas via denver",
@ -242,7 +242,160 @@
},
"topScoringIntent": {
"intent": "EntityTests",
"score": 0.944987357
"score": 0.94500196
}
},
"v3": {
"prediction": {
"entities": {
"$instance": {
"Composite2": [
{
"length": 69,
"modelType": "Composite Entity Extractor",
"modelTypeId": 4,
"recognitionSources": [
"model"
],
"score": 0.9501543,
"startIndex": 0,
"text": "http://foo.com is where you can fly from seattle to dallas via denver",
"type": "Composite2"
}
],
"geographyV2": [
{
"length": 7,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 41,
"text": "seattle",
"type": "builtin.geographyV2.city"
}
]
},
"Composite2": [
{
"$instance": {
"City": [
{
"length": 6,
"modelType": "Hierarchical Entity Extractor",
"modelTypeId": 3,
"recognitionSources": [
"model"
],
"score": 0.9857553,
"startIndex": 63,
"text": "denver",
"type": "City"
}
],
"City::From": [
{
"length": 7,
"modelType": "Hierarchical Entity Extractor",
"modelTypeId": 3,
"recognitionSources": [
"model"
],
"score": 0.9997592,
"startIndex": 41,
"text": "seattle",
"type": "City::From"
}
],
"City::To": [
{
"length": 6,
"modelType": "Hierarchical Entity Extractor",
"modelTypeId": 3,
"recognitionSources": [
"model"
],
"score": 0.9990426,
"startIndex": 52,
"text": "dallas",
"type": "City::To"
}
],
"url": [
{
"length": 14,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "http://foo.com",
"type": "builtin.url"
}
]
},
"City": [
"denver"
],
"City::From": [
"seattle"
],
"City::To": [
"dallas"
],
"url": [
"http://foo.com"
]
}
],
"geographyV2": [
"seattle"
]
},
"intents": {
"Cancel": {
"score": 0.000227437369
},
"Delivery": {
"score": 0.001310123
},
"EntityTests": {
"score": 0.94500196
},
"Greeting": {
"score": 0.000152356763
},
"Help": {
"score": 0.000547201431
},
"None": {
"score": 0.004187195
},
"Roles": {
"score": 0.0300086979
},
"search": {
"score": 0.0211907644
},
"SpecifyName": {
"score": 0.00157370011
},
"Travel": {
"score": 0.0778588
},
"Weather.GetForecast": {
"score": 0.0237181056
}
},
"normalizedQuery": "http://foo.com is where you can fly from seattle to dallas via denver",
"sentiment": {
"label": "neutral",
"score": 0.5
},
"topIntent": "EntityTests"
},
"query": "http://foo.com is where you can fly from seattle to dallas via denver"
}
}

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

@ -4,7 +4,7 @@
"Destination": [
{
"endIndex": 33,
"score": 0.9818967,
"score": 0.982723653,
"startIndex": 25,
"text": "12346 wa",
"type": "Address"
@ -13,7 +13,7 @@
"Source": [
{
"endIndex": 21,
"score": 0.9377045,
"score": 0.933905244,
"startIndex": 13,
"text": "12345 va",
"type": "Address"
@ -27,7 +27,6 @@
{
"endIndex": 30,
"startIndex": 25,
"subtype": "integer",
"text": "12346",
"type": "builtin.number"
}
@ -35,7 +34,7 @@
"State": [
{
"endIndex": 33,
"score": 0.9899993,
"score": 0.9893949,
"startIndex": 31,
"text": "wa",
"type": "State"
@ -57,7 +56,6 @@
{
"endIndex": 18,
"startIndex": 13,
"subtype": "integer",
"text": "12345",
"type": "builtin.number"
}
@ -65,7 +63,7 @@
"State": [
{
"endIndex": 21,
"score": 0.9417667,
"score": 0.937490761,
"startIndex": 19,
"text": "va",
"type": "State"
@ -83,37 +81,37 @@
},
"intents": {
"Cancel": {
"score": 1E-09
"score": 1.01764708E-09
},
"Delivery": {
"score": 0.00234605442
"score": 0.00238572317
},
"EntityTests": {
"score": 4.6666665E-10
"score": 4.757576E-10
},
"Greeting": {
"score": 1.06875E-09
"score": 1.0875E-09
},
"Help": {
"score": 1E-09
"score": 1.01764708E-09
},
"None": {
"score": 1.15824787E-06
"score": 1.17844979E-06
},
"Roles": {
"score": 0.999888361
"score": 0.999911964
},
"search": {
"score": 9.343347E-06
"score": 9.494859E-06
},
"SpecifyName": {
"score": 3.01666669E-09
"score": 3.0666667E-09
},
"Travel": {
"score": 3.04712876E-06
"score": 3.09763345E-06
},
"Weather_GetForecast": {
"score": 1.01009994E-06
"score": 1.02792524E-06
}
},
"sentiment": {
@ -156,14 +154,14 @@
{
"endIndex": 20,
"entity": "va",
"score": 0.9417667,
"score": 0.937490761,
"startIndex": 19,
"type": "State"
},
{
"endIndex": 32,
"entity": "wa",
"score": 0.9899993,
"score": 0.9893949,
"startIndex": 31,
"type": "State"
},
@ -171,7 +169,7 @@
"endIndex": 20,
"entity": "12345 va",
"role": "Source",
"score": 0.9377045,
"score": 0.933905244,
"startIndex": 13,
"type": "Address"
},
@ -179,7 +177,7 @@
"endIndex": 32,
"entity": "12346 wa",
"role": "Destination",
"score": 0.9818967,
"score": 0.982723653,
"startIndex": 25,
"type": "Address"
},
@ -207,47 +205,47 @@
"intents": [
{
"intent": "Roles",
"score": 0.999888361
"score": 0.999911964
},
{
"intent": "Delivery",
"score": 0.00234605442
"score": 0.00238572317
},
{
"intent": "search",
"score": 9.343347E-06
"score": 9.494859E-06
},
{
"intent": "Travel",
"score": 3.04712876E-06
"score": 3.09763345E-06
},
{
"intent": "None",
"score": 1.15824787E-06
"score": 1.17844979E-06
},
{
"intent": "Weather.GetForecast",
"score": 1.01009994E-06
"score": 1.02792524E-06
},
{
"intent": "SpecifyName",
"score": 3.01666669E-09
"score": 3.0666667E-09
},
{
"intent": "Greeting",
"score": 1.06875E-09
"score": 1.0875E-09
},
{
"intent": "Cancel",
"score": 1E-09
"score": 1.01764708E-09
},
{
"intent": "Help",
"score": 1E-09
"score": 1.01764708E-09
},
{
"intent": "EntityTests",
"score": 4.6666665E-10
"score": 4.757576E-10
}
],
"query": "Deliver from 12345 VA to 12346 WA",
@ -257,7 +255,7 @@
},
"topScoringIntent": {
"intent": "Roles",
"score": 0.999888361
"score": 0.999911964
}
}
}

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

@ -229,5 +229,163 @@
"intent": "Roles",
"score": 0.999204934
}
},
"v3": {
"prediction": {
"entities": {
"$instance": {
"child": [
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "child",
"startIndex": 87,
"text": "lisa simpson",
"type": "builtin.personName"
}
],
"endloc": [
{
"length": 7,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "endloc",
"startIndex": 44,
"text": "jakarta",
"type": "builtin.geographyV2.city"
}
],
"endpos": [
{
"length": 4,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "endpos",
"startIndex": 24,
"text": "last",
"type": "builtin.ordinalV2.relative"
}
],
"parent": [
{
"length": 13,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "parent",
"startIndex": 56,
"text": "homer simpson",
"type": "builtin.personName"
}
],
"startloc": [
{
"length": 6,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "startloc",
"startIndex": 34,
"text": "london",
"type": "builtin.geographyV2.city"
}
],
"startpos": [
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "startpos",
"startIndex": 8,
"text": "next to last",
"type": "builtin.ordinalV2.relative"
}
]
},
"child": [
"lisa simpson"
],
"endloc": [
"jakarta"
],
"endpos": [
{
"offset": 0,
"relativeTo": "end"
}
],
"parent": [
"homer simpson"
],
"startloc": [
"london"
],
"startpos": [
{
"offset": -1,
"relativeTo": "end"
}
]
},
"intents": {
"Cancel": {
"score": 0.000107549029
},
"Delivery": {
"score": 0.00123035291
},
"EntityTests": {
"score": 0.0009487789
},
"Greeting": {
"score": 5.293933E-05
},
"Help": {
"score": 0.0001358991
},
"None": {
"score": 0.0109820236
},
"Roles": {
"score": 0.999204934
},
"search": {
"score": 0.0309635121
},
"SpecifyName": {
"score": 0.0009410849
},
"Travel": {
"score": 0.01095186
},
"Weather.GetForecast": {
"score": 0.0106523167
}
},
"normalizedQuery": "go from next to last to last move london to jakarta and homer simpson is the parent of lisa simpson",
"sentiment": {
"label": "neutral",
"score": 0.5
},
"topIntent": "Roles"
},
"query": "go from next to last to last move london to jakarta and homer simpson is the parent of lisa simpson"
}
}

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

@ -189,5 +189,136 @@
"intent": "search",
"score": 0.9999993
}
},
"v3": {
"prediction": {
"entities": {
"$instance": {
"extra": [
{
"length": 5,
"modelType": "Pattern.Any Entity Extractor",
"modelTypeId": 7,
"recognitionSources": [
"model"
],
"role": "extra",
"startIndex": 71,
"text": "kb435",
"type": "subject"
}
],
"Part": [
{
"length": 5,
"modelType": "Regex Entity Extractor",
"modelTypeId": 8,
"recognitionSources": [
"model"
],
"startIndex": 71,
"text": "kb435",
"type": "Part"
}
],
"person": [
{
"length": 12,
"modelType": "Pattern.Any Entity Extractor",
"modelTypeId": 7,
"recognitionSources": [
"model"
],
"startIndex": 49,
"text": "bart simpson",
"type": "person"
}
],
"personName": [
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 49,
"text": "bart simpson",
"type": "builtin.personName"
}
],
"subject": [
{
"length": 31,
"modelType": "Pattern.Any Entity Extractor",
"modelTypeId": 7,
"recognitionSources": [
"model"
],
"startIndex": 12,
"text": "something wicked this way comes",
"type": "subject"
}
]
},
"extra": [
"kb435"
],
"Part": [
"kb435"
],
"person": [
"bart simpson"
],
"personName": [
"bart simpson"
],
"subject": [
"something wicked this way comes"
]
},
"intents": {
"Cancel": {
"score": 1.01764708E-09
},
"Delivery": {
"score": 1.8E-09
},
"EntityTests": {
"score": 1.044335E-05
},
"Greeting": {
"score": 1.0875E-09
},
"Help": {
"score": 1.01764708E-09
},
"None": {
"score": 2.38094663E-06
},
"Roles": {
"score": 5.98274755E-06
},
"search": {
"score": 0.9999993
},
"SpecifyName": {
"score": 3.0666667E-09
},
"Travel": {
"score": 3.09763345E-06
},
"Weather.GetForecast": {
"score": 1.02792524E-06
}
},
"normalizedQuery": "email about something wicked this way comes from bart simpson and also kb435",
"sentiment": {
"label": "negative",
"score": 0.210341513
},
"topIntent": "search"
},
"query": "email about something wicked this way comes from bart simpson and also kb435"
}
}

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

@ -6,7 +6,7 @@
"endIndex": 66,
"score": 0.456283748,
"startIndex": 0,
"text": "http : / / foo . com is where you can get a weather forecast for seattle",
"text": "http://foo.com is where you can get a weather forecast for seattle",
"type": "Composite2"
}
],
@ -198,5 +198,124 @@
"intent": "Weather.GetForecast",
"score": 0.669524968
}
},
"v3": {
"prediction": {
"entities": {
"$instance": {
"Composite2": [
{
"length": 66,
"modelType": "Composite Entity Extractor",
"modelTypeId": 4,
"recognitionSources": [
"model"
],
"score": 0.456283748,
"startIndex": 0,
"text": "http://foo.com is where you can get a weather forecast for seattle",
"type": "Composite2"
}
],
"geographyV2": [
{
"length": 7,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 59,
"text": "seattle",
"type": "builtin.geographyV2.city"
}
]
},
"Composite2": [
{
"$instance": {
"url": [
{
"length": 14,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "http://foo.com",
"type": "builtin.url"
}
],
"Weather.Location": [
{
"length": 7,
"modelType": "Entity Extractor",
"modelTypeId": 1,
"recognitionSources": [
"model"
],
"score": 0.76184386,
"startIndex": 59,
"text": "seattle",
"type": "Weather.Location"
}
]
},
"url": [
"http://foo.com"
],
"Weather.Location": [
"seattle"
]
}
],
"geographyV2": [
"seattle"
]
},
"intents": {
"Cancel": {
"score": 0.000171828113
},
"Delivery": {
"score": 0.0011408634
},
"EntityTests": {
"score": 0.342939854
},
"Greeting": {
"score": 0.0001518702
},
"Help": {
"score": 0.0005502715
},
"None": {
"score": 0.0175834317
},
"Roles": {
"score": 0.0432791822
},
"search": {
"score": 0.014743383
},
"SpecifyName": {
"score": 0.00172697916
},
"Travel": {
"score": 0.013458414
},
"Weather.GetForecast": {
"score": 0.669524968
}
},
"normalizedQuery": "http://foo.com is where you can get a weather forecast for seattle",
"sentiment": {
"label": "neutral",
"score": 0.5
},
"topIntent": "Weather.GetForecast"
},
"query": "http://foo.com is where you can get a weather forecast for seattle"
}
}

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

@ -3,10 +3,10 @@
"$instance": {
"Composite1": [
{
"endIndex": 300,
"score": 0.877445638,
"endIndex": 306,
"score": 0.8764849,
"startIndex": 0,
"text": "12 years old and 3 days old and monday july 3rd 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",
"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"
}
],
@ -18,20 +18,20 @@
"type": "builtin.ordinalV2"
},
{
"endIndex": 193,
"startIndex": 188,
"endIndex": 199,
"startIndex": 194,
"text": "first",
"type": "builtin.ordinalV2"
},
{
"endIndex": 279,
"startIndex": 271,
"endIndex": 285,
"startIndex": 277,
"text": "next one",
"type": "builtin.ordinalV2.relative"
},
{
"endIndex": 300,
"startIndex": 288,
"endIndex": 306,
"startIndex": 294,
"text": "previous one",
"type": "builtin.ordinalV2.relative"
}
@ -68,56 +68,56 @@
"type": "builtin.datetimeV2.duration"
},
{
"endIndex": 47,
"endIndex": 53,
"startIndex": 32,
"text": "monday july 3rd",
"text": "monday july 3rd, 2019",
"type": "builtin.datetimeV2.date"
},
{
"endIndex": 64,
"startIndex": 52,
"endIndex": 70,
"startIndex": 58,
"text": "every monday",
"type": "builtin.datetimeV2.set"
},
{
"endIndex": 91,
"startIndex": 69,
"endIndex": 97,
"startIndex": 75,
"text": "between 3am and 5:30am",
"type": "builtin.datetimeV2.timerange"
}
],
"dimension": [
{
"endIndex": 103,
"startIndex": 96,
"endIndex": 109,
"startIndex": 102,
"text": "4 acres",
"type": "builtin.dimension"
},
{
"endIndex": 121,
"startIndex": 108,
"endIndex": 127,
"startIndex": 114,
"text": "4 pico meters",
"type": "builtin.dimension"
}
],
"email": [
{
"endIndex": 144,
"startIndex": 126,
"endIndex": 150,
"startIndex": 132,
"text": "chrimc@hotmail.com",
"type": "builtin.email"
}
],
"money": [
{
"endIndex": 151,
"startIndex": 149,
"endIndex": 157,
"startIndex": 155,
"text": "$4",
"type": "builtin.currency"
},
{
"endIndex": 161,
"startIndex": 156,
"endIndex": 167,
"startIndex": 162,
"text": "$4.25",
"type": "builtin.currency"
}
@ -126,126 +126,114 @@
{
"endIndex": 2,
"startIndex": 0,
"subtype": "integer",
"text": "12",
"type": "builtin.number"
},
{
"endIndex": 18,
"startIndex": 17,
"subtype": "integer",
"text": "3",
"type": "builtin.number"
},
{
"endIndex": 86,
"startIndex": 85,
"subtype": "integer",
"endIndex": 53,
"startIndex": 49,
"text": "2019",
"type": "builtin.number"
},
{
"endIndex": 92,
"startIndex": 91,
"text": "5",
"type": "builtin.number"
},
{
"endIndex": 97,
"startIndex": 96,
"subtype": "integer",
"endIndex": 103,
"startIndex": 102,
"text": "4",
"type": "builtin.number"
},
{
"endIndex": 109,
"startIndex": 108,
"subtype": "integer",
"endIndex": 115,
"startIndex": 114,
"text": "4",
"type": "builtin.number"
},
{
"endIndex": 151,
"startIndex": 150,
"subtype": "integer",
"endIndex": 157,
"startIndex": 156,
"text": "4",
"type": "builtin.number"
},
{
"endIndex": 161,
"startIndex": 157,
"subtype": "decimal",
"endIndex": 167,
"startIndex": 163,
"text": "4.25",
"type": "builtin.number"
},
{
"endIndex": 173,
"startIndex": 171,
"subtype": "integer",
"endIndex": 179,
"startIndex": 177,
"text": "32",
"type": "builtin.number"
},
{
"endIndex": 183,
"startIndex": 178,
"subtype": "decimal",
"endIndex": 189,
"startIndex": 184,
"text": "210.4",
"type": "builtin.number"
},
{
"endIndex": 200,
"startIndex": 198,
"subtype": "integer",
"endIndex": 206,
"startIndex": 204,
"text": "10",
"type": "builtin.number"
},
{
"endIndex": 210,
"startIndex": 206,
"subtype": "decimal",
"endIndex": 216,
"startIndex": 212,
"text": "10.5",
"type": "builtin.number"
},
{
"endIndex": 219,
"startIndex": 216,
"subtype": "integer",
"endIndex": 225,
"startIndex": 222,
"text": "425",
"type": "builtin.number"
},
{
"endIndex": 223,
"startIndex": 220,
"subtype": "integer",
"endIndex": 229,
"startIndex": 226,
"text": "555",
"type": "builtin.number"
},
{
"endIndex": 228,
"startIndex": 224,
"subtype": "integer",
"endIndex": 234,
"startIndex": 230,
"text": "1234",
"type": "builtin.number"
},
{
"endIndex": 234,
"startIndex": 233,
"subtype": "integer",
"endIndex": 240,
"startIndex": 239,
"text": "3",
"type": "builtin.number"
},
{
"endIndex": 252,
"startIndex": 247,
"subtype": "decimal",
"endIndex": 258,
"startIndex": 253,
"text": "-27.5",
"type": "builtin.number"
},
{
"endIndex": 279,
"startIndex": 276,
"subtype": "integer",
"endIndex": 285,
"startIndex": 282,
"text": "one",
"type": "builtin.number"
},
{
"endIndex": 300,
"startIndex": 297,
"subtype": "integer",
"endIndex": 306,
"startIndex": 303,
"text": "one",
"type": "builtin.number"
}
@ -258,44 +246,44 @@
"type": "builtin.ordinal"
},
{
"endIndex": 193,
"startIndex": 188,
"endIndex": 199,
"startIndex": 194,
"text": "first",
"type": "builtin.ordinal"
}
],
"percentage": [
{
"endIndex": 201,
"startIndex": 198,
"endIndex": 207,
"startIndex": 204,
"text": "10%",
"type": "builtin.percentage"
},
{
"endIndex": 211,
"startIndex": 206,
"endIndex": 217,
"startIndex": 212,
"text": "10.5%",
"type": "builtin.percentage"
}
],
"phonenumber": [
{
"endIndex": 228,
"startIndex": 216,
"endIndex": 234,
"startIndex": 222,
"text": "425-555-1234",
"type": "builtin.phonenumber"
}
],
"temperature": [
{
"endIndex": 242,
"startIndex": 233,
"endIndex": 248,
"startIndex": 239,
"text": "3 degrees",
"type": "builtin.temperature"
},
{
"endIndex": 262,
"startIndex": 247,
"endIndex": 268,
"startIndex": 253,
"text": "-27.5 degrees c",
"type": "builtin.temperature"
}
@ -326,7 +314,7 @@
},
{
"timex": [
"XXXX-07-03"
"2019-07-03"
],
"type": "date"
},
@ -369,6 +357,7 @@
"number": [
12.0,
3.0,
2019.0,
5.0,
4.0,
4.0,
@ -430,44 +419,44 @@
},
"intents": {
"Cancel": {
"score": 1.602786E-06
"score": 1.56337478E-06
},
"Delivery": {
"score": 0.000278715248
"score": 0.0002846266
},
"EntityTests": {
"score": 0.96595037
"score": 0.953405857
},
"Greeting": {
"score": 8.547132E-07
"score": 8.20979437E-07
},
"Help": {
"score": 4.902734E-06
"score": 4.81870757E-06
},
"None": {
"score": 0.009063047
"score": 0.01040122
},
"Roles": {
"score": 0.184567839
"score": 0.197366714
},
"search": {
"score": 0.149123311
"score": 0.149378926
},
"SpecifyName": {
"score": 6.590373E-05
"score": 6.563565E-05
},
"Travel": {
"score": 0.0114093516
"score": 0.0119320424
},
"Weather_GetForecast": {
"score": 0.0122321565
"score": 0.0143940123
}
},
"sentiment": {
"label": "neutral",
"score": 0.5
},
"text": "12 years old and 3 days old and monday july 3rd 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",
"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",
"v2": {
"compositeEntities": [
{
@ -490,7 +479,7 @@
},
{
"type": "builtin.datetimeV2.date",
"value": "monday july 3rd"
"value": "monday july 3rd, 2019"
},
{
"type": "builtin.datetimeV2.set",
@ -528,6 +517,10 @@
"type": "builtin.number",
"value": "3"
},
{
"type": "builtin.number",
"value": "2019"
},
{
"type": "builtin.number",
"value": "5"
@ -622,14 +615,14 @@
}
],
"parentType": "Composite1",
"value": "12 years old and 3 days old and monday july 3rd 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"
"value": "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"
}
],
"entities": [
{
"endIndex": 299,
"entity": "12 years old and 3 days old and monday july 3rd 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",
"score": 0.877445638,
"endIndex": 305,
"entity": "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",
"score": 0.8764849,
"startIndex": 0,
"type": "Composite1"
},
@ -654,163 +647,173 @@
"type": "builtin.number"
},
{
"endIndex": 85,
"endIndex": 52,
"entity": "2019",
"resolution": {
"subtype": "integer",
"value": "2019"
},
"startIndex": 49,
"type": "builtin.number"
},
{
"endIndex": 91,
"entity": "5",
"resolution": {
"subtype": "integer",
"value": "5"
},
"startIndex": 85,
"startIndex": 91,
"type": "builtin.number"
},
{
"endIndex": 96,
"endIndex": 102,
"entity": "4",
"resolution": {
"subtype": "integer",
"value": "4"
},
"startIndex": 96,
"startIndex": 102,
"type": "builtin.number"
},
{
"endIndex": 108,
"endIndex": 114,
"entity": "4",
"resolution": {
"subtype": "integer",
"value": "4"
},
"startIndex": 108,
"startIndex": 114,
"type": "builtin.number"
},
{
"endIndex": 150,
"endIndex": 156,
"entity": "4",
"resolution": {
"subtype": "integer",
"value": "4"
},
"startIndex": 150,
"startIndex": 156,
"type": "builtin.number"
},
{
"endIndex": 160,
"endIndex": 166,
"entity": "4.25",
"resolution": {
"subtype": "decimal",
"value": "4.25"
},
"startIndex": 157,
"startIndex": 163,
"type": "builtin.number"
},
{
"endIndex": 172,
"endIndex": 178,
"entity": "32",
"resolution": {
"subtype": "integer",
"value": "32"
},
"startIndex": 171,
"startIndex": 177,
"type": "builtin.number"
},
{
"endIndex": 182,
"endIndex": 188,
"entity": "210.4",
"resolution": {
"subtype": "decimal",
"value": "210.4"
},
"startIndex": 178,
"startIndex": 184,
"type": "builtin.number"
},
{
"endIndex": 199,
"endIndex": 205,
"entity": "10",
"resolution": {
"subtype": "integer",
"value": "10"
},
"startIndex": 198,
"startIndex": 204,
"type": "builtin.number"
},
{
"endIndex": 209,
"endIndex": 215,
"entity": "10.5",
"resolution": {
"subtype": "decimal",
"value": "10.5"
},
"startIndex": 206,
"startIndex": 212,
"type": "builtin.number"
},
{
"endIndex": 218,
"endIndex": 224,
"entity": "425",
"resolution": {
"subtype": "integer",
"value": "425"
},
"startIndex": 216,
"startIndex": 222,
"type": "builtin.number"
},
{
"endIndex": 222,
"endIndex": 228,
"entity": "555",
"resolution": {
"subtype": "integer",
"value": "555"
},
"startIndex": 220,
"startIndex": 226,
"type": "builtin.number"
},
{
"endIndex": 227,
"endIndex": 233,
"entity": "1234",
"resolution": {
"subtype": "integer",
"value": "1234"
},
"startIndex": 224,
"startIndex": 230,
"type": "builtin.number"
},
{
"endIndex": 233,
"endIndex": 239,
"entity": "3",
"resolution": {
"subtype": "integer",
"value": "3"
},
"startIndex": 233,
"startIndex": 239,
"type": "builtin.number"
},
{
"endIndex": 251,
"endIndex": 257,
"entity": "-27.5",
"resolution": {
"subtype": "decimal",
"value": "-27.5"
},
"startIndex": 247,
"startIndex": 253,
"type": "builtin.number"
},
{
"endIndex": 278,
"endIndex": 284,
"entity": "one",
"resolution": {
"subtype": "integer",
"value": "1"
},
"startIndex": 276,
"startIndex": 282,
"type": "builtin.number"
},
{
"endIndex": 299,
"endIndex": 305,
"entity": "one",
"resolution": {
"subtype": "integer",
"value": "1"
},
"startIndex": 297,
"startIndex": 303,
"type": "builtin.number"
},
{
@ -864,17 +867,12 @@
"type": "builtin.datetimeV2.duration"
},
{
"endIndex": 46,
"entity": "monday july 3rd",
"endIndex": 52,
"entity": "monday july 3rd, 2019",
"resolution": {
"values": [
{
"timex": "XXXX-07-03",
"type": "date",
"value": "2018-07-03"
},
{
"timex": "XXXX-07-03",
"timex": "2019-07-03",
"type": "date",
"value": "2019-07-03"
}
@ -884,7 +882,7 @@
"type": "builtin.datetimeV2.date"
},
{
"endIndex": 63,
"endIndex": 69,
"entity": "every monday",
"resolution": {
"values": [
@ -895,11 +893,11 @@
}
]
},
"startIndex": 52,
"startIndex": 58,
"type": "builtin.datetimeV2.set"
},
{
"endIndex": 90,
"endIndex": 96,
"entity": "between 3am and 5:30am",
"resolution": {
"values": [
@ -911,56 +909,56 @@
}
]
},
"startIndex": 69,
"startIndex": 75,
"type": "builtin.datetimeV2.timerange"
},
{
"endIndex": 102,
"endIndex": 108,
"entity": "4 acres",
"resolution": {
"unit": "Acre",
"value": "4"
},
"startIndex": 96,
"startIndex": 102,
"type": "builtin.dimension"
},
{
"endIndex": 120,
"endIndex": 126,
"entity": "4 pico meters",
"resolution": {
"unit": "Picometer",
"value": "4"
},
"startIndex": 108,
"startIndex": 114,
"type": "builtin.dimension"
},
{
"endIndex": 143,
"endIndex": 149,
"entity": "chrimc@hotmail.com",
"resolution": {
"value": "chrimc@hotmail.com"
},
"startIndex": 126,
"startIndex": 132,
"type": "builtin.email"
},
{
"endIndex": 150,
"endIndex": 156,
"entity": "$4",
"resolution": {
"unit": "Dollar",
"value": "4"
},
"startIndex": 149,
"startIndex": 155,
"type": "builtin.currency"
},
{
"endIndex": 160,
"endIndex": 166,
"entity": "$4.25",
"resolution": {
"unit": "Dollar",
"value": "4.25"
},
"startIndex": 156,
"startIndex": 162,
"type": "builtin.currency"
},
{
@ -973,12 +971,12 @@
"type": "builtin.ordinal"
},
{
"endIndex": 192,
"endIndex": 198,
"entity": "first",
"resolution": {
"value": "1"
},
"startIndex": 188,
"startIndex": 194,
"type": "builtin.ordinal"
},
{
@ -992,138 +990,138 @@
"type": "builtin.ordinalV2"
},
{
"endIndex": 192,
"endIndex": 198,
"entity": "first",
"resolution": {
"offset": "1",
"relativeTo": "start"
},
"startIndex": 188,
"startIndex": 194,
"type": "builtin.ordinalV2"
},
{
"endIndex": 278,
"endIndex": 284,
"entity": "next one",
"resolution": {
"offset": "1",
"relativeTo": "current"
},
"startIndex": 271,
"startIndex": 277,
"type": "builtin.ordinalV2.relative"
},
{
"endIndex": 299,
"endIndex": 305,
"entity": "previous one",
"resolution": {
"offset": "-1",
"relativeTo": "current"
},
"startIndex": 288,
"startIndex": 294,
"type": "builtin.ordinalV2.relative"
},
{
"endIndex": 200,
"endIndex": 206,
"entity": "10%",
"resolution": {
"value": "10%"
},
"startIndex": 198,
"startIndex": 204,
"type": "builtin.percentage"
},
{
"endIndex": 210,
"endIndex": 216,
"entity": "10.5%",
"resolution": {
"value": "10.5%"
},
"startIndex": 206,
"startIndex": 212,
"type": "builtin.percentage"
},
{
"endIndex": 227,
"endIndex": 233,
"entity": "425-555-1234",
"resolution": {
"score": "0.9",
"value": "425-555-1234"
},
"startIndex": 216,
"startIndex": 222,
"type": "builtin.phonenumber"
},
{
"endIndex": 241,
"endIndex": 247,
"entity": "3 degrees",
"resolution": {
"unit": "Degree",
"value": "3"
},
"startIndex": 233,
"startIndex": 239,
"type": "builtin.temperature"
},
{
"endIndex": 261,
"endIndex": 267,
"entity": "-27.5 degrees c",
"resolution": {
"unit": "C",
"value": "-27.5"
},
"startIndex": 247,
"startIndex": 253,
"type": "builtin.temperature"
}
],
"intents": [
{
"intent": "EntityTests",
"score": 0.96595037
"score": 0.953405857
},
{
"intent": "Roles",
"score": 0.184567839
"score": 0.197366714
},
{
"intent": "search",
"score": 0.149123311
"score": 0.149378926
},
{
"intent": "Weather.GetForecast",
"score": 0.0122321565
"score": 0.0143940123
},
{
"intent": "Travel",
"score": 0.0114093516
"score": 0.0119320424
},
{
"intent": "None",
"score": 0.009063047
"score": 0.01040122
},
{
"intent": "Delivery",
"score": 0.000278715248
"score": 0.0002846266
},
{
"intent": "SpecifyName",
"score": 6.590373E-05
"score": 6.563565E-05
},
{
"intent": "Help",
"score": 4.902734E-06
"score": 4.81870757E-06
},
{
"intent": "Cancel",
"score": 1.602786E-06
"score": 1.56337478E-06
},
{
"intent": "Greeting",
"score": 8.547132E-07
"score": 8.20979437E-07
}
],
"query": "12 years old and 3 days old and monday july 3rd 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",
"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",
"sentimentAnalysis": {
"label": "neutral",
"score": 0.5
},
"topScoringIntent": {
"intent": "EntityTests",
"score": 0.96595037
"score": 0.953405857
}
}
}

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

@ -6,7 +6,7 @@
"endIndex": 66,
"score": 0.456283748,
"startIndex": 0,
"text": "http : / / foo . com is where you can get a weather forecast for seattle",
"text": "http://foo.com is where you can get a weather forecast for seattle",
"type": "Composite2"
}
],
@ -198,5 +198,124 @@
"intent": "Weather.GetForecast",
"score": 0.669524968
}
},
"v3": {
"prediction": {
"entities": {
"$instance": {
"Composite2": [
{
"length": 66,
"modelType": "Composite Entity Extractor",
"modelTypeId": 4,
"recognitionSources": [
"model"
],
"score": 0.456283748,
"startIndex": 0,
"text": "http://foo.com is where you can get a weather forecast for seattle",
"type": "Composite2"
}
],
"geographyV2": [
{
"length": 7,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 59,
"text": "seattle",
"type": "builtin.geographyV2.city"
}
]
},
"Composite2": [
{
"$instance": {
"url": [
{
"length": 14,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "http://foo.com",
"type": "builtin.url"
}
],
"Weather.Location": [
{
"length": 7,
"modelType": "Entity Extractor",
"modelTypeId": 1,
"recognitionSources": [
"model"
],
"score": 0.76184386,
"startIndex": 59,
"text": "seattle",
"type": "Weather.Location"
}
]
},
"url": [
"http://foo.com"
],
"Weather.Location": [
"seattle"
]
}
],
"geographyV2": [
"seattle"
]
},
"intents": {
"Cancel": {
"score": 0.000171828113
},
"Delivery": {
"score": 0.0011408634
},
"EntityTests": {
"score": 0.342939854
},
"Greeting": {
"score": 0.0001518702
},
"Help": {
"score": 0.0005502715
},
"None": {
"score": 0.0175834317
},
"Roles": {
"score": 0.0432791822
},
"search": {
"score": 0.014743383
},
"SpecifyName": {
"score": 0.00172697916
},
"Travel": {
"score": 0.013458414
},
"Weather.GetForecast": {
"score": 0.669524968
}
},
"normalizedQuery": "http://foo.com is where you can get a weather forecast for seattle",
"sentiment": {
"label": "neutral",
"score": 0.5
},
"topIntent": "Weather.GetForecast"
},
"query": "http://foo.com is where you can get a weather forecast for seattle"
}
}

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

@ -178,112 +178,96 @@
{
"endIndex": 1,
"startIndex": 0,
"subtype": "integer",
"text": "3",
"type": "builtin.number"
},
{
"endIndex": 18,
"startIndex": 17,
"subtype": "integer",
"text": "2",
"type": "builtin.number"
},
{
"endIndex": 36,
"startIndex": 35,
"subtype": "integer",
"text": "5",
"type": "builtin.number"
},
{
"endIndex": 43,
"startIndex": 41,
"subtype": "integer",
"text": "10",
"type": "builtin.number"
},
{
"endIndex": 66,
"startIndex": 65,
"subtype": "integer",
"text": "6",
"type": "builtin.number"
},
{
"endIndex": 82,
"startIndex": 81,
"subtype": "integer",
"text": "8",
"type": "builtin.number"
},
{
"endIndex": 139,
"startIndex": 136,
"subtype": "integer",
"text": "425",
"type": "builtin.number"
},
{
"endIndex": 143,
"startIndex": 140,
"subtype": "integer",
"text": "777",
"type": "builtin.number"
},
{
"endIndex": 148,
"startIndex": 144,
"subtype": "integer",
"text": "1212",
"type": "builtin.number"
},
{
"endIndex": 155,
"startIndex": 152,
"subtype": "integer",
"text": "206",
"type": "builtin.number"
},
{
"endIndex": 159,
"startIndex": 156,
"subtype": "integer",
"text": "666",
"type": "builtin.number"
},
{
"endIndex": 164,
"startIndex": 160,
"subtype": "integer",
"text": "4123",
"type": "builtin.number"
},
{
"endIndex": 301,
"startIndex": 299,
"subtype": "integer",
"text": "68",
"type": "builtin.number"
},
{
"endIndex": 316,
"startIndex": 314,
"subtype": "integer",
"text": "72",
"type": "builtin.number"
},
{
"endIndex": 394,
"startIndex": 391,
"subtype": "integer",
"text": "400",
"type": "builtin.number"
},
{
"endIndex": 403,
"startIndex": 400,
"subtype": "integer",
"text": "500",
"type": "builtin.number"
}

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

@ -1,428 +0,0 @@
{
"entities": {
"$instance": {
"Composite2": [
{
"length": 69,
"modelType": "Composite Entity Extractor",
"modelTypeId": 4,
"recognitionSources": [
"model"
],
"score": 0.9501543,
"startIndex": 0,
"text": "http://foo.com is where you can fly from seattle to dallas via denver",
"type": "Composite2"
}
],
"geographyV2": [
{
"length": 7,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 41,
"text": "seattle",
"type": "builtin.geographyV2.city"
}
]
},
"Composite2": [
{
"$instance": {
"City": [
{
"length": 6,
"modelType": "Hierarchical Entity Extractor",
"modelTypeId": 3,
"recognitionSources": [
"model"
],
"score": 0.9857553,
"startIndex": 63,
"text": "denver",
"type": "City"
}
],
"City::From": [
{
"length": 7,
"modelType": "Hierarchical Entity Extractor",
"modelTypeId": 3,
"recognitionSources": [
"model"
],
"score": 0.9997592,
"startIndex": 41,
"text": "seattle",
"type": "City::From"
}
],
"City::To": [
{
"length": 6,
"modelType": "Hierarchical Entity Extractor",
"modelTypeId": 3,
"recognitionSources": [
"model"
],
"score": 0.9990426,
"startIndex": 52,
"text": "dallas",
"type": "City::To"
}
],
"url": [
{
"length": 14,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "http://foo.com",
"type": "builtin.url"
}
]
},
"City": [
"denver"
],
"City::From": [
"seattle"
],
"City::To": [
"dallas"
],
"url": [
"http://foo.com"
]
}
],
"geographyV2": [
"seattle"
]
},
"intents": {
"Cancel": {
"score": 0.000227437369
},
"Delivery": {
"score": 0.001310123
},
"EntityTests": {
"score": 0.94500196
},
"Greeting": {
"score": 0.000152356763
},
"Help": {
"score": 0.000547201431
},
"None": {
"score": 0.004187195
},
"Roles": {
"score": 0.0300086979
},
"search": {
"score": 0.0211907644
},
"SpecifyName": {
"score": 0.00157370011
},
"Travel": {
"score": 0.0778588
},
"Weather_GetForecast": {
"score": 0.0237181056
}
},
"sentiment": {
"label": "neutral",
"score": 0.5
},
"text": "http://foo.com is where you can fly from seattle to dallas via denver",
"v2": {
"compositeEntities": [
{
"children": [
{
"type": "City",
"value": "denver"
},
{
"type": "builtin.url",
"value": "http://foo.com"
},
{
"type": "City::From",
"value": "seattle"
},
{
"type": "City::To",
"value": "dallas"
}
],
"parentType": "Composite2",
"value": "http : / / foo . com is where you can fly from seattle to dallas via denver"
}
],
"entities": [
{
"endIndex": 57,
"entity": "dallas",
"score": 0.998420954,
"startIndex": 52,
"type": "City::To"
},
{
"endIndex": 47,
"entity": "seattle",
"score": 0.9992566,
"startIndex": 41,
"type": "City::From"
},
{
"endIndex": 68,
"entity": "denver",
"score": 0.984729,
"startIndex": 63,
"type": "City"
},
{
"endIndex": 68,
"entity": "http : / / foo . com is where you can fly from seattle to dallas via denver",
"score": 0.962469339,
"startIndex": 0,
"type": "Composite2"
},
{
"endIndex": 47,
"entity": "seattle",
"startIndex": 41,
"type": "builtin.geographyV2.city"
},
{
"endIndex": 13,
"entity": "http://foo.com",
"resolution": {
"value": "http://foo.com"
},
"startIndex": 0,
"type": "builtin.url"
}
],
"intents": [
{
"intent": "EntityTests",
"score": 0.944987357
},
{
"intent": "Travel",
"score": 0.0452092439
},
{
"intent": "Roles",
"score": 0.0297764745
},
{
"intent": "Weather.GetForecast",
"score": 0.0231683664
},
{
"intent": "search",
"score": 0.008871362
},
{
"intent": "None",
"score": 0.004223796
},
{
"intent": "SpecifyName",
"score": 0.00236839615
},
{
"intent": "Delivery",
"score": 0.0013232599
},
{
"intent": "Help",
"score": 0.0005449379
},
{
"intent": "Cancel",
"score": 0.000226470322
},
{
"intent": "Greeting",
"score": 0.000151786517
}
],
"query": "http://foo.com is where you can fly from seattle to dallas via denver",
"sentimentAnalysis": {
"label": "neutral",
"score": 0.5
},
"topScoringIntent": {
"intent": "EntityTests",
"score": 0.944987357
}
},
"v3": {
"prediction": {
"entities": {
"$instance": {
"Composite2": [
{
"length": 69,
"modelType": "Composite Entity Extractor",
"modelTypeId": 4,
"recognitionSources": [
"model"
],
"score": 0.9501543,
"startIndex": 0,
"text": "http://foo.com is where you can fly from seattle to dallas via denver",
"type": "Composite2"
}
],
"geographyV2": [
{
"length": 7,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 41,
"text": "seattle",
"type": "builtin.geographyV2.city"
}
]
},
"Composite2": [
{
"$instance": {
"City": [
{
"length": 6,
"modelType": "Hierarchical Entity Extractor",
"modelTypeId": 3,
"recognitionSources": [
"model"
],
"score": 0.9857553,
"startIndex": 63,
"text": "denver",
"type": "City"
}
],
"City::From": [
{
"length": 7,
"modelType": "Hierarchical Entity Extractor",
"modelTypeId": 3,
"recognitionSources": [
"model"
],
"score": 0.9997592,
"startIndex": 41,
"text": "seattle",
"type": "City::From"
}
],
"City::To": [
{
"length": 6,
"modelType": "Hierarchical Entity Extractor",
"modelTypeId": 3,
"recognitionSources": [
"model"
],
"score": 0.9990426,
"startIndex": 52,
"text": "dallas",
"type": "City::To"
}
],
"url": [
{
"length": 14,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "http://foo.com",
"type": "builtin.url"
}
]
},
"City": [
"denver"
],
"City::From": [
"seattle"
],
"City::To": [
"dallas"
],
"url": [
"http://foo.com"
]
}
],
"geographyV2": [
"seattle"
]
},
"intents": {
"Cancel": {
"score": 0.000227437369
},
"Delivery": {
"score": 0.001310123
},
"EntityTests": {
"score": 0.94500196
},
"Greeting": {
"score": 0.000152356763
},
"Help": {
"score": 0.000547201431
},
"None": {
"score": 0.004187195
},
"Roles": {
"score": 0.0300086979
},
"search": {
"score": 0.0211907644
},
"SpecifyName": {
"score": 0.00157370011
},
"Travel": {
"score": 0.0778588
},
"Weather.GetForecast": {
"score": 0.0237181056
}
},
"normalizedQuery": "http://foo.com is where you can fly from seattle to dallas via denver",
"sentiment": {
"label": "neutral",
"score": 0.5
},
"topIntent": "EntityTests"
},
"query": "http://foo.com is where you can fly from seattle to dallas via denver"
}
}

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

@ -1,451 +0,0 @@
{
"entities": {
"$instance": {
"Destination": [
{
"length": 8,
"modelType": "Composite Entity Extractor",
"modelTypeId": 4,
"recognitionSources": [
"model"
],
"role": "Destination",
"score": 0.982723653,
"startIndex": 25,
"text": "12346 WA",
"type": "Address"
}
],
"Source": [
{
"length": 8,
"modelType": "Composite Entity Extractor",
"modelTypeId": 4,
"recognitionSources": [
"model"
],
"role": "Source",
"score": 0.933905244,
"startIndex": 13,
"text": "12345 VA",
"type": "Address"
}
]
},
"Destination": [
{
"$instance": {
"number": [
{
"length": 5,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 25,
"text": "12346",
"type": "builtin.number"
}
],
"State": [
{
"length": 2,
"modelType": "Entity Extractor",
"modelTypeId": 1,
"recognitionSources": [
"model"
],
"score": 0.9893949,
"startIndex": 31,
"text": "WA",
"type": "State"
}
]
},
"number": [
12346
],
"State": [
"WA"
]
}
],
"Source": [
{
"$instance": {
"number": [
{
"length": 5,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 13,
"text": "12345",
"type": "builtin.number"
}
],
"State": [
{
"length": 2,
"modelType": "Entity Extractor",
"modelTypeId": 1,
"recognitionSources": [
"model"
],
"score": 0.937490761,
"startIndex": 19,
"text": "VA",
"type": "State"
}
]
},
"number": [
12345
],
"State": [
"VA"
]
}
]
},
"intents": {
"Cancel": {
"score": 1.01764708E-09
},
"Delivery": {
"score": 0.00238572317
},
"EntityTests": {
"score": 4.757576E-10
},
"Greeting": {
"score": 1.0875E-09
},
"Help": {
"score": 1.01764708E-09
},
"None": {
"score": 1.17844979E-06
},
"Roles": {
"score": 0.999911964
},
"search": {
"score": 9.494859E-06
},
"SpecifyName": {
"score": 3.0666667E-09
},
"Travel": {
"score": 3.09763345E-06
},
"Weather_GetForecast": {
"score": 1.02792524E-06
}
},
"sentiment": {
"label": "neutral",
"score": 0.5
},
"text": "Deliver from 12345 VA to 12346 WA",
"v2": {
"compositeEntities": [
{
"children": [
{
"type": "builtin.number",
"value": "12345"
},
{
"type": "State",
"value": "va"
}
],
"parentType": "Address",
"value": "12345 va"
},
{
"children": [
{
"type": "builtin.number",
"value": "12346"
},
{
"type": "State",
"value": "wa"
}
],
"parentType": "Address",
"value": "12346 wa"
}
],
"entities": [
{
"endIndex": 20,
"entity": "va",
"score": 0.9417667,
"startIndex": 19,
"type": "State"
},
{
"endIndex": 32,
"entity": "wa",
"score": 0.9899993,
"startIndex": 31,
"type": "State"
},
{
"endIndex": 20,
"entity": "12345 va",
"role": "Source",
"score": 0.9377045,
"startIndex": 13,
"type": "Address"
},
{
"endIndex": 32,
"entity": "12346 wa",
"role": "Destination",
"score": 0.9818967,
"startIndex": 25,
"type": "Address"
},
{
"endIndex": 17,
"entity": "12345",
"resolution": {
"subtype": "integer",
"value": "12345"
},
"startIndex": 13,
"type": "builtin.number"
},
{
"endIndex": 29,
"entity": "12346",
"resolution": {
"subtype": "integer",
"value": "12346"
},
"startIndex": 25,
"type": "builtin.number"
}
],
"intents": [
{
"intent": "Roles",
"score": 0.999888361
},
{
"intent": "Delivery",
"score": 0.00234605442
},
{
"intent": "search",
"score": 9.343347E-06
},
{
"intent": "Travel",
"score": 3.04712876E-06
},
{
"intent": "None",
"score": 1.15824787E-06
},
{
"intent": "Weather.GetForecast",
"score": 1.01009994E-06
},
{
"intent": "SpecifyName",
"score": 3.01666669E-09
},
{
"intent": "Greeting",
"score": 1.06875E-09
},
{
"intent": "Cancel",
"score": 1E-09
},
{
"intent": "Help",
"score": 1E-09
},
{
"intent": "EntityTests",
"score": 4.6666665E-10
}
],
"query": "Deliver from 12345 VA to 12346 WA",
"sentimentAnalysis": {
"label": "neutral",
"score": 0.5
},
"topScoringIntent": {
"intent": "Roles",
"score": 0.999888361
}
},
"v3": {
"prediction": {
"entities": {
"$instance": {
"Destination": [
{
"length": 8,
"modelType": "Composite Entity Extractor",
"modelTypeId": 4,
"recognitionSources": [
"model"
],
"role": "Destination",
"score": 0.982723653,
"startIndex": 25,
"text": "12346 WA",
"type": "Address"
}
],
"Source": [
{
"length": 8,
"modelType": "Composite Entity Extractor",
"modelTypeId": 4,
"recognitionSources": [
"model"
],
"role": "Source",
"score": 0.933905244,
"startIndex": 13,
"text": "12345 VA",
"type": "Address"
}
]
},
"Destination": [
{
"$instance": {
"number": [
{
"length": 5,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 25,
"text": "12346",
"type": "builtin.number"
}
],
"State": [
{
"length": 2,
"modelType": "Entity Extractor",
"modelTypeId": 1,
"recognitionSources": [
"model"
],
"score": 0.9893949,
"startIndex": 31,
"text": "WA",
"type": "State"
}
]
},
"number": [
12346
],
"State": [
"WA"
]
}
],
"Source": [
{
"$instance": {
"number": [
{
"length": 5,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 13,
"text": "12345",
"type": "builtin.number"
}
],
"State": [
{
"length": 2,
"modelType": "Entity Extractor",
"modelTypeId": 1,
"recognitionSources": [
"model"
],
"score": 0.937490761,
"startIndex": 19,
"text": "VA",
"type": "State"
}
]
},
"number": [
12345
],
"State": [
"VA"
]
}
]
},
"intents": {
"Cancel": {
"score": 1.01764708E-09
},
"Delivery": {
"score": 0.00238572317
},
"EntityTests": {
"score": 4.757576E-10
},
"Greeting": {
"score": 1.0875E-09
},
"Help": {
"score": 1.01764708E-09
},
"None": {
"score": 1.17844979E-06
},
"Roles": {
"score": 0.999911964
},
"search": {
"score": 9.494859E-06
},
"SpecifyName": {
"score": 3.0666667E-09
},
"Travel": {
"score": 3.09763345E-06
},
"Weather.GetForecast": {
"score": 1.02792524E-06
}
},
"normalizedQuery": "deliver from 12345 va to 12346 wa",
"sentiment": {
"label": "neutral",
"score": 0.5
},
"topIntent": "Roles"
},
"query": "Deliver from 12345 VA to 12346 WA"
}
}

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

@ -1,421 +0,0 @@
{
"entities": {
"$instance": {
"child": [
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "child",
"startIndex": 87,
"text": "lisa simpson",
"type": "builtin.personName"
}
],
"endloc": [
{
"length": 7,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "endloc",
"startIndex": 44,
"text": "jakarta",
"type": "builtin.geographyV2.city"
}
],
"endpos": [
{
"length": 4,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "endpos",
"startIndex": 24,
"text": "last",
"type": "builtin.ordinalV2.relative"
}
],
"parent": [
{
"length": 13,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "parent",
"startIndex": 56,
"text": "homer simpson",
"type": "builtin.personName"
}
],
"startloc": [
{
"length": 6,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "startloc",
"startIndex": 34,
"text": "london",
"type": "builtin.geographyV2.city"
}
],
"startpos": [
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "startpos",
"startIndex": 8,
"text": "next to last",
"type": "builtin.ordinalV2.relative"
}
]
},
"child": [
"lisa simpson"
],
"endloc": [
"jakarta"
],
"endpos": [
{
"offset": 0,
"relativeTo": "end"
}
],
"parent": [
"homer simpson"
],
"startloc": [
"london"
],
"startpos": [
{
"offset": -1,
"relativeTo": "end"
}
]
},
"intents": {
"Cancel": {
"score": 0.000107549029
},
"Delivery": {
"score": 0.00123035291
},
"EntityTests": {
"score": 0.0009487789
},
"Greeting": {
"score": 5.293933E-05
},
"Help": {
"score": 0.0001358991
},
"None": {
"score": 0.0109820236
},
"Roles": {
"score": 0.999204934
},
"search": {
"score": 0.0309635121
},
"SpecifyName": {
"score": 0.0009410849
},
"Travel": {
"score": 0.01095186
},
"Weather_GetForecast": {
"score": 0.0106523167
}
},
"sentiment": {
"label": "neutral",
"score": 0.5
},
"text": "go from next to last to last move london to jakarta and homer simpson is the parent of lisa simpson",
"v2": {
"entities": [
{
"endIndex": 39,
"entity": "london",
"role": "startloc",
"startIndex": 34,
"type": "builtin.geographyV2.city"
},
{
"endIndex": 50,
"entity": "jakarta",
"role": "endloc",
"startIndex": 44,
"type": "builtin.geographyV2.city"
},
{
"endIndex": 19,
"entity": "next to last",
"resolution": {
"offset": "-1",
"relativeTo": "end"
},
"role": "startpos",
"startIndex": 8,
"type": "builtin.ordinalV2.relative"
},
{
"endIndex": 27,
"entity": "last",
"resolution": {
"offset": "0",
"relativeTo": "end"
},
"role": "endpos",
"startIndex": 24,
"type": "builtin.ordinalV2.relative"
},
{
"endIndex": 68,
"entity": "homer simpson",
"role": "parent",
"startIndex": 56,
"type": "builtin.personName"
},
{
"endIndex": 98,
"entity": "lisa simpson",
"role": "child",
"startIndex": 87,
"type": "builtin.personName"
}
],
"intents": [
{
"intent": "Roles",
"score": 0.999204934
},
{
"intent": "search",
"score": 0.0309635121
},
{
"intent": "None",
"score": 0.0109820236
},
{
"intent": "Travel",
"score": 0.01095186
},
{
"intent": "Weather.GetForecast",
"score": 0.0106523167
},
{
"intent": "Delivery",
"score": 0.00123035291
},
{
"intent": "EntityTests",
"score": 0.0009487789
},
{
"intent": "SpecifyName",
"score": 0.0009410849
},
{
"intent": "Help",
"score": 0.0001358991
},
{
"intent": "Cancel",
"score": 0.000107549029
},
{
"intent": "Greeting",
"score": 5.293933E-05
}
],
"query": "go from next to last to last move london to jakarta and homer simpson is the parent of lisa simpson",
"sentimentAnalysis": {
"label": "neutral",
"score": 0.5
},
"topScoringIntent": {
"intent": "Roles",
"score": 0.999204934
}
},
"v3": {
"prediction": {
"entities": {
"$instance": {
"child": [
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "child",
"startIndex": 87,
"text": "lisa simpson",
"type": "builtin.personName"
}
],
"endloc": [
{
"length": 7,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "endloc",
"startIndex": 44,
"text": "jakarta",
"type": "builtin.geographyV2.city"
}
],
"endpos": [
{
"length": 4,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "endpos",
"startIndex": 24,
"text": "last",
"type": "builtin.ordinalV2.relative"
}
],
"parent": [
{
"length": 13,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "parent",
"startIndex": 56,
"text": "homer simpson",
"type": "builtin.personName"
}
],
"startloc": [
{
"length": 6,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "startloc",
"startIndex": 34,
"text": "london",
"type": "builtin.geographyV2.city"
}
],
"startpos": [
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"role": "startpos",
"startIndex": 8,
"text": "next to last",
"type": "builtin.ordinalV2.relative"
}
]
},
"child": [
"lisa simpson"
],
"endloc": [
"jakarta"
],
"endpos": [
{
"offset": 0,
"relativeTo": "end"
}
],
"parent": [
"homer simpson"
],
"startloc": [
"london"
],
"startpos": [
{
"offset": -1,
"relativeTo": "end"
}
]
},
"intents": {
"Cancel": {
"score": 0.000107549029
},
"Delivery": {
"score": 0.00123035291
},
"EntityTests": {
"score": 0.0009487789
},
"Greeting": {
"score": 5.293933E-05
},
"Help": {
"score": 0.0001358991
},
"None": {
"score": 0.0109820236
},
"Roles": {
"score": 0.999204934
},
"search": {
"score": 0.0309635121
},
"SpecifyName": {
"score": 0.0009410849
},
"Travel": {
"score": 0.01095186
},
"Weather.GetForecast": {
"score": 0.0106523167
}
},
"normalizedQuery": "go from next to last to last move london to jakarta and homer simpson is the parent of lisa simpson",
"sentiment": {
"label": "neutral",
"score": 0.5
},
"topIntent": "Roles"
},
"query": "go from next to last to last move london to jakarta and homer simpson is the parent of lisa simpson"
}
}

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

@ -1,350 +0,0 @@
{
"entities": {
"$instance": {
"extra": [
{
"length": 5,
"modelType": "Pattern.Any Entity Extractor",
"modelTypeId": 7,
"recognitionSources": [
"model"
],
"role": "extra",
"startIndex": 71,
"text": "kb435",
"type": "subject"
}
],
"Part": [
{
"length": 5,
"modelType": "Regex Entity Extractor",
"modelTypeId": 8,
"recognitionSources": [
"model"
],
"startIndex": 71,
"text": "kb435",
"type": "Part"
}
],
"person": [
{
"length": 12,
"modelType": "Pattern.Any Entity Extractor",
"modelTypeId": 7,
"recognitionSources": [
"model"
],
"startIndex": 49,
"text": "bart simpson",
"type": "person"
}
],
"personName": [
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 49,
"text": "bart simpson",
"type": "builtin.personName"
}
],
"subject": [
{
"length": 31,
"modelType": "Pattern.Any Entity Extractor",
"modelTypeId": 7,
"recognitionSources": [
"model"
],
"startIndex": 12,
"text": "something wicked this way comes",
"type": "subject"
}
]
},
"extra": [
"kb435"
],
"Part": [
"kb435"
],
"person": [
"bart simpson"
],
"personName": [
"bart simpson"
],
"subject": [
"something wicked this way comes"
]
},
"intents": {
"Cancel": {
"score": 1.01764708E-09
},
"Delivery": {
"score": 1.8E-09
},
"EntityTests": {
"score": 1.044335E-05
},
"Greeting": {
"score": 1.0875E-09
},
"Help": {
"score": 1.01764708E-09
},
"None": {
"score": 2.38094663E-06
},
"Roles": {
"score": 5.98274755E-06
},
"search": {
"score": 0.9999993
},
"SpecifyName": {
"score": 3.0666667E-09
},
"Travel": {
"score": 3.09763345E-06
},
"Weather_GetForecast": {
"score": 1.02792524E-06
}
},
"sentiment": {
"label": "negative",
"score": 0.210341513
},
"text": "email about something wicked this way comes from bart simpson and also kb435",
"v2": {
"entities": [
{
"endIndex": 60,
"entity": "bart simpson",
"startIndex": 49,
"type": "builtin.personName"
},
{
"endIndex": 75,
"entity": "kb435",
"startIndex": 71,
"type": "Part"
},
{
"endIndex": 42,
"entity": "something wicked this way comes",
"role": "",
"startIndex": 12,
"type": "subject"
},
{
"endIndex": 60,
"entity": "bart simpson",
"role": "",
"startIndex": 49,
"type": "person"
},
{
"endIndex": 75,
"entity": "kb435",
"role": "extra",
"startIndex": 71,
"type": "subject"
}
],
"intents": [
{
"intent": "search",
"score": 0.9999993
},
{
"intent": "EntityTests",
"score": 1.044335E-05
},
{
"intent": "Roles",
"score": 5.98274755E-06
},
{
"intent": "Travel",
"score": 3.09763345E-06
},
{
"intent": "None",
"score": 2.38094663E-06
},
{
"intent": "Weather.GetForecast",
"score": 1.02792524E-06
},
{
"intent": "SpecifyName",
"score": 3.0666667E-09
},
{
"intent": "Delivery",
"score": 1.8E-09
},
{
"intent": "Greeting",
"score": 1.0875E-09
},
{
"intent": "Cancel",
"score": 1.01764708E-09
},
{
"intent": "Help",
"score": 1.01764708E-09
}
],
"query": "email about something wicked this way comes from bart simpson and also kb435",
"sentimentAnalysis": {
"label": "negative",
"score": 0.210341513
},
"topScoringIntent": {
"intent": "search",
"score": 0.9999993
}
},
"v3": {
"prediction": {
"entities": {
"$instance": {
"extra": [
{
"length": 5,
"modelType": "Pattern.Any Entity Extractor",
"modelTypeId": 7,
"recognitionSources": [
"model"
],
"role": "extra",
"startIndex": 71,
"text": "kb435",
"type": "subject"
}
],
"Part": [
{
"length": 5,
"modelType": "Regex Entity Extractor",
"modelTypeId": 8,
"recognitionSources": [
"model"
],
"startIndex": 71,
"text": "kb435",
"type": "Part"
}
],
"person": [
{
"length": 12,
"modelType": "Pattern.Any Entity Extractor",
"modelTypeId": 7,
"recognitionSources": [
"model"
],
"startIndex": 49,
"text": "bart simpson",
"type": "person"
}
],
"personName": [
{
"length": 12,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 49,
"text": "bart simpson",
"type": "builtin.personName"
}
],
"subject": [
{
"length": 31,
"modelType": "Pattern.Any Entity Extractor",
"modelTypeId": 7,
"recognitionSources": [
"model"
],
"startIndex": 12,
"text": "something wicked this way comes",
"type": "subject"
}
]
},
"extra": [
"kb435"
],
"Part": [
"kb435"
],
"person": [
"bart simpson"
],
"personName": [
"bart simpson"
],
"subject": [
"something wicked this way comes"
]
},
"intents": {
"Cancel": {
"score": 1.01764708E-09
},
"Delivery": {
"score": 1.8E-09
},
"EntityTests": {
"score": 1.044335E-05
},
"Greeting": {
"score": 1.0875E-09
},
"Help": {
"score": 1.01764708E-09
},
"None": {
"score": 2.38094663E-06
},
"Roles": {
"score": 5.98274755E-06
},
"search": {
"score": 0.9999993
},
"SpecifyName": {
"score": 3.0666667E-09
},
"Travel": {
"score": 3.09763345E-06
},
"Weather.GetForecast": {
"score": 1.02792524E-06
}
},
"normalizedQuery": "email about something wicked this way comes from bart simpson and also kb435",
"sentiment": {
"label": "negative",
"score": 0.210341513
},
"topIntent": "search"
},
"query": "email about something wicked this way comes from bart simpson and also kb435"
}
}

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

@ -1,338 +0,0 @@
{
"entities": {
"$instance": {
"Composite2": [
{
"length": 66,
"modelType": "Composite Entity Extractor",
"modelTypeId": 4,
"recognitionSources": [
"model"
],
"score": 0.456283748,
"startIndex": 0,
"text": "http://foo.com is where you can get a weather forecast for seattle",
"type": "Composite2"
}
],
"geographyV2": [
{
"length": 7,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 59,
"text": "seattle",
"type": "builtin.geographyV2.city"
}
]
},
"Composite2": [
{
"$instance": {
"url": [
{
"length": 14,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "http://foo.com",
"type": "builtin.url"
}
],
"Weather.Location": [
{
"length": 7,
"modelType": "Entity Extractor",
"modelTypeId": 1,
"recognitionSources": [
"model"
],
"score": 0.76184386,
"startIndex": 59,
"text": "seattle",
"type": "Weather.Location"
}
]
},
"url": [
"http://foo.com"
],
"Weather.Location": [
"seattle"
]
}
],
"geographyV2": [
"seattle"
]
},
"intents": {
"Cancel": {
"score": 0.000171828113
},
"Delivery": {
"score": 0.0011408634
},
"EntityTests": {
"score": 0.342939854
},
"Greeting": {
"score": 0.0001518702
},
"Help": {
"score": 0.0005502715
},
"None": {
"score": 0.0175834317
},
"Roles": {
"score": 0.0432791822
},
"search": {
"score": 0.014743383
},
"SpecifyName": {
"score": 0.00172697916
},
"Travel": {
"score": 0.013458414
},
"Weather_GetForecast": {
"score": 0.669524968
}
},
"sentiment": {
"label": "neutral",
"score": 0.5
},
"text": "http://foo.com is where you can get a weather forecast for seattle",
"v2": {
"compositeEntities": [
{
"children": [
{
"type": "builtin.url",
"value": "http://foo.com"
},
{
"type": "Weather.Location",
"value": "seattle"
}
],
"parentType": "Composite2",
"value": "http : / / foo . com is where you can get a weather forecast for seattle"
}
],
"entities": [
{
"endIndex": 65,
"entity": "seattle",
"score": 0.76184386,
"startIndex": 59,
"type": "Weather.Location"
},
{
"endIndex": 65,
"entity": "http : / / foo . com is where you can get a weather forecast for seattle",
"score": 0.456283748,
"startIndex": 0,
"type": "Composite2"
},
{
"endIndex": 65,
"entity": "seattle",
"startIndex": 59,
"type": "builtin.geographyV2.city"
},
{
"endIndex": 13,
"entity": "http://foo.com",
"resolution": {
"value": "http://foo.com"
},
"startIndex": 0,
"type": "builtin.url"
}
],
"intents": [
{
"intent": "Weather.GetForecast",
"score": 0.669524968
},
{
"intent": "EntityTests",
"score": 0.342939854
},
{
"intent": "Roles",
"score": 0.0432791822
},
{
"intent": "None",
"score": 0.0175834317
},
{
"intent": "search",
"score": 0.014743383
},
{
"intent": "Travel",
"score": 0.013458414
},
{
"intent": "SpecifyName",
"score": 0.00172697916
},
{
"intent": "Delivery",
"score": 0.0011408634
},
{
"intent": "Help",
"score": 0.0005502715
},
{
"intent": "Cancel",
"score": 0.000171828113
},
{
"intent": "Greeting",
"score": 0.0001518702
}
],
"query": "http://foo.com is where you can get a weather forecast for seattle",
"sentimentAnalysis": {
"label": "neutral",
"score": 0.5
},
"topScoringIntent": {
"intent": "Weather.GetForecast",
"score": 0.669524968
}
},
"v3": {
"prediction": {
"entities": {
"$instance": {
"Composite2": [
{
"length": 66,
"modelType": "Composite Entity Extractor",
"modelTypeId": 4,
"recognitionSources": [
"model"
],
"score": 0.456283748,
"startIndex": 0,
"text": "http://foo.com is where you can get a weather forecast for seattle",
"type": "Composite2"
}
],
"geographyV2": [
{
"length": 7,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 59,
"text": "seattle",
"type": "builtin.geographyV2.city"
}
]
},
"Composite2": [
{
"$instance": {
"url": [
{
"length": 14,
"modelType": "Prebuilt Entity Extractor",
"modelTypeId": 2,
"recognitionSources": [
"model"
],
"startIndex": 0,
"text": "http://foo.com",
"type": "builtin.url"
}
],
"Weather.Location": [
{
"length": 7,
"modelType": "Entity Extractor",
"modelTypeId": 1,
"recognitionSources": [
"model"
],
"score": 0.76184386,
"startIndex": 59,
"text": "seattle",
"type": "Weather.Location"
}
]
},
"url": [
"http://foo.com"
],
"Weather.Location": [
"seattle"
]
}
],
"geographyV2": [
"seattle"
]
},
"intents": {
"Cancel": {
"score": 0.000171828113
},
"Delivery": {
"score": 0.0011408634
},
"EntityTests": {
"score": 0.342939854
},
"Greeting": {
"score": 0.0001518702
},
"Help": {
"score": 0.0005502715
},
"None": {
"score": 0.0175834317
},
"Roles": {
"score": 0.0432791822
},
"search": {
"score": 0.014743383
},
"SpecifyName": {
"score": 0.00172697916
},
"Travel": {
"score": 0.013458414
},
"Weather.GetForecast": {
"score": 0.669524968
}
},
"normalizedQuery": "http://foo.com is where you can get a weather forecast for seattle",
"sentiment": {
"label": "neutral",
"score": 0.5
},
"topIntent": "Weather.GetForecast"
},
"query": "http://foo.com is where you can get a weather forecast for seattle"
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -79,8 +79,8 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
public double[] number;
public double[] ordinal;
public double[] start;
// public double[] ordinal;
// public double[] start;
public OrdinalV2[] ordinalV2;
public OrdinalV2[] endpos;
@ -146,7 +146,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
public InstanceData[] email;
public InstanceData[] money;
public InstanceData[] number;
public InstanceData[] ordinal;
// public InstanceData[] ordinal;
public InstanceData[] percentage;
public InstanceData[] phonenumber;
public InstanceData[] temperature;
@ -159,7 +159,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
public string[] email;
public Money[] money;
public double[] number;
public double[] ordinal;
// public double[] ordinal;
public double[] percentage;
public string[] phonenumber;
public Temperature[] temperature;

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

@ -27,7 +27,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
return Task.FromResult(new HttpResponseMessage
{
StatusCode = HttpStatusCode.OK,
Content = new StringContent("{ \"query\": null, \"intents\": [], \"entities\": [] }"),
Content = new StringContent("{ \"query\": null, \"prediction\": { \"intents\": {}, \"entities\": {} }}"),
});
}
}

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

@ -185,7 +185,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
GetEnvironmentVarsLuis();
var mockHttp = GetMockHttpClientHandlerObject(utterance, responsePath);
var luisRecognizer = GetLuisRecognizer(mockHttp, verbose: true);
var luisRecognizer = GetLuisRecognizer(mockHttp, true, new LuisPredictionOptions { IncludeInstanceData = true });
var context = Utils.GetContext(utterance);
var result = await luisRecognizer.RecognizeAsync(context, CancellationToken.None);
@ -198,7 +198,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
Assert.IsTrue(result.Intents["SpecifyName"].Score > 0 && result.Intents["SpecifyName"].Score <= 1);
Assert.IsNotNull(result.Entities);
Assert.IsNotNull(result.Entities["Name"]);
Assert.AreEqual("emad", (string)result.Entities["Name"].First);
Assert.AreEqual("Emad", (string)result.Entities["Name"].First);
Assert.IsNotNull(result.Entities["$instance"]);
Assert.IsNotNull(result.Entities["$instance"]["Name"]);
Assert.AreEqual(11, (int)result.Entities["$instance"]["Name"].First["startIndex"]);
@ -237,7 +237,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
GetEnvironmentVarsLuis();
var mockHttp = GetMockHttpClientHandlerObject(utterance, responsePath);
var luisRecognizer = GetLuisRecognizer(mockHttp, true, new LuisPredictionOptions { IncludeAllIntents = true });
var luisRecognizer = GetLuisRecognizer(mockHttp, true, new LuisPredictionOptions { IncludeAllIntents = true, IncludeInstanceData = true });
var context = Utils.GetContext(utterance);
var result = await luisRecognizer.RecognizeAsync(context, CancellationToken.None);
@ -253,7 +253,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
Assert.IsNotNull(result.Entities["number"]);
Assert.AreEqual(2001, (int)result.Entities["number"].First);
Assert.IsNotNull(result.Entities["ordinal"]);
Assert.AreEqual(2, (int)result.Entities["ordinal"].First);
Assert.AreEqual(2, (int)result.Entities["ordinal"].First["offset"]);
Assert.IsNotNull(result.Entities["datetime"].First);
Assert.AreEqual("2001-02-02", (string)result.Entities["datetime"].First["timex"].First);
Assert.IsNotNull(result.Entities["$instance"]["number"]);
@ -263,7 +263,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
Assert.IsNotNull(result.Entities["$instance"]["datetime"]);
Assert.AreEqual(15, (int)result.Entities["$instance"]["datetime"].First["startIndex"]);
Assert.AreEqual(32, (int)result.Entities["$instance"]["datetime"].First["endIndex"]);
Assert.AreEqual("february 2nd 2001", (string)result.Entities["$instance"]["datetime"].First["text"]);
Assert.AreEqual("February 2nd 2001", (string)result.Entities["$instance"]["datetime"].First["text"]);
}
[TestMethod]
@ -300,7 +300,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
GetEnvironmentVarsLuis();
var mockHttp = GetMockHttpClientHandlerObject(utterance, responsePath);
var luisRecognizer = GetLuisRecognizer(mockHttp, true, new LuisPredictionOptions { IncludeAllIntents = true });
var luisRecognizer = GetLuisRecognizer(mockHttp, true, new LuisPredictionOptions { IncludeAllIntents = true, IncludeInstanceData = true });
var context = Utils.GetContext(utterance);
var result = await luisRecognizer.RecognizeAsync(context, CancellationToken.None);
@ -327,7 +327,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
GetEnvironmentVarsLuis();
var mockHttp = GetMockHttpClientHandlerObject(utterance, responsePath);
var luisRecognizer = GetLuisRecognizer(mockHttp, true, new LuisPredictionOptions { IncludeAllIntents = true });
var luisRecognizer = GetLuisRecognizer(mockHttp, true, new LuisPredictionOptions { IncludeAllIntents = true, IncludeInstanceData = true });
var context = Utils.GetContext(utterance);
var result = await luisRecognizer.RecognizeAsync(context, CancellationToken.None);
@ -345,7 +345,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
Assert.IsNotNull(result.Entities["$instance"]["Airline"]);
Assert.AreEqual(20, result.Entities["$instance"]["Airline"][0]["startIndex"]);
Assert.AreEqual(22, result.Entities["$instance"]["Airline"][0]["endIndex"]);
Assert.AreEqual("dl", result.Entities["$instance"]["Airline"][0]["text"]);
Assert.AreEqual("DL", result.Entities["$instance"]["Airline"][0]["text"]);
}
[TestMethod]
@ -356,7 +356,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
GetEnvironmentVarsLuis();
var mockHttp = GetMockHttpClientHandlerObject(utterance, responsePath);
var luisRecognizer = GetLuisRecognizer(mockHttp, true, new LuisPredictionOptions { IncludeAllIntents = true });
var luisRecognizer = GetLuisRecognizer(mockHttp, true, new LuisPredictionOptions { IncludeAllIntents = true, IncludeInstanceData = true });
var context = Utils.GetContext(utterance);
var result = await luisRecognizer.RecognizeAsync(context, CancellationToken.None);
@ -370,7 +370,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
Assert.IsNull(result.Entities["State"]);
Assert.IsNotNull(result.Entities["Address"]);
Assert.AreEqual(98033, result.Entities["Address"][0]["number"][0]);
Assert.AreEqual("wa", result.Entities["Address"][0]["State"][0]);
Assert.AreEqual("WA", result.Entities["Address"][0]["State"][0]);
Assert.IsNotNull(result.Entities["$instance"]);
Assert.IsNull(result.Entities["$instance"]["number"]);
Assert.IsNull(result.Entities["$instance"]["State"]);
@ -386,7 +386,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
Assert.IsNotNull(result.Entities["Address"][0]["$instance"]["State"]);
Assert.AreEqual(27, result.Entities["Address"][0]["$instance"]["State"][0]["startIndex"]);
Assert.AreEqual(29, result.Entities["Address"][0]["$instance"]["State"][0]["endIndex"]);
Assert.AreEqual("wa", result.Entities["Address"][0]["$instance"]["State"][0]["text"]);
Assert.AreEqual("WA", result.Entities["Address"][0]["$instance"]["State"][0]["text"]);
Assert.AreEqual("WA", result.Text.Substring(27, 29 - 27));
Utils.AssertScore(result.Entities["Address"][0]["$instance"]["State"][0]["score"]);
}
@ -399,7 +399,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
GetEnvironmentVarsLuis();
var mockHttp = GetMockHttpClientHandlerObject(utterance, responsePath);
var luisRecognizer = GetLuisRecognizer(mockHttp, true, new LuisPredictionOptions { IncludeAllIntents = true });
var luisRecognizer = GetLuisRecognizer(mockHttp, true, new LuisPredictionOptions { IncludeAllIntents = true, IncludeInstanceData = true });
var context = Utils.GetContext(utterance);
var result = await luisRecognizer.RecognizeAsync(context, CancellationToken.None);
@ -417,25 +417,6 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
Assert.AreEqual(3, result.Entities["$instance"]["datetime"].Count());
}
[TestMethod]
public async Task V1DatetimeResolution()
{
const string utterance = "at 4";
const string responsePath = "V1DatetimeResolution.json";
GetEnvironmentVarsLuis();
var mockHttp = GetMockHttpClientHandler(utterance, responsePath);
var luisRecognizer = GetLuisRecognizer(mockHttp, true, new LuisPredictionOptions { IncludeAllIntents = true });
var context = Utils.GetContext(utterance);
var result = await luisRecognizer.RecognizeAsync(context, CancellationToken.None);
Assert.IsNotNull(result.Entities["datetime_time"]);
Assert.AreEqual(1, result.Entities["datetime_time"].Count());
Assert.AreEqual("ampm", (string)result.Entities["datetime_time"][0]["comment"]);
Assert.AreEqual("T04", (string)result.Entities["datetime_time"][0]["time"]);
Assert.AreEqual(1, result.Entities["$instance"]["datetime_time"].Count());
}
// To create a file to test:
// 1) Create a <name>.json file with an object { Text:<query> } in it.
// 2) Run this test which will fail and generate a <name>.json.new file.
@ -576,7 +557,7 @@ namespace Microsoft.Bot.Builder.AI.LuisPreview.Tests
var application = new LuisApplication
{
EndpointKey = "this-is-not-a-key",
ApplicationId = "this-is-not-an-application-id",
ApplicationId = Guid.Empty.ToString(),
Endpoint = "https://westus.api.cognitive.microsoft.com",
};