iitb.CRF
Class CRF

java.lang.Object
  extended byiitb.CRF.CRF
Direct Known Subclasses:
NestedCRF

public class CRF
extends java.lang.Object

CRF (conditional random fields) This class provides support for training and applying a conditional random field for sequence labeling problems.

Author:
Sunita Sarawagi

Field Summary
 CrfParams params
           
 
Constructor Summary
CRF(int numLabels, FeatureGenerator fgen, java.util.Properties configOptions)
           
CRF(int numLabels, FeatureGenerator fgen, java.lang.String arg)
           
 
Method Summary
 void apply(DataSequence dataSeq)
           
 void read(java.lang.String fileName)
          read the parameters of the CRF from a file
 void train(DataIter trainData)
           
 void write(java.lang.String fileName)
          write the trained parameters of the CRF to the file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

params

public CrfParams params
Constructor Detail

CRF

public CRF(int numLabels,
           FeatureGenerator fgen,
           java.lang.String arg)
Parameters:
numLabels - is the number of distinct class labels or y-labels
fgen - is the class that is responsible for providing the features for a particular position on the sequence.
arg - is a string that can be used to control various parameters of the CRF, these are space separated name-value pairs described in
See Also:
CrfParams

CRF

public CRF(int numLabels,
           FeatureGenerator fgen,
           java.util.Properties configOptions)
Method Detail

write

public void write(java.lang.String fileName)
           throws java.io.IOException
write the trained parameters of the CRF to the file

Throws:
java.io.IOException

read

public void read(java.lang.String fileName)
          throws java.io.IOException
read the parameters of the CRF from a file

Throws:
java.io.IOException

train

public void train(DataIter trainData)

apply

public void apply(DataSequence dataSeq)


Submit a bug or feature.