import { NlpManager } from '../nlp'; import MemoryConversationContext from './memory-conversation-context'; /** * Microsoft Bot Framework compatible recognizer for nlp.js. */ declare class Recognizer { private readonly settings; private readonly nlpManager; private readonly threshold; private readonly conversationContext; /** * Constructor of the class. * @param {Object} settings Settings for the instance. */ constructor(settings: { nlpManager?: NlpManager; container?: any; nerThreshold?: number; threshold?: number; conversationContext?: MemoryConversationContext; }); /** * Train the NLP manager. */ train(): Promise; /** * Loads the model from a file. * @param {String} filename Name of the file. */ load(filename: string): void; /** * Saves the model into a file. * @param {String} filename Name of the file. */ save(filename: string): void; /** * Loads the NLP manager from an excel. * @param {String} filename Name of the file. */ loadExcel(filename: string): Promise; /** * Process an utterance using the NLP manager. This is done using a given context * as the context object. * @param {Object} srcContext Source context * @param {String} locale Locale of the utterance. * @param {String} utterance Locale of the utterance. */ process(srcContext: Record, locale?: string, utterance?: string): Promise; /** * Given an utterance and the locale, returns the recognition of the utterance. * @param {String} utterance Utterance to be recognized. * @param {String} model Model of the utterance. * @param {Function} cb Callback Function. */ recognizeUtterance(utterance: string, model: { locale: string; }, cb: Function): Promise; } export default Recognizer;