* allow negative match for timestamp metric for when timestamp isn't defined in the episode data (prefer episodes with airdate over episodes without)

This commit is contained in:
Reinhard Pointner 2013-04-02 16:41:22 +00:00
parent 83054535e8
commit f9df1098ab
2 changed files with 3 additions and 2 deletions

View File

@ -407,7 +407,8 @@ public enum EpisodeMetrics implements SimilarityMetric {
@Override
public float getSimilarity(Object o1, Object o2) {
// adjust differentiation accuracy to about a year
return super.getSimilarity(o1, o2) >= 0.8 ? 1 : 0;
float f = super.getSimilarity(o1, o2);
return f >= 0.9 ? 1 : f >= 0 ? 0 : -1;
}

View File

@ -17,7 +17,7 @@ public class TimeStampMetric implements SimilarityMetric {
long t2 = getTimeStamp(o2);
if (t1 <= 0 || t2 <= 0)
return 0;
return -1;
float min = min(t1, t2);
float max = max(t1, t2);