struct.sequence
Class SequenceInstance

java.lang.Object
  extended by struct.sequence.SequenceInstance
All Implemented Interfaces:
SLInstance
Direct Known Subclasses:
HandWritInstance

public class SequenceInstance
extends java.lang.Object
implements SLInstance

A sequence instance.

Version:
07/15/2006

Field Summary
protected static edu.umass.cs.mallet.base.types.Alphabet dataAlphabet
           
protected  SequenceInput input
           
protected  SequenceLabel label
           
private static java.util.logging.Logger logger
           
protected  java.util.LinkedList[] predicates
           
protected static edu.umass.cs.mallet.base.types.Alphabet tagAlphabet
           
 
Constructor Summary
SequenceInstance()
           
SequenceInstance(java.lang.String[] sentence, java.lang.String[] tags, SLFeatureVector fv, java.util.LinkedList[] predicates)
           
SequenceInstance(java.lang.String[] sentence, java.lang.String[] pos, java.lang.String[] tags, SLFeatureVector fv, java.util.LinkedList[] predicates)
           
 
Method Summary
private  SLFeatureVector createFeatureVector(java.util.LinkedList predicates, java.lang.String next, SLFeatureVector fv)
           
private  SLFeatureVector createFeatureVector(java.util.LinkedList predicates, java.lang.String prev, java.lang.String next, SLFeatureVector fv)
           
static edu.umass.cs.mallet.base.types.Alphabet getDataAlphabet()
           
 SequenceFeatures getFeatures()
          Returns the features.
 SequenceFeatures getFeatures(java.io.ObjectInputStream in)
           
 SequenceInput getInput()
           
 SequenceLabel getLabel()
          Returns the target label.
static edu.umass.cs.mallet.base.types.Alphabet getTagAlphabet()
           
static void setDataAlphabet(edu.umass.cs.mallet.base.types.Alphabet dataAlphabet1)
           
static void setTagAlphabet(edu.umass.cs.mallet.base.types.Alphabet tagAlphabet1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static java.util.logging.Logger logger

predicates

protected java.util.LinkedList[] predicates

input

protected SequenceInput input

label

protected SequenceLabel label

tagAlphabet

protected static edu.umass.cs.mallet.base.types.Alphabet tagAlphabet

dataAlphabet

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

SequenceInstance

public SequenceInstance()

SequenceInstance

public SequenceInstance(java.lang.String[] sentence,
                        java.lang.String[] pos,
                        java.lang.String[] tags,
                        SLFeatureVector fv,
                        java.util.LinkedList[] predicates)

SequenceInstance

public SequenceInstance(java.lang.String[] sentence,
                        java.lang.String[] tags,
                        SLFeatureVector fv,
                        java.util.LinkedList[] predicates)
Method Detail

getInput

public SequenceInput getInput()

getLabel

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

Specified by:
getLabel in interface SLInstance

getFeatures

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

Specified by:
getFeatures in interface SLInstance

createFeatureVector

private SLFeatureVector createFeatureVector(java.util.LinkedList predicates,
                                            java.lang.String prev,
                                            java.lang.String next,
                                            SLFeatureVector fv)

createFeatureVector

private SLFeatureVector createFeatureVector(java.util.LinkedList predicates,
                                            java.lang.String next,
                                            SLFeatureVector fv)

getFeatures

public SequenceFeatures getFeatures(java.io.ObjectInputStream in)
                             throws java.io.IOException
Throws:
java.io.IOException

setTagAlphabet

public static void setTagAlphabet(edu.umass.cs.mallet.base.types.Alphabet tagAlphabet1)

getTagAlphabet

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

setDataAlphabet

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

getDataAlphabet

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


Copyright (C) 2006 University of Pennsylvania.