diff --git a/README.md b/README.md index b803f45..11e328a 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ A library implementing different string similarity and distance measures. A doze ## Download + Using maven: + ``` info.debatty @@ -40,6 +42,8 @@ Using maven: Or check the [releases](https://github.com/tdebatty/java-string-similarity/releases). +This library requires Java 8 or more recent. + ## Overview The main characteristics of each implemented algorithm are presented below. The "cost" column gives an estimation of the computational cost to compute the similarity between two strings of length m and n respectively. diff --git a/pom.xml b/pom.xml index 58319b2..3f28866 100644 --- a/pom.xml +++ b/pom.xml @@ -82,6 +82,9 @@ org.apache.maven.plugins maven-javadoc-plugin 2.10.4 + + 8 + attach-javadocs @@ -112,8 +115,8 @@ maven-compiler-plugin 3.6.1 - 6 - 1.6 + 8 + 8 diff --git a/src/main/java/info/debatty/java/stringsimilarity/Cosine.java b/src/main/java/info/debatty/java/stringsimilarity/Cosine.java index bbdb440..9a7ba0f 100644 --- a/src/main/java/info/debatty/java/stringsimilarity/Cosine.java +++ b/src/main/java/info/debatty/java/stringsimilarity/Cosine.java @@ -70,6 +70,7 @@ public Cosine() { * @return The cosine similarity in the range [0, 1] * @throws NullPointerException if s1 or s2 is null. */ + @Override public final double similarity(final String s1, final String s2) { if (s1 == null) { throw new NullPointerException("s1 must not be null"); @@ -142,12 +143,14 @@ private static double dotProduct( * @return 1.0 - the cosine similarity in the range [0, 1] * @throws NullPointerException if s1 or s2 is null. */ + @Override public final double distance(final String s1, final String s2) { return 1.0 - similarity(s1, s2); } /** - * {@inheritDoc} + * Compute similarity between precomputed profiles. + * * @param profile1 * @param profile2 * @return diff --git a/src/main/java/info/debatty/java/stringsimilarity/RatcliffObershelp.java b/src/main/java/info/debatty/java/stringsimilarity/RatcliffObershelp.java index f535d10..22e4ea3 100644 --- a/src/main/java/info/debatty/java/stringsimilarity/RatcliffObershelp.java +++ b/src/main/java/info/debatty/java/stringsimilarity/RatcliffObershelp.java @@ -27,7 +27,6 @@ import info.debatty.java.stringsimilarity.interfaces.NormalizedStringDistance; import java.util.List; import java.util.ArrayList; -import java.util.Iterator; import net.jcip.annotations.Immutable;