Package ch.akuhn.hapax

Examples of ch.akuhn.hapax.CorpusBuilder


    @Override
    protected LatentSemanticIndex computeValue(ProgressMonitor monitor, Arguments args) {
        Collection<String> elements = args.nextOrFail();
        monitor.begin(elements.size());
        CorpusBuilder builder = Hapax.newCorpus()
            .ignoreCase()
            .useCamelCaseScanner()
            .rejectRareTerms()
            .rejectStopwords()
            .latentDimensions(25)
            .useTFIDF();
        for (String path: elements) {
            parseElement(builder, path);
            monitor.worked(1);
        }
        return builder.makeTDM().createIndex();
    }
View Full Code Here

TOP

Related Classes of ch.akuhn.hapax.CorpusBuilder

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.