tml.vectorspace
Class SemanticSpace

java.lang.Object
  extended by tml.vectorspace.SemanticSpace
All Implemented Interfaces:
java.lang.Cloneable

public class SemanticSpace
extends java.lang.Object
implements java.lang.Cloneable

This class is a Vector Space Model representation of a group of documents or Corpus constructed using Latent Semantic Indexing, it contains a term by document matrix for the Corpus.

Some of the LSI steps are performed by this class:

Several Operations can be performed on a SemanticSpace. Each one contains a list of results, that can be read from the operation in Object[][], HTML and Graphic format for human consumption.

Author:
Jorge Villalon

Constructor Summary
SemanticSpace(Corpus sourceCorpus)
          Creates a new SemanticSpace from a Corpus.
 
Method Summary
 void calculate()
          Calculates the term by doc matrix for the SemanticSpace based on the documents in the Corpus.
 java.lang.Object clone()
           
 Corpus getCorpus()
           
 int getDimensionsKept()
           
 java.lang.String getName()
          Gets the name of the SemanticSpace
 long getProcessingTime()
          The time that the SemanticSpace took to calculate its basic operations
 Jama.Matrix getSk()
           
 Jama.Matrix getTermsDocuments()
           
 long getTimeToCalculate()
           
 Jama.Matrix getUk()
           
 Jama.Matrix getVk()
           
 boolean isCalculated()
           
 void setCorpus(Corpus corpus)
           
 void setVk(Jama.Matrix vk)
           
 java.lang.String toString()
          Overrides the default toString method and replaces it with the SemanticSpace name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SemanticSpace

public SemanticSpace(Corpus sourceCorpus)
Creates a new SemanticSpace from a Corpus.

Parameters:
sourceCorpus - the Corpus for the SemanticSpace
Method Detail

isCalculated

public boolean isCalculated()

calculate

public void calculate()
               throws NotEnoughTermsInCorpusException
Calculates the term by doc matrix for the SemanticSpace based on the documents in the Corpus.

Throws:
NotEnoughTermsInCorpusException
TermWeightingException
NormalizationException

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

getCorpus

public Corpus getCorpus()
Returns:
the Corpus that a SemanticSpace uses

getDimensionsKept

public int getDimensionsKept()
Returns:
the number of dimensions that the space kept

getName

public java.lang.String getName()
Gets the name of the SemanticSpace

Returns:
a String with the name

getProcessingTime

public long getProcessingTime()
The time that the SemanticSpace took to calculate its basic operations

Returns:
time in milliseconds

getSk

public Jama.Matrix getSk()
Returns:
the sk

getTermsDocuments

public Jama.Matrix getTermsDocuments()
Returns:
The Ak reduced term-documents matrix.

getTimeToCalculate

public long getTimeToCalculate()
Returns:
the time taken to calculate the semantic space

getUk

public Jama.Matrix getUk()
Returns:
the uk

getVk

public Jama.Matrix getVk()
Returns:
the vk

setCorpus

public void setCorpus(Corpus corpus)

setVk

public void setVk(Jama.Matrix vk)
Parameters:
vk - the vk to set

toString

public java.lang.String toString()
Overrides the default toString method and replaces it with the SemanticSpace name

Overrides:
toString in class java.lang.Object