/// <reference types="node" />
import Stream from 'stream';
import * as FlagUtils from './flags';
export declare type SentenceFlags = FlagUtils.SentenceFlags;
export interface SentenceExample {
    id: string;
    flags: FlagUtils.SentenceFlags;
    context?: string;
    preprocessed: string;
    target_code: string | string[];
    predictions?: string[][];
    prediction?: string;
    type?: string;
    utterance?: string;
}
declare class DatasetStringifier extends Stream.Transform {
    constructor();
    _transform(ex: SentenceExample, encoding: BufferEncoding, callback: (err?: Error | null, buffer?: string) => void): void;
    _flush(callback: (err: Error | null) => void): void;
}
interface DatasetParserOptions {
    offset?: number;
    contextual?: boolean;
    preserveId?: boolean;
    overrideFlags?: string;
    parseMultiplePrograms?: boolean;
}
declare class DatasetParser extends Stream.Transform {
    private _n;
    private _offset;
    private _contextual;
    private _preserveId;
    private _overrideFlags;
    private _parseMultiplePrograms;
    constructor(options?: DatasetParserOptions);
    _transform(line: string, encoding: BufferEncoding, callback: (err?: Error | null, res?: SentenceExample) => void): void;
    _flush(callback: () => void): void;
}
export interface DialogueTurn {
    context: string | null;
    agent: string | null;
    agent_target: string | null;
    intermediate_context: string | null;
    user: string;
    user_target: string;
    vote?: string;
    comment?: string;
}
export interface DialogueExample {
    id: string;
    comment?: string;
    turns: DialogueTurn[];
}
declare class DialogueSerializer extends Stream.Transform {
    private _annotations;
    constructor(options?: {
        annotations: boolean;
    });
    private _pushMany;
    private _prefixLines;
    _transform(dlg: DialogueExample, encoding: BufferEncoding, callback: (err?: Error | null) => void): void;
    _flush(callback: (err?: Error | null) => void): void;
}
export declare type ParsedDialogue = DialogueTurn[] & {
    id: string;
};
declare class DialogueParser extends Stream.Transform {
    private _buffer;
    private _i;
    private _id;
    private _keySequence;
    constructor({ withAnnotations, invertTurns }?: {
        withAnnotations?: boolean | undefined;
        invertTurns?: boolean | undefined;
    });
    _transform(line: string, encoding: BufferEncoding, callback: (err?: Error | null, data?: DialogueTurn[]) => void): void;
    _flush(callback: (err?: Error | null, data?: DialogueTurn[]) => void): void;
}
export { DatasetParser, DatasetStringifier, DialogueParser, DialogueSerializer, };
