gov.sandia.cognition.text.term.vector.weighter.local
Class AbstractLocalTermWeighter

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.math.matrix.DefaultVectorFactoryContainer
          extended by gov.sandia.cognition.text.term.vector.weighter.local.AbstractLocalTermWeighter
All Implemented Interfaces:
VectorFactoryContainer, LocalTermWeighter, CloneableSerializable, Serializable, Cloneable
Direct Known Subclasses:
BinaryLocalTermWeighter, LogLocalTermWeighter, TermFrequencyLocalTermWeighter

public abstract class AbstractLocalTermWeighter
extends DefaultVectorFactoryContainer
implements LocalTermWeighter

Abstract implementation of the LocalTermWeighter interface. Defaults to a sparse vector factory.

Since:
3.0
Author:
Justin Basilico
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.math.matrix.DefaultVectorFactoryContainer
vectorFactory
 
Constructor Summary
AbstractLocalTermWeighter()
          Creates a new AbstractLocalTermWeighter.
AbstractLocalTermWeighter(VectorFactory<? extends Vector> vectorFactory)
          Creates a new AbstractLocalTermWeighter.
 
Method Summary
 Vector computeLocalWeights(Vectorizable document)
          Computes the new local weights for a given document.
 
Methods inherited from class gov.sandia.cognition.math.matrix.DefaultVectorFactoryContainer
getVectorFactory, setVectorFactory
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.text.term.vector.weighter.local.LocalTermWeighter
computeLocalWeights
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

AbstractLocalTermWeighter

public AbstractLocalTermWeighter()
Creates a new AbstractLocalTermWeighter.


AbstractLocalTermWeighter

public AbstractLocalTermWeighter(VectorFactory<? extends Vector> vectorFactory)
Creates a new AbstractLocalTermWeighter.

Parameters:
vectorFactory - The vector factory to use.
Method Detail

computeLocalWeights

public Vector computeLocalWeights(Vectorizable document)
Description copied from interface: LocalTermWeighter
Computes the new local weights for a given document.

Specified by:
computeLocalWeights in interface LocalTermWeighter
Parameters:
document - The document to compute local weights for.
Returns:
The local weight vector for the documents.