Package org.eobjects.analyzer.result

Examples of org.eobjects.analyzer.result.SimilarityResult


      SimilarityGroup similarityGroup = it.next();
      if (similarityGroup.getValueCount() == 1) {
        it.remove();
      }
    }
    return new SimilarityResult(_similarityGroups);
  }
View Full Code Here


    analyzer.run(new MockInputRow().put(col, "hellow"), 1);

    // something without similarities
    analyzer.run(new MockInputRow().put(col, "wowsers"), 1);

    SimilarityResult result = analyzer.getResult();

    assertEquals(3, result.getSimilarValues("kasper").size());
    assertEquals("[gasper, kaspar, qasper]", result.getSimilarValues("kasper").toString());
    assertEquals(3, result.getSimilarValues("gasper").size());
    assertEquals(3, result.getSimilarValues("qasper").size());
    assertEquals(3, result.getSimilarValues("kaspar").size());

    assertEquals("[hallo, hellow]", result.getSimilarValues("hello").toString());
    assertEquals(2, result.getSimilarValues("hallo").size());
    assertEquals(2, result.getSimilarValues("hellow").size());
    assertEquals(0, result.getSimilarValues("wowsers").size());

    assertEquals(2, result.getSimilarityGroups().size());
  }
View Full Code Here

    // 4 similar sounding kasper's
    analyzer.run(new MockInputRow().put(col, "Lekker"), 1);
    analyzer.run(new MockInputRow().put(col, "Lækker"), 1);
    analyzer.run(new MockInputRow().put(col, "Läkker"), 1);

    SimilarityResult result = analyzer.getResult();
    assertEquals(1, result.getSimilarityGroups().size());
  }
View Full Code Here

TOP

Related Classes of org.eobjects.analyzer.result.SimilarityResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.