@voiceflow/common
Version:
Junk drawer of utility functions
41 lines • 1.29 kB
TypeScript
import type { BuiltinSlot } from '../constants';
export declare const formatIntentName: (name: string) => string;
export declare const getUtterancesWithSlotNames: ({ slots, utterances, }: {
slots?: {
key: string;
name: string;
}[];
utterances?: {
text: string;
}[];
}) => string[];
export declare const getSlotType: (slots: BuiltinSlot<string, string>[], slot: {
name: string;
type: {
value?: string;
};
}) => string;
export declare const VF_ENTITY_REGEXP: RegExp;
export interface JSONEntity {
startPos: number;
endPos: number;
entity: string;
key: string;
}
export interface JSONUtterance {
text?: string;
entities?: JSONEntity[];
}
export declare const utteranceEntityPermutations: ({ utterances, entitiesByID, limit, replacer, getSamples, }: {
utterances: string[];
entitiesByID: Record<string, {
inputs: string[];
name: string;
}>;
limit?: number;
replacer?: (sample: string, entityID: string) => string;
getSamples?: (inputs: string[]) => string[];
}) => JSONUtterance[];
export declare const injectUtteranceSpaces: (originalUtterance: string) => string;
export declare const cleanVFIntentName: (intentName: string) => string;
//# sourceMappingURL=intent.d.ts.map