import { IItem } from '../../types'; import { MatchResult } from './helpers'; /** * Sets extra matching patterns for sources and creates corresponding regex and sets. * * @param extraMatchingPatternsForSources - An array of strings representing extra matching patterns for sources. * @param extraRejectedPatternsForSources - An array of strings representing extra rejected patterns for sources. * @param {boolean} [shouldAvoidUsingWordBoundary=false] - A boolean indicating whether to avoid using word boundaries (useful for languages like Chinese and Japanese). * * @remarks * - For languages like Japanese that don't use spaces between words (or where word boundaries are not easily determined by spaces or punctuation), * set `shouldAvoidUsingWordBoundary` to true to remove `\b` and use lookarounds to ensure correct boundaries. */ export declare const setExtraMatchingPatternsForSources: (extraMatchingPatternsForSources: string[], extraRejectedPatternsForSources: string[], shouldAvoidUsingWordBoundary?: boolean) => void; /** * Matches source information from an item's title and snippet using predefined or custom matching patterns. * * @param {IItem} item - The item containing title and snippet to search for matching patterns. * @param {string[]} [customMatchingPattenrs] - Optional custom matching patterns to be used in addition to the predefined ones. * @returns {string[]} - An array of matched results for source info after deduplication and removal of overlaps. */ export declare const matchSourceInfo: (item: IItem, customMatchingPattenrs?: string[]) => MatchResult[]; /** * Determines if a given string is a recognized source information. * @param topic - The string to check. * @returns {boolean} - True if the string is a recognized source, false otherwise. */ export declare const isRecognizedSource: (str: string) => boolean; /** * Determines if a given string is a rejected source information. * @param str - The string to check. * @returns {boolean} - True if the string is a rejected source information, false otherwise. */ export declare const isRejectedSourceInfo: (str: string) => boolean;