de.aitools.ir.retrievalmodels.representer
Class LatentSemanticIndexing

java.lang.Object
  extended by de.aitools.ir.retrievalmodels.representer.AbstractRepresenter<java.lang.String,Vector>
      extended by de.aitools.ir.retrievalmodels.representer.LatentSemanticIndexing
All Implemented Interfaces:
Representer<java.lang.String,Vector>, java.io.Serializable

public class LatentSemanticIndexing
extends AbstractRepresenter<java.lang.String,Vector>

Latent Semantic Indexing

 References:
 
 Indexing by Latent Semantic Analysis , by Deerwester et al., 1990.
 

Version:
aitools 3.0 Created on Apr 21, 2010 $Id: LSI.java,v 1.1 2010/04/21 16:24:29 hoppe Exp $
Author:
dennis.hoppe@uni-weimar.de
See Also:
Serialized Form

Nested Class Summary
 class LatentSemanticIndexing.DynamicReductionStrategyImpl
          Reduces the dimension of the matrix depending on the number of training documents.
 class LatentSemanticIndexing.FixedReductionStrategyImpl
          Reduces the matrix to the given rank.
 class LatentSemanticIndexing.QualityReductionStrategyImpl
          Reduces the matrix dynamically to the lowest rank that satisfies the given quality.
 
Constructor Summary
LatentSemanticIndexing(java.util.Locale locale)
           
LatentSemanticIndexing(java.util.Locale locale, double quality)
           
LatentSemanticIndexing(java.util.Locale locale, int desiredDimension)
           
LatentSemanticIndexing(Representer<java.lang.String,Vector> representer)
           
 
Method Summary
 Jama.Matrix getD_k()
           
 Jama.Matrix getD()
           
 int getRank()
           
 Representer<java.lang.String,Vector> getRepresenter()
           
 Jama.Matrix getS_k()
           
 Jama.Matrix getS()
           
 Jama.SingularValueDecomposition getSvd()
           
 Jama.Matrix getT_k()
           
 Jama.Matrix getT()
           
 int getVocabularySize()
           
 boolean isReduced()
           
 boolean isTrained()
           
 Vector represent(java.lang.String text)
           
 void setStrategy(de.aitools.ir.retrievalmodels.representer.LatentSemanticIndexing.IReductionStrategy strategy)
           
 void train(java.lang.Iterable<java.lang.String> texts, boolean forceTraining)
           
 
Methods inherited from class de.aitools.ir.retrievalmodels.representer.AbstractRepresenter
train
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LatentSemanticIndexing

public LatentSemanticIndexing(java.util.Locale locale)
Parameters:
locale -

LatentSemanticIndexing

public LatentSemanticIndexing(java.util.Locale locale,
                              int desiredDimension)
Parameters:
locale - language information used by the internal Representer
desiredDimension - specifies the new rank of the LSI matrix. If desiredDimension is greater than the actual rank of the matrix, the matrix remains unchanged.

LatentSemanticIndexing

public LatentSemanticIndexing(java.util.Locale locale,
                              double quality)
Parameters:
locale - language information used for stemming et cetera
quality - specifies the quality by which the original matrix will be approximated.

LatentSemanticIndexing

public LatentSemanticIndexing(Representer<java.lang.String,Vector> representer)
Parameters:
representer -
strategy -
Method Detail

setStrategy

public void setStrategy(de.aitools.ir.retrievalmodels.representer.LatentSemanticIndexing.IReductionStrategy strategy)
Parameters:
strategy -

represent

public Vector represent(java.lang.String text)

train

public void train(java.lang.Iterable<java.lang.String> texts,
                  boolean forceTraining)

isTrained

public final boolean isTrained()
Returns:
the isTrained

isReduced

public boolean isReduced()
Returns:

getSvd

public final Jama.SingularValueDecomposition getSvd()
Returns:
the svd

getT

public final Jama.Matrix getT()
Returns:
the t

getT_k

public final Jama.Matrix getT_k()
Returns:
the t_k

getS

public final Jama.Matrix getS()
Returns:
the s

getS_k

public final Jama.Matrix getS_k()
Returns:
the s_k

getD

public final Jama.Matrix getD()
Returns:
the d

getD_k

public final Jama.Matrix getD_k()
Returns:
the d_k

getRank

public final int getRank()
Returns:

getVocabularySize

public final int getVocabularySize()
Returns:

getRepresenter

public Representer<java.lang.String,Vector> getRepresenter()
Returns: