{"version":3,"sources":["jsdelivr-header.js","/npm/similarity-score@1.0.0/SimilarityScore.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,IAAI,QAAU,QAAQ,WAClB,KAAO,QAAQ,uBAEf,iBAAmB,SAAS,EAAG,EAAG,GAClC,IAAI,EAAU,QAAQ,oBAAoB,EAAG,GACzC,EAAe,EAEf,QAAQ,UAAU,QAAQ,EAAG,KAC7B,EAAe,GAGnB,IAAI,EAAQ,IAAO,EAAU,GAE7B,OADI,EAAQ,EAAQ,YAAW,EAAQ,GAChC,CACX,EAEI,YAAY,SAAS,EAAG,EAAG,GAC3B,IAAI,EAAU,KAAK,EAAG,GAAG,WACrB,EAAe,EAEf,QAAQ,UAAU,QAAQ,EAAG,KAC7B,EAAe,GAInB,IAAI,EAAQ,IAAK,EAAQ,GAEzB,OADI,EAAQ,EAAQ,YAAW,EAAQ,GAChC,CACX,EAEI,GAAG,SAAS,EAAG,EAAG,GAClB,IAAI,EAAQ,KAAK,EAAG,GAAG,WAEvB,OADI,EAAQ,EAAQ,YAAW,EAAQ,GAChC,CACX,EAEI,YAAc,CAAE,EAAG,YAAa,QAAU,CAAC,UAAW,KAG1D,OAAO,QAAU,CAAC,kCAAkB,wBAAa,MAAI","file":"/npm/similarity-score@1.0.0/SimilarityScore.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/similarity-score@1.0.0/SimilarityScore.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\n\nlet natural = require('natural')\nlet dlev = require('damerau-levenshtein')\n\nlet winklerMetaphone = function(a, b, options) {\n    let scoreJw = natural.JaroWinklerDistance(a, b);\n    let scoreSoundex = 0\n\n    if (natural.Metaphone.compare(a, b)) {\n        scoreSoundex = 1\n    }\n\n    let score = 0.5 * (scoreJw + scoreSoundex);\n    if (score < options.threshold) score = 0.0;\n    return score;\n}\n\nlet metaphoneDl=function(a, b, options) {\n    let scoreDl = dlev(a, b).similarity;\n    let scoreSoundex = 0\n\n    if (natural.Metaphone.compare(a, b)) {\n        scoreSoundex = 1\n    }\n\n    //let score = 0.5 * (scoreDl + scoreSoundex);\n    let score = 0.5*(scoreDl+scoreSoundex);\n    if (score < options.threshold) score = 0.0;\n    return score; \n}\n\nlet dl=function(a, b, options) {\n    let score = dlev(a, b).similarity;\n    if (score < options.threshold) score = 0.0;\n    return score;\n}\n\nlet commonScore = { f: metaphoneDl, options : {threshold: 0.3} }\n//let commonScore = { f: winklerMetaphone, options : {threshold: 0.4} }\n\nmodule.exports = {winklerMetaphone, metaphoneDl, dl, commonScore}"]}