오프닝자막, 동영상자막 관련 알고리즘 수정

This commit is contained in:
2025-03-17 18:51:45 +09:00
parent 66223549b8
commit 5d222516a3
18 changed files with 671 additions and 92 deletions

View File

@@ -29,13 +29,12 @@ function findSimilarString(xmlDoc, targetString, threshold = 0.8) {
stringList.forEach(text => {
const similarity = stringSimilarity.compareTwoStrings(targetString, text);
console.log("🚀 ~ findSimilarString ~ text:", text)
console.log("🚀 ~ findSimilarString ~ targetString:", targetString)
console.log("🚀 ~ findSimilarString ~ similarity:", similarity)
// console.log("🚀 ~ findSimilarString ~ text:", text)
// console.log("🚀 ~ findSimilarString ~ targetString:", targetString)
// console.log("🚀 ~ findSimilarString ~ similarity:", similarity)
if (similarity > highestSimilarity && similarity >= threshold) {
highestSimilarity = similarity;
console.log("🚀 ~ findSimilarString ~ highestSimilarity:", highestSimilarity)
bestMatch = text;
}
});