diff --git a/nb-configuration.xml b/nb-configuration.xml index 63ebc4a..88c05d0 100644 --- a/nb-configuration.xml +++ b/nb-configuration.xml @@ -1,18 +1,19 @@ - - apache20 + diff --git a/pom.xml b/pom.xml index 55e6d5a..6e4f87f 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 certh.iti.mklab jSimilarity - 1.0-SNAPSHOT + 0.1 jar UTF-8 @@ -16,6 +16,11 @@ commons-lang3 3.4 + + org.apache.commons + commons-collections4 + 4.1 + jSimilarity \ No newline at end of file diff --git a/src/main/java/certh/iti/mklab/jSimilarity/Main.java b/src/main/java/certh/iti/mklab/jSimilarity/Main.java index 811ba7d..4de8507 100644 --- a/src/main/java/certh/iti/mklab/jSimilarity/Main.java +++ b/src/main/java/certh/iti/mklab/jSimilarity/Main.java @@ -17,8 +17,8 @@ import certh.iti.mklab.jSimilarity.documentUtils.Corpus; import certh.iti.mklab.jSimilarity.documentUtils.TextDocument; -import certh.iti.mklab.jsimilarity.tfidf.SoftTFIDF; -import certh.iti.mklab.jsimilarity.tfidf.TFIDF; +import certh.iti.mklab.jSimilarity.tfidf.SoftTFIDF; +import certh.iti.mklab.jSimilarity.tfidf.TFIDF; /** * @@ -27,16 +27,15 @@ public class Main { public static void main(String[] args) { - - TextDocument document1 = new TextDocument("Bank of China"); - TextDocument document2 = new TextDocument("Bank of China Limited"); - TextDocument document3 = new TextDocument("Adidas AG"); - TextDocument document4 = new TextDocument("Adidas Group"); - TextDocument document5 = new TextDocument("Adidas"); - TextDocument document6 = new TextDocument("BMW Group"); - TextDocument document7 = new TextDocument("Nike Inc"); - TextDocument document8 = new TextDocument("PetroChina Company Limited"); - TextDocument document9 = new TextDocument("PetroChina Comany"); + TextDocument document1 = new TextDocument.Builder("Bank of China").build(); + TextDocument document2 = new TextDocument.Builder("Bank of China Limited").build(); + TextDocument document3 = new TextDocument.Builder("Adidas AG").build(); + TextDocument document4 = new TextDocument.Builder("Adidas Group").build(); + TextDocument document5 = new TextDocument.Builder("Adidas").build(); + TextDocument document6 = new TextDocument.Builder("BMW Group").build(); + TextDocument document7 = new TextDocument.Builder("Nike Inc").build(); + TextDocument document8 = new TextDocument.Builder("PetroChina Company Limited").build(); + TextDocument document9 = new TextDocument.Builder("PetroChina Comany").build(); Corpus corpus = new Corpus(); corpus.addDocument(document1);