Package ch.akuhn.hapax.corpus

Examples of ch.akuhn.hapax.corpus.Corpus


public class LogLikelihoodExample {

    public static void main(String... args) {
       
        Corpus c1 = new CorpusBuilderHelper(new SimpleCorpus()).importAllFiles(new File("../Fame"), ".java");
        Corpus c2 = new CorpusBuilderHelper(new SimpleCorpus()).importAllFiles(new File("../CELLS"), ".java");
       
        System.out.println(c1);
        System.out.println(c2);
       
        SortedSet<LogLikelihood> list = new TreeSet<LogLikelihood>();
        for (String each: (union(c1.terms(), c2.terms())).elements()) {
            list.add(new LogLikelihood(c1.terms(), c2.terms(), each));
        }
       
        Out.puts(list);
       
    }
View Full Code Here

TOP

Related Classes of ch.akuhn.hapax.corpus.Corpus

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.