struct.sequence
Class HandWritDataManager

java.lang.Object
  extended by struct.sequence.HandWritDataManager
All Implemented Interfaces:
DataManager

public class HandWritDataManager
extends java.lang.Object
implements DataManager

Hand written DataManager.

Version:
08/15/2006

Field Summary
private  edu.umass.cs.mallet.base.types.Alphabet dataAlphabet
           
private  int degree
           
private static java.util.logging.Logger logger
           
private  double node_val
           
private  edu.umass.cs.mallet.base.types.Alphabet tagAlphabet
           
private  double tran_val
           
 
Constructor Summary
HandWritDataManager(int degree)
           
 
Method Summary
 void closeAlphabets()
          Stops alphabets' growths.
 void createAlphabets()
          Creates the tag and the data alphabets.
 void createAlphabets(java.lang.String file)
          Creates alphabets by reading from the file according to this data manager.
private  SLFeatureVector createFeatureVector(java.util.LinkedList[] predicates, java.lang.String[] tags, SLFeatureVector fv)
           
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)
           
private  void createForest(SequenceInstance inst, java.util.LinkedList[] predicates, java.io.ObjectOutputStream out)
           
private  void createTagAlphabet()
           
 edu.umass.cs.mallet.base.types.Alphabet getDataAlphabet()
          Returns data alphabet.
 java.util.LinkedList[] getPredicates(java.lang.String[] toks)
           
 edu.umass.cs.mallet.base.types.Alphabet getTagAlphabet()
           
 java.lang.String normalize(java.lang.String s)
           
 SequenceInstance[] readData(java.lang.String file)
          Creates instances by reading from the file according to this data manager.
 SequenceInstance[] readData(java.lang.String file, boolean createFeatureFile)
           
 
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

dataAlphabet

private edu.umass.cs.mallet.base.types.Alphabet dataAlphabet

tagAlphabet

private edu.umass.cs.mallet.base.types.Alphabet tagAlphabet

degree

private int degree

tran_val

private double tran_val

node_val

private double node_val
Constructor Detail

HandWritDataManager

public HandWritDataManager(int degree)
Method Detail

getDataAlphabet

public edu.umass.cs.mallet.base.types.Alphabet getDataAlphabet()
Description copied from interface: DataManager
Returns data alphabet.

Specified by:
getDataAlphabet in interface DataManager

getTagAlphabet

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

readData

public SequenceInstance[] readData(java.lang.String file)
                            throws java.io.IOException
Description copied from interface: DataManager
Creates instances by reading from the file according to this data manager.

Specified by:
readData in interface DataManager
Throws:
java.io.IOException

readData

public SequenceInstance[] readData(java.lang.String file,
                                   boolean createFeatureFile)
                            throws java.io.IOException
Throws:
java.io.IOException

createAlphabets

public void createAlphabets(java.lang.String file)
                     throws java.io.IOException
Description copied from interface: DataManager
Creates alphabets by reading from the file according to this data manager.

Specified by:
createAlphabets in interface DataManager
Throws:
java.io.IOException

createAlphabets

public void createAlphabets()
Creates the tag and the data alphabets.


createTagAlphabet

private void createTagAlphabet()

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)

createFeatureVector

private SLFeatureVector createFeatureVector(java.util.LinkedList[] predicates,
                                            java.lang.String[] tags,
                                            SLFeatureVector fv)

getPredicates

public java.util.LinkedList[] getPredicates(java.lang.String[] toks)

closeAlphabets

public void closeAlphabets()
Stops alphabets' growths.

Specified by:
closeAlphabets in interface DataManager

createForest

private void createForest(SequenceInstance inst,
                          java.util.LinkedList[] predicates,
                          java.io.ObjectOutputStream out)

normalize

public java.lang.String normalize(java.lang.String s)


Copyright (C) 2006 University of Pennsylvania.