mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-16 22:35:04 -05:00
* make TheTVDB local search more restrictive
This commit is contained in:
parent
caafbca373
commit
bd6d1d4659
@ -128,6 +128,9 @@ public final class WebServices {
|
|||||||
return set(object.getName());
|
return set(object.getName());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// make local search more restrictive
|
||||||
|
localIndex.setResultMinimumSimilarity(0.7f);
|
||||||
}
|
}
|
||||||
|
|
||||||
return localIndex;
|
return localIndex;
|
||||||
|
@ -27,8 +27,8 @@ import uk.ac.shef.wit.simmetrics.similaritymetrics.QGramsDistance;
|
|||||||
public class LocalSearch<T> {
|
public class LocalSearch<T> {
|
||||||
|
|
||||||
private final AbstractStringMetric metric = new QGramsDistance();
|
private final AbstractStringMetric metric = new QGramsDistance();
|
||||||
private final float resultMinimumSimilarity = 0.5f;
|
private float resultMinimumSimilarity = 0.5f;
|
||||||
private final int resultSetSize = 20;
|
private int resultSetSize = 20;
|
||||||
|
|
||||||
private final List<T> objects;
|
private final List<T> objects;
|
||||||
private final List<Set<String>> fields;
|
private final List<Set<String>> fields;
|
||||||
@ -110,6 +110,16 @@ public class LocalSearch<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setResultMinimumSimilarity(float resultMinimumSimilarity) {
|
||||||
|
this.resultMinimumSimilarity = resultMinimumSimilarity;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setResultSetSize(int resultSetSize) {
|
||||||
|
this.resultSetSize = resultSetSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected Set<String> getFields(T object) {
|
protected Set<String> getFields(T object) {
|
||||||
return set(object.toString());
|
return set(object.toString());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user