Skip to content

Commit

Permalink
Add alteredQuery to LuisResult
Browse files Browse the repository at this point in the history
  • Loading branch information
msft-shahins committed Feb 7, 2017
1 parent d152d7d commit e0e0d9b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CSharp/Library/Microsoft.Bot.Builder/Luis/Luis-q.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,18 @@
}
},
"compositeEntities":{
"type":"array",
"type": "array",
"description":"The compsite entities found in the utterance.",
"items":{
"$ref":"#/definitions/CompositeEntity"
}
},
"dialog":{
"$ref":"#/definitions/DialogResponse"
},
"alteredQuery":{
"type":"string",
"description":"The altered query used by LUIS to extract intent and entities. For example, when Bing spell check is enabled for a model, this field will contain the spell checked utterance."
}
}
},
Expand Down
12 changes: 11 additions & 1 deletion CSharp/Library/Microsoft.Bot.Builder/Luis/Models/LuisResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ public LuisResult() { }
/// <summary>
/// Initializes a new instance of the LuisResult class.
/// </summary>
public LuisResult(string query, IList<EntityRecommendation> entities, IntentRecommendation topScoringIntent = default(IntentRecommendation), IList<IntentRecommendation> intents = default(IList<IntentRecommendation>), IList<CompositeEntity> compositeEntities = default(IList<CompositeEntity>), DialogResponse dialog = default(DialogResponse))
public LuisResult(string query, IList<EntityRecommendation> entities, IntentRecommendation topScoringIntent = default(IntentRecommendation), IList<IntentRecommendation> intents = default(IList<IntentRecommendation>), IList<CompositeEntity> compositeEntities = default(IList<CompositeEntity>), DialogResponse dialog = default(DialogResponse), string alteredQuery = default(string))
{
Query = query;
TopScoringIntent = topScoringIntent;
Intents = intents;
Entities = entities;
CompositeEntities = compositeEntities;
Dialog = dialog;
AlteredQuery = alteredQuery;
}

/// <summary>
Expand All @@ -59,6 +60,7 @@ public LuisResult() { }
public IList<EntityRecommendation> Entities { get; set; }

/// <summary>
/// The compsite entities found in the utterance.
/// </summary>
[JsonProperty(PropertyName = "compositeEntities")]
public IList<CompositeEntity> CompositeEntities { get; set; }
Expand All @@ -68,6 +70,14 @@ public LuisResult() { }
[JsonProperty(PropertyName = "dialog")]
public DialogResponse Dialog { get; set; }

/// <summary>
/// The altered query used by LUIS to extract intent and entities. For
/// example, when Bing spell check is enabled for a model, this field
/// will contain the spell checked utterance.
/// </summary>
[JsonProperty(PropertyName = "alteredQuery")]
public string AlteredQuery { get; set; }

/// <summary>
/// Validate the object. Throws ValidationException if validation fails.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
..\..\packages\autorest.0.16.0\tools\AutoRest.exe -i Luis-q.json -n Microsoft.Bot.Builder.Luis -Header MICROSOFT_MIT -O .
..\..\..\packages\autorest.0.16.0\tools\AutoRest.exe -i Luis-q.json -n Microsoft.Bot.Builder.Luis -Header MICROSOFT_MIT -O .

0 comments on commit e0e0d9b

Please sign in to comment.