///
import Stream from 'stream';
import * as Tp from 'thingpedia';
import { SchemaRetriever } from 'thingtalk';
import { SentenceExample } from '../parsers';
import { AnyEntity } from '../../utils/entity-utils';
interface Constant {
key: string;
value: AnyEntity;
display: string;
unit?: string;
}
interface SampleResult {
id: string;
utterance: string;
target_code: string;
depth: number;
sentence_length: number;
num_functions: number;
num_entities: number;
num_pp: number;
num_filters: number;
prim_type: string;
function_signature: string;
context?: string;
context_utterance?: string;
assistant_action?: string;
}
interface SampleOptions {
rng: () => number;
debug: boolean;
functionHighValueList?: Set;
}
interface SamplingStrategy {
init(): StateType;
iterate(state: StateType): Iterable<[string, SampleResult[]]>;
collect(state: StateType, input: SentenceExample, result: SampleResult, options: SampleOptions): void;
sample(key: string, choices: SampleResult[], options: SampleOptions): SampleResult[];
}
interface BySentenceSampleState {
s: number;
sentences: string[];
bags: Map;
}
declare const SAMPLING_STRATEGIES: {
bySignature: SamplingStrategy