* 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:
parent
83054535e8
commit
f9df1098ab
|
@ -407,7 +407,8 @@ public enum EpisodeMetrics implements SimilarityMetric {
|
||||||
@Override
|
@Override
|
||||||
public float getSimilarity(Object o1, Object o2) {
|
public float getSimilarity(Object o1, Object o2) {
|
||||||
// adjust differentiation accuracy to about a year
|
// 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ public class TimeStampMetric implements SimilarityMetric {
|
||||||
long t2 = getTimeStamp(o2);
|
long t2 = getTimeStamp(o2);
|
||||||
|
|
||||||
if (t1 <= 0 || t2 <= 0)
|
if (t1 <= 0 || t2 <= 0)
|
||||||
return 0;
|
return -1;
|
||||||
|
|
||||||
float min = min(t1, t2);
|
float min = min(t1, t2);
|
||||||
float max = max(t1, t2);
|
float max = max(t1, t2);
|
||||||
|
|
Loading…
Reference in New Issue