import { IExpanded, IExpandedWithPoint } from '../types/thai-address.d'; /** * Prepares the address string by removing certain keywords and replacing specific abbreviations. * This function removes or replaces common terms, abbreviations, and the postal code from the address string to standardize it for further processing. * * @param address - The full address string to be prepared. * @param postal_code - The postal code code to be removed from the address. * * @returns The cleaned and standardized address string with the specified terms and postal code removed. */ export declare const prepareAddress: (address: string, postal_code: string) => string; /** * Calculates the match points for a given address based on the number of address components that match. * This function compares the provided address against the elements' fields and counts how many fields in the element match the address. * * @param element - An address object (IExpandedWithPoint) containing various address components. * @param address - The address string to compare with the fields of the element. * * @returns The number of matching fields (match points) between the address and the element. */ export declare const calculateMatchPoints: (element: IExpandedWithPoint, address: string) => number; /** * Determines the best matching address from the search results based on a calculated match score. * This function calculates match points for each address in the search results, sorts them by score, * and returns the highest-scored result if it meets a minimum threshold. * * @param searchResult - An array of address objects with match points to be evaluated. * @param address - The address string to compare against the search results. * * @returns The best matching address (IExpandedWithPoint) if the highest score is 3, or null if no match meets the threshold. */ export declare const getBestResult: (searchResult: IExpandedWithPoint[], address: string) => IExpandedWithPoint | null; /** * Cleans up the address by removing specific address components from the address string. * This function iterates over a list of fields and removes any occurrences of the corresponding values from the address string. * The result is a cleaned-up address with those components removed. * * @param address - The full address string to be cleaned up. * @param result - An object containing address components to be removed from the full address. * * @returns A cleaned-up address string with the specified components removed. */ export declare const cleanupAddress: (address: string, result: IExpanded) => string;