summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2008-02-09 12:09:26 +0100
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2008-02-09 12:09:26 +0100
commitd799a7bab1108d4a7b2fff21eb3d6ba108248f24 (patch)
treebb1cb6ffa76b43129d22ab1d64b7b1b41047773b
parent45939e1ee0f2bc38dbd04573117df5ee17ca34d6 (diff)
downloadvdr-plugin-epgsearch-d799a7bab1108d4a7b2fff21eb3d6ba108248f24.tar.gz
vdr-plugin-epgsearch-d799a7bab1108d4a7b2fff21eb3d6ba108248f24.tar.bz2
patch from Alf Fahland for fine-tuning the fuzzy match of descriptions
-rw-r--r--HISTORY2
-rw-r--r--HISTORY.DE2
-rw-r--r--epgsearchtools.c8
3 files changed, 11 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index dec3005..01a274a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -51,6 +51,8 @@ fixes:
- 'avoid repeats' combined with 'pause on ... recordings' created to less timers, thanks
to spockele@vdrportal for reporting
- fixed some compiler warnings with g++ 4.3
+- fine-tuning fuzzy matching of descriptions, thanks to Alf Fahland for providing a patch
+
2007-09-02: Version 0.9.23
new:
diff --git a/HISTORY.DE b/HISTORY.DE
index 5fb1db0..9cf1b26 100644
--- a/HISTORY.DE
+++ b/HISTORY.DE
@@ -58,6 +58,8 @@ fixes:
- 'Wiederholung vermeiden' kombiniert mit 'Pause, wenn ... Aufnahmen existieren' hat
zu wenige Timer erzeugt, Danke an spockele@vdrportal für den Hinweis
- einige Compilerwarnungen von g++ 4.3 behoben
+- fine-tuning beim fuzzy-Vergleich von Inhaltsangaben, Danke an Alf Fahland für einen
+ Patch
2007-09-02: Version 0.9.23
diff --git a/epgsearchtools.c b/epgsearchtools.c
index 0e9cf65..0ee4486 100644
--- a/epgsearchtools.c
+++ b/epgsearchtools.c
@@ -686,7 +686,13 @@ bool DescriptionMatches(const char* eDescr, const char* rDescr)
// last try with Levenshtein Distance, only compare the first 1000 chars
double fMatch = FuzzyMatch(eDescr, rDescr, 1000);
- if (fMatch > MATCHLIMIT)
+ double tmp_matchlimit = MATCHLIMIT;
+ if(maxLength - minLength < 5)
+ {
+ tmp_matchlimit = 0.95;
+ LogFile.Log(2,"difference between both descriptions is < 5 setting matchlimit to: %.2f %%", tmp_matchlimit*100);
+ }
+ if (fMatch > tmp_matchlimit)
{
LogFile.Log(2,"match is: %.2f %%", fMatch*100);
return true;