UNPKG

@botonic/plugin-contentful

Version:

## What Does This Plugin Do?

17 lines (16 loc) 702 B
import { Locale, MatchType } from '../nlp'; import BotonicPluginContentful from '../plugin'; export type SearchEvaluator = ( /** Starting with 0. Undefined if not found */ matchPosition: number | undefined, numResults: number) => number; export declare class GroundTruth { readonly utterance: string; readonly contentId: string; constructor(utterance: string, contentId: string); } export declare class SearchRegression { readonly plugin: BotonicPluginContentful; readonly evaluator: SearchEvaluator; constructor(plugin: BotonicPluginContentful, evaluator: SearchEvaluator); run(matchType: MatchType, groundTruths: Iterable<GroundTruth>, locale: Locale): Promise<number>; }