• Calculate string similarity score normalized to 0-1 scale using enhanced algorithms.

    Parameters

    • str1: string

      First string to compare.

    • str2: string

      Second string to compare.

    Returns number

    Similarity score between 0 (no match) and 1 (perfect match).

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

    // Use enhanced similarity calculation normalized to 0-1 scale
    return calculateEnhancedSimilarity(str1, str2) / 100;
    }