diff options
author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-02-09 12:09:26 +0100 |
---|---|---|
committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-02-09 12:09:26 +0100 |
commit | d799a7bab1108d4a7b2fff21eb3d6ba108248f24 (patch) | |
tree | bb1cb6ffa76b43129d22ab1d64b7b1b41047773b | |
parent | 45939e1ee0f2bc38dbd04573117df5ee17ca34d6 (diff) | |
download | vdr-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-- | HISTORY | 2 | ||||
-rw-r--r-- | HISTORY.DE | 2 | ||||
-rw-r--r-- | epgsearchtools.c | 8 |
3 files changed, 11 insertions, 1 deletions
@@ -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: @@ -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; |