mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 16:28:51 -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());
|
||||
}
|
||||
};
|
||||
|
||||
// make local search more restrictive
|
||||
localIndex.setResultMinimumSimilarity(0.7f);
|
||||
}
|
||||
|
||||
return localIndex;
|
||||
|
@ -27,8 +27,8 @@ import uk.ac.shef.wit.simmetrics.similaritymetrics.QGramsDistance;
|
||||
public class LocalSearch<T> {
|
||||
|
||||
private final AbstractStringMetric metric = new QGramsDistance();
|
||||
private final float resultMinimumSimilarity = 0.5f;
|
||||
private final int resultSetSize = 20;
|
||||
private float resultMinimumSimilarity = 0.5f;
|
||||
private int resultSetSize = 20;
|
||||
|
||||
private final List<T> objects;
|
||||
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) {
|
||||
return set(object.toString());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user