Closed mpkorstanje closed 9 years ago
The current builder is a bit verbose:
StringMetric metric = new StringMetricBuilder() .with(new CosineSimilarity<String>()) .simplify(new CaseSimplifier.Lower()) .tokenize(new QGramTokenizer(2)) .build();
Could be much shorter by using import static org.simmetrics.StringMetricBuilder.with;
import static org.simmetrics.StringMetricBuilder.with;
StringMetric metric = with(new CosineSimilarity<String>()) .simplify(new CaseSimplifier.Lower()) .tokenize(new QGramTokenizer(2)) .build();
Done.
The current builder is a bit verbose:
Could be much shorter by using
import static org.simmetrics.StringMetricBuilder.with;