import { IItem } from '../../types'; import { MatchResult } from './helpers'; /** * Sets additional matching patterns for topics. * The additional matching patterns and rejected patterns are not included in the TitleSummaryMatchingPatterns * but fetched from the media folder from the Living Atlas server. * * @param {string[]} extraMatchingPatterns - Additional matching patterns to be set. * @param {string[]} extraRejectedPatterns - Additional rejected patterns to be set. * @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 setExtraMatchingPatternsForTopics: (extraMatchingPatterns: string[], extraRejectedPatterns: string[], shouldAvoidUsingWordBoundary?: boolean) => void; /** * Matches topic information from an item's title and snippet using predefined or custom matching patterns. * * @param {IItem} item - The item containing the title and snippet to be matched. * @param {string[]} [customMatchingPattenrs] - Optional custom matching patterns to be used in addition to the predefined ones. * @returns {MatchResult[]} - An array of matched results for topic, deduplicated and with overlaps removed. */ export declare const matchTopicInfo: (item: IItem, customMatchingPattenrs?: string[]) => MatchResult[]; /** * Determines if a given string is a recognized topic. * @param topic - The string to check. * @returns {boolean} - True if the string is a recognized topic, false otherwise. */ export declare const isRecognizedTopic: (str: string) => boolean; /** * Determines if a given string is a rejected topic. * @param str - The string to check. * @returns {boolean} - True if the string is a rejected topic, false otherwise. */ export declare const isRejectedTopicInfo: (str: string) => boolean;