Commit 7c1aa51e authored by Rob Tomsick's avatar Rob Tomsick

Dead code removal

parent 548fecf1
...@@ -39,14 +39,12 @@ import static org.jooq.impl.DSL.field; ...@@ -39,14 +39,12 @@ import static org.jooq.impl.DSL.field;
import static org.jooq.impl.DSL.name; import static org.jooq.impl.DSL.name;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
...@@ -418,61 +416,6 @@ implements DictionaryService ...@@ -418,61 +416,6 @@ implements DictionaryService
+ +
StringUtils.getLevenshteinDistance(hash, bh)); StringUtils.getLevenshteinDistance(hash, bh));
}; };
// return (a, b) ->
// {
// /*
// * TODO?
// *
// * We get JW distance, and use that to adjust the weight of
// * the lev distance between the hashes. The idea is that
// * the distance in hashes become more important for strings
// * that are further from reference.
// */
// final String ah = PhoneticHash.hash(accessor.apply(a));
// final String bh = PhoneticHash.hash(accessor.apply(b));
// double jwa =
// StringUtils.getJaroWinklerDistance(reference.toUpperCase(),
// accessor.apply(a).toUpperCase());
// double jwb =
// StringUtils.getJaroWinklerDistance(reference.toUpperCase(),
// accessor.apply(b).toUpperCase());
// double hsa = StringUtils.getJaroWinklerDistance(hash, ah);
// double hsb = StringUtils.getJaroWinklerDistance(hash, bh);
// double ascore;
// double bscore;
// if (0.25d > jwa)
// {
// /* use hash as primary score */
// ascore = hsa * (1.0d - jwa) + jwa;
// }
// else
// {
// /* use normal dist as primary */
// ascore = jwa * (1.0d - hsa) + hsa;
// }
// if (0.25d > jwb)
// {
// /* use hash as primary score */
// bscore = hsb * (1.0d - jwb) + jwb;
// }
// else
// {
// /* use normal dist as primary */
// bscore = jwb * (1.0d - hsb) + hsb;
// }
// return (int) (bscore * 1000d) - (int) (ascore * 1000d);
// };
} }
private static final Stream<String> private static final Stream<String>
...@@ -517,12 +460,6 @@ implements DictionaryService ...@@ -517,12 +460,6 @@ implements DictionaryService
return builder.build(); return builder.build();
} }
private static final List<List<String>>
partitionByLength(Collection<String> col)
{
return partitionByLength(col.stream());
}
private static final List<List<String>> private static final List<List<String>>
partitionByLength(Stream<String> stream) partitionByLength(Stream<String> stream)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment