clwoz-models
Version:
Models for ConversationLearner
62 lines (61 loc) • 2.08 kB
TypeScript
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
export declare enum EntityType {
LOCAL = "LOCAL",
LUIS = "LUIS",
ENUM = "ENUM"
}
export declare const makeNegative: (entity: EntityBase, positiveId: string) => EntityBase;
export interface EntityBase {
entityId: string;
entityName: string;
entityType: EntityType | string;
resolverType: string | null;
createdDateTime: string;
version: number | null;
packageCreationId: number | null;
packageDeletionId: number | null;
lastModifiedDateTime?: string;
isMultivalue: boolean;
/** If set, has a negative and positive version */
isNegatible: boolean;
/** If true, entity with resolver must have resolution */
isResolutionRequired: boolean;
/** If Negatable, the Id of negative entity associates with this Entity */
negativeId: string | null;
/** If a Negative, Id of positive entity associated with this Entity */
positiveId: string | null;
/** If an ENUM entity, the supported enums */
enumValues?: EnumValue[];
/** If it is set to true, it means that the entity is not persisted in the bot memory.
* This is only true for built-in entities that are not created with "Always extract"
*/
doNotMemorize: boolean | null;
}
export declare function isPrebuilt(entity: EntityBase): boolean;
export declare const MAX_ENTITY_NAME_LENGTH = 30;
export declare const MAX_ENUM_VALUE_COUNT = 5;
export declare const MAX_ENUM_VALUE_NAME_LENGTH = 10;
export interface EnumValue {
enumValueId?: string;
enumValue: string;
}
export interface LabeledEntity {
entityId: string;
startCharIndex: number;
endCharIndex: number;
entityText: string;
resolution: {} | null;
builtinType: string;
}
export interface PredictedEntity extends LabeledEntity {
score: number | undefined;
}
export interface EntityList {
entities: EntityBase[];
}
export interface EntityIdList {
entityIds: string[];
}