struct.classification
Class ClassificationInstance

java.lang.Object
  extended by struct.classification.ClassificationInstance
All Implemented Interfaces:
SLInstance

public class ClassificationInstance
extends java.lang.Object
implements SLInstance

Internal representation of a Mallet Instance for the classification.

Version:
08/18/2006

Field Summary
private static edu.umass.cs.mallet.base.types.Alphabet dataAlphabet
           
private  edu.umass.cs.mallet.base.types.FeatureVector featureVector
           
private  ClassificationLabel label
           
private static edu.umass.cs.mallet.base.types.LabelAlphabet tagAlphabet
           
 
Constructor Summary
protected ClassificationInstance(java.lang.String tag, edu.umass.cs.mallet.base.types.FeatureVector featureVector)
           
 
Method Summary
private  SLFeatureVector createFeatureVector(edu.umass.cs.mallet.base.types.FeatureVector featureVector, java.lang.String next, SLFeatureVector fv)
           
protected static edu.umass.cs.mallet.base.types.Alphabet getDataAlphabet()
           
 Features getFeatures()
          Returns the features.
 SLLabel getLabel()
          Returns the target label.
protected static edu.umass.cs.mallet.base.types.Alphabet getTagAlphabet()
           
protected static void setDataAlphabet(edu.umass.cs.mallet.base.types.Alphabet dataAlphabet1)
           
protected static void setTagAlphabet(edu.umass.cs.mallet.base.types.LabelAlphabet tagAlphabet1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

featureVector

private edu.umass.cs.mallet.base.types.FeatureVector featureVector

label

private ClassificationLabel label

tagAlphabet

private static edu.umass.cs.mallet.base.types.LabelAlphabet tagAlphabet

dataAlphabet

private static edu.umass.cs.mallet.base.types.Alphabet dataAlphabet
Constructor Detail

ClassificationInstance

protected ClassificationInstance(java.lang.String tag,
                                 edu.umass.cs.mallet.base.types.FeatureVector featureVector)
Parameters:
tag - - The target label for this instance.
featureVector - - The Mallet FeatureVector of this instance.
Method Detail

getLabel

public SLLabel getLabel()
Description copied from interface: SLInstance
Returns the target label.

Specified by:
getLabel in interface SLInstance

getFeatures

public Features getFeatures()
Description copied from interface: SLInstance
Returns the features.

Specified by:
getFeatures in interface SLInstance

createFeatureVector

private SLFeatureVector createFeatureVector(edu.umass.cs.mallet.base.types.FeatureVector featureVector,
                                            java.lang.String next,
                                            SLFeatureVector fv)

setTagAlphabet

protected static void setTagAlphabet(edu.umass.cs.mallet.base.types.LabelAlphabet tagAlphabet1)

getTagAlphabet

protected static edu.umass.cs.mallet.base.types.Alphabet getTagAlphabet()

setDataAlphabet

protected static void setDataAlphabet(edu.umass.cs.mallet.base.types.Alphabet dataAlphabet1)

getDataAlphabet

protected static edu.umass.cs.mallet.base.types.Alphabet getDataAlphabet()


Copyright (C) 2006 University of Pennsylvania.