Package edu.ucla.sspace.hal

Examples of edu.ucla.sspace.hal.LinearWeighting


    protected SemanticSpace getSpace() {
        WeightingFunction weighting;
        if (argOptions.hasOption('W'))
            weighting = ReflectionUtil.getObjectInstance(argOptions.getStringOption('W'));
        else
            weighting = new LinearWeighting();
        int windowSize = argOptions.getIntOption('s', 5);
        double threshold = argOptions.getDoubleOption('h', -1d);
        int retain = argOptions.getIntOption('r', -1);

        return new HyperspaceAnalogueToLanguage(
View Full Code Here


        System.err.println("Loading basis mapping and extractor.");
        BasisMapping<String, String> basis =
            SerializableUtil.load(new File(args[2]));
        basis.setReadOnly(true);
        ContextGenerator generator =
            new WordOccrrenceContextGenerator(basis, new LinearWeighting(), 25);
        ContextExtractor extractor =
            new SemEvalContextExtractor(generator, 25);

        System.out.println("Processing contexts");
        CorpusReader<Document> reader = new SemEvalLexSubReader();
View Full Code Here

        // LinearWeighting.
        if (argOptions.hasOption('G'))
            weighting = ReflectionUtil.getObjectInstance(
                    argOptions.getStringOption('G'));
        else
            weighting = new LinearWeighting();

        // If the -L option is given, load the basis mapping from disk.
        if (argOptions.hasOption('L')) {
            basis = loadObject(openLoadFile());
            basis.setReadOnly(true);
View Full Code Here

                                 int bound,
                                 int windowSize) {
            cooccurrenceMatrix = new AtomicGrowingSparseHashMatrix();
            basis = new StringBasisMapping();
            wordScores = new BoundedSortedMap<String, Double>(bound);
            weighting = new LinearWeighting();

            this.transform = transform;
            this.windowSize = windowSize;
        }
View Full Code Here

TOP

Related Classes of edu.ucla.sspace.hal.LinearWeighting

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.