Examples of HultigSumoComparator


Examples of dkpro.similarity.algorithms.lexical.string.HultigSumoComparator

        String text2 = "This is a second different test .";

        List<String> tokens1 = Arrays.asList(text1.split(" "));
        List<String> tokens2 = Arrays.asList(text2.split(" "));
       
        TextSimilarityMeasure measure = new HultigSumoComparator();
        assertEquals(1.0, measure.getSimilarity(tokens1, tokens1), 0.000001);
        assertEquals(0.75729, measure.getSimilarity(tokens1, tokens2), 0.00001);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.