All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.ucla.sspace.dependency.DependencyPermutationFunction Maven / Gradle / Ivy

Go to download

The S-Space Package is a collection of algorithms for building Semantic Spaces as well as a highly-scalable library for designing new distributional semantics algorithms. Distributional algorithms process text corpora and represent the semantic for words as high dimensional feature vectors. This package also includes matrices, vectors, and numerous clustering algorithms. These approaches are known by many names, such as word spaces, semantic spaces, or distributed semantics and rest upon the Distributional Hypothesis: words that appear in similar contexts have similar meanings.

The newest version!
package edu.ucla.sspace.dependency;

import edu.ucla.sspace.vector.Vector;

import java.util.LinkedList;


/**
 * An interface for permuting a {@link Vector} based on a dependecny path,
 * represented as a list of {@link DependencyRelation}s.  Implemenations are
 * recomended to extend existing {@link
 * edu.ucla.sspace.index.PermutationFunction PermutationFunction}s but simply
 * using an existing {@link edu.ucla.sspace.index.PermutationFunction
 * PermutationFunction}.  Implementations are also suggested to be thread-safe.
 *
 * @see edu.ucla.sspace.index.PermutationFunction
 *
 * @author Keith Stevens
 */
public interface DependencyPermutationFunction  {

    /**
     * Returns a permuted form of {code vector} based on the dependency path
     * provided.
     *
     * @param path A linked list of word,relation pairs that compose a
     *        dependency path
     * @param vector The {@link Vector} to permute
     *
     * @return A new permuted {@link Vector} of the same type as {@code vector}
     *         that is
     */
    T permute(T vector, DependencyPath path);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy