de.aitools.ir.fingerprinting.representer
Class PrefixClassFunction

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

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

Version:
aitools 3.0
Author:
martin.trenkmann@uni-weimar.de
See Also:
Serialized Form

Field Summary
static int DEFAULT_PREFIX_CLASS_DIMENSION
           
 
Constructor Summary
PrefixClassFunction(java.util.Locale locale)
           
PrefixClassFunction(java.util.Locale locale, int dimension, boolean filterStopwords)
           
 
Method Summary
 java.util.Locale getLocale()
           
 boolean isTrained()
           
 Vector represent(java.lang.String document)
          Returns the dimensional reduced deviation vector of the document's prefix classes.
 void train(java.lang.Iterable<java.lang.String> documents, 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
 

Field Detail

DEFAULT_PREFIX_CLASS_DIMENSION

public static final int DEFAULT_PREFIX_CLASS_DIMENSION
See Also:
Constant Field Values
Constructor Detail

PrefixClassFunction

public PrefixClassFunction(java.util.Locale locale)
                    throws java.lang.Exception
Throws:
java.lang.Exception

PrefixClassFunction

public PrefixClassFunction(java.util.Locale locale,
                           int dimension,
                           boolean filterStopwords)
                    throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getLocale

public java.util.Locale getLocale()

isTrained

public boolean isTrained()

train

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

represent

public Vector represent(java.lang.String document)
Returns the dimensional reduced deviation vector of the document's prefix classes. The returned vector is normalized, which means that all vector elements are defined in the range of [0,1] and that their sum is 1.