Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a small issue in var name #1421

Merged
merged 3 commits into from
Nov 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libraries/botbuilder-ai/src/luisRecognizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ export class LuisRecognizer implements LuisRecognizerTelemetryClient {
entitiesAndMetadata: any,
verbose: boolean
): LuisModels.EntityModel[] {
const childrenEntites: any = verbose ? { $instance: {} } : {};
const childrenEntities: any = verbose ? { $instance: {} } : {};
let childrenEntitiesMetadata: any = {};

// This is now implemented as O(n^2) search and can be reduced to O(2n) using a map as an optimization if n grows
Expand Down Expand Up @@ -681,9 +681,9 @@ export class LuisRecognizer implements LuisRecognizerTelemetryClient {

let val = this.getEntityValue(entity);
if (val != null) {
this.addProperty(childrenEntites, this.getNormalizedEntityName(entity), val);
this.addProperty(childrenEntities, this.getNormalizedEntityName(entity), val);
if (verbose) {
this.addProperty(childrenEntites.$instance, this.getNormalizedEntityName(entity), this.getEntityMetadata(entity));
this.addProperty(childrenEntities.$instance, this.getNormalizedEntityName(entity), this.getEntityMetadata(entity));
}
}
}
Expand All @@ -697,7 +697,7 @@ export class LuisRecognizer implements LuisRecognizerTelemetryClient {
}
}

this.addProperty(entitiesAndMetadata, this.getNormalizedEntityName(compositeEntityMetadata), childrenEntites);
this.addProperty(entitiesAndMetadata, this.getNormalizedEntityName(compositeEntityMetadata), childrenEntities);
if (verbose) {
this.addProperty(entitiesAndMetadata.$instance, this.getNormalizedEntityName(compositeEntityMetadata), childrenEntitiesMetadata);
}
Expand Down