• Calculates string similarity using enhanced algorithms for better accuracy. Returns a score between 0-100.

    Parameters

    • str1: string

      The first string to compare.

    • str2: string

      The second string to compare.

    Returns number

    Similarity score between 0 and 100.

    export function calculateSimilarity(str1: string, str2: string): number {
    if (!str1 || !str2) return 0;
    if (str1 === str2) return 100;

    // Use the enhanced similarity calculation
    return calculateEnhancedSimilarity(str1, str2, {
    debug: false, // Set to true for debugging
    });
    }