import { IItem } from '../../types'; import { MatchResult } from './helpers'; /** * Sets extra matching and rejected patterns for locations and updates the corresponding regex and sets. * * @param extraMatchingPatternsForLocations - An array of strings representing additional patterns to match locations. * @param extraRejectedPatternsForLocations - An array of strings representing additional patterns to reject locations. * @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 setExtraMatchingPatternsForLocations: (extraMatchingPatternsForLocations?: string[], extraRejectedPatternsForLocations?: string[], shouldAvoidUsingWordBoundary?: boolean) => void; /** * Matches location 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 location information. * @param {string[]} [customMatchingPattenrs] - Optional custom matching patterns to be included in the search. * @returns {string[]} - An array of matched results for location info after deduplication and removing overlaps. */ export declare const matchLocationInfo: (item: IItem, customMatchingPattenrs?: string[]) => MatchResult[]; /** * Determines if a given string is a recognized location information. * @param topic - The string to check. * @returns {boolean} - True if the string is a recognized location, false otherwise. */ export declare const isRecognizedLocation: (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 isRejectedLocationInfo: (str: string) => boolean;