export const REPEAT_WINDOW_S: number; export const TWIN_DAYS: number[]; export const TWIN_DURATION_RATIO: number; export const PLACE_MIN_SCORE: number; export const PLACE_MIN_WORDS: number; export const TWIN_CLOSE_RATIO: number; export const SAME_HIT_MIN_SCORE: number; export const FOLD_DAYS: number; export const FOLD_MIN_OVERLAP: number; export type Cue = { start: number; end?: number; text?: string }; export type CueHit = { start: number; end: number; cueFirst: number; cueLast: number; match: string; context: string }; export type PhraseInstance = CueHit & { slug: string; videoId: string; platform: string | null; source: string | null; date: string | null; title: string | null; duration: number | null; speakerCheck?: boolean; availability?: string | null; via?: { slug: string; videoId: string; start: number; score: number }; alsoIn?: { slug: string; videoId: string; start: number }[]; // Release 35: the other-channel hits folded into this instance, each its own // moment on its own recording (an instance in `instances` always has the list). alternates?: PhraseAlternate[]; }; export type PhraseAlternate = { slug: string; videoId: string; start: number; end: number; platform: string | null; availability: string | null; }; export type PhraseScanResult = { instances: PhraseInstance[]; hits: PhraseInstance[]; dropped: (PhraseInstance & { why: string })[]; scanned: number; }; export function words(t: unknown): string[]; export function dayNumber(s: unknown): number | null; export function phraseRegExp(phrase: string | RegExp): RegExp; export function hitsInCues(cues: Cue[], re: RegExp): CueHit[]; export type JoinedCues = { texts: string[]; starts: number[]; joined: string }; export function joinCues(cues: Cue[]): JoinedCues; export function hitsInJoined(cues: Cue[], joined: JoinedCues, re: RegExp): CueHit[]; export function locateInCues(cues: Cue[], contextWords: string[]): { score: number; index: number | null }; export function phraseScan(opts: { channelsDir: string; channels: string[]; phrase: string | RegExp; prefer?: string | null; exclude?: string | RegExp | null; onProgress?: (done: number, total: number) => void; }): Promise; export type PhraseScanProgress = { done: number; total: number; channel: string; channelsDone: number; channels: number }; export type PhraseScanManyResult = PhraseScanResult & { id: string; phrase: string }; export function phraseScanMany(opts: { channelsDir: string; channels: string[]; phrases: { id: string; phrase: string | RegExp; exclude?: string | RegExp | null }[]; prefer?: string | null; exclude?: string | RegExp | null; cacheDir?: string | null; concurrency?: number; onProgress?: (p: PhraseScanProgress) => void; }): Promise; export { phraseSourceOf, phraseWords, wordsPhraseSource } from "./phraseSource.mjs"; export function niceDate(s: unknown): string; export function capInstances( instances: T[], max: number | null | undefined, ): { kept: T[]; skipped: T[] }; export function instancesAsClips( instances: PhraseInstance[], opts?: { pad?: number; idPrefix?: string }, ): Record[];