de.aitools.ir.fingerprinting.representer
Class PrefixClassFunction
java.lang.Object
de.aitools.ir.retrievalmodels.representer.AbstractRepresenter<java.lang.String,Vector>
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
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_PREFIX_CLASS_DIMENSION
public static final int DEFAULT_PREFIX_CLASS_DIMENSION
- See Also:
- Constant Field Values
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
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.