edu.mit.nlp.segmenter.dp
Class BayesWrapper

java.lang.Object
  extended by edu.mit.nlp.segmenter.dp.BayesWrapper
All Implemented Interfaces:
Segmenter

public class BayesWrapper
extends Object
implements Segmenter

Wraps the dynamic programming Bayesian segmenter DPSeg, so that it can be called by SegTester


Field Summary
 boolean debug
           
 double dispersion
           
 boolean em_params
           
 boolean is_windowing_enabled
           
protected  double[] learned_params
           
 boolean num_segs_known
           
 double prior
           
 boolean use_duration
           
 
Constructor Summary
BayesWrapper()
           
 
Method Summary
 double[] getParams()
           
 void initialize(String config_filename)
          Do whatever initialize you need from this config file
 List[] segmentTexts(MyTextWrapper[] texts, int[] num_segs)
          segment a bunch of texts.
 void setDebug(boolean debug)
          tells your d00d to set its debug flag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

is_windowing_enabled

public boolean is_windowing_enabled

dispersion

public double dispersion

prior

public double prior

debug

public boolean debug

num_segs_known

public boolean num_segs_known

em_params

public boolean em_params

use_duration

public boolean use_duration

learned_params

protected double[] learned_params
Constructor Detail

BayesWrapper

public BayesWrapper()
Method Detail

initialize

public void initialize(String config_filename)
Description copied from interface: Segmenter
Do whatever initialize you need from this config file

Specified by:
initialize in interface Segmenter
Parameters:
config_filename - the path to the config file

setDebug

public void setDebug(boolean debug)
Description copied from interface: Segmenter
tells your d00d to set its debug flag

Specified by:
setDebug in interface Segmenter

segmentTexts

public List[] segmentTexts(MyTextWrapper[] texts,
                           int[] num_segs)
Description copied from interface: Segmenter
segment a bunch of texts. we do this jointly in case you want to do processing across the whole set of texts together

Specified by:
segmentTexts in interface Segmenter
Parameters:
texts - the array of texts
num_segs - the number of segments per text
Returns:
a list of arrays of segmentation points

getParams

public double[] getParams()


Copyright © 2008 MIT. All Rights Reserved.