import * as Tp from 'thingpedia'; import * as ThingTalk from 'thingtalk'; import { SentenceExample } from '../parsers'; declare type ParameterRecord = Tp.FileParameterProvider.ParameterRecord; declare type Sampler = Tp.FileParameterProvider.Sampler; export interface ParameterProvider { getSampler(type: 'entity' | 'string', key: string, mode: Tp.FileParameterProvider.SampleMode): Promise; get(type: 'entity' | 'string', key: string): Promise; } declare type SamplingType = 'random' | 'uniform' | 'default' | 'sequential'; interface ParameterReplacerOptions { thingpediaClient: Tp.BaseClient; schemaRetriever: ThingTalk.SchemaRetriever; constProvider: ParameterProvider; paramLocale: string; timezone: string; rng: () => number; debug?: boolean; addFlag?: boolean; quotedProbability?: number; untypedStringProbability?: number; maxSpanLength?: number; cleanParameters?: boolean; requotable?: boolean; includeEntityValue?: boolean; numAttempts?: number; syntheticExpandFactor?: number; noQuoteExpandFactor?: number; paraphrasingExpandFactor?: number; samplingType?: SamplingType; subsetParamSet?: [number, number]; } export default class ParameterReplacer { private _tpClient; private _schemas; private _loader; private _rng; private _addFlag; private _paramLangPack; private _timezone; private _quotedProbability; private _untypedStringProbability; private _maxSpanLength; private _cleanParameters; private _requotable; private _includeEntityValue; private _numAttempts; private _debug; private _blowUpSynthetic; private _blowUpNoQuote; private _blowUpParaphrasing; private _blowUpAugmented; private _entityDescendants?; private _warned; constructor(options: ParameterReplacerOptions); private _warn; private _blowupFactor; private _getSlotArg; private _getParamListKey; private _loadEntityDescendants; private _getDescendants; private _getEntityListKey; private _getFallbackParamListKey; private _transformValue; private _getValueListForSlot; private _getValueListForToken; private _sampleParam; private _replaceTokensInSentence; private _replaceTokensInProgram; private _replaceWithSlot; private _computeReplaceableParameters; process(example: SentenceExample): Promise; } export {};