gov.sandia.cognition.text.term.vector
Class AbstractVectorSpaceModel

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.text.term.vector.AbstractVectorSpaceModel
All Implemented Interfaces:
VectorSpaceModel, CloneableSerializable, Serializable, Cloneable
Direct Known Subclasses:
AbstractGlobalTermWeighter

public abstract class AbstractVectorSpaceModel
extends AbstractCloneableSerializable
implements VectorSpaceModel

An abstract implementation of the VectorSpaceModel class. It handles the conversion of Vectorizable objects to Vector objects.

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

Constructor Summary
AbstractVectorSpaceModel()
          Creates a new AbstractVectorSpaceModel.
 
Method Summary
 void add(Vectorizable document)
          Adds a document to the model.
 void addAll(Iterable<? extends Vectorizable> documents)
          Adds all of the given documents to the model.
 boolean remove(Vectorizable document)
          Removes the document from the model.
 boolean removeAll(Iterable<? extends Vectorizable> documents)
          Removes all of the given documents from the model.
 
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.VectorSpaceModel
add, getDocumentCount, remove
 

Constructor Detail

AbstractVectorSpaceModel

public AbstractVectorSpaceModel()
Creates a new AbstractVectorSpaceModel.

Method Detail

add

public void add(Vectorizable document)
Description copied from interface: VectorSpaceModel
Adds a document to the model.

Specified by:
add in interface VectorSpaceModel
Parameters:
document - Adds a document to the model.

addAll

public void addAll(Iterable<? extends Vectorizable> documents)
Description copied from interface: VectorSpaceModel
Adds all of the given documents to the model.

Specified by:
addAll in interface VectorSpaceModel
Parameters:
documents - The documents to add.

remove

public boolean remove(Vectorizable document)
Description copied from interface: VectorSpaceModel
Removes the document from the model.

Specified by:
remove in interface VectorSpaceModel
Parameters:
document - The document to remove.
Returns:
True if this object changed as a result of the removal.

removeAll

public boolean removeAll(Iterable<? extends Vectorizable> documents)
Description copied from interface: VectorSpaceModel
Removes all of the given documents from the model.

Specified by:
removeAll in interface VectorSpaceModel
Parameters:
documents - The documents to remove.
Returns:
True if this object changed as a result of the removal.