edu.cmu.minorthird.classify.sequential
Class DictVersion

java.lang.Object
  extended by edu.cmu.minorthird.classify.sequential.DictVersion
All Implemented Interfaces:
BatchSegmenterLearner

public class DictVersion
extends java.lang.Object
implements BatchSegmenterLearner

Extend a SegmenterLearner by including a dictionary. Distance to the closest dictionary entry will be used as an additional feature.

Author:
William Cohen

Constructor Summary
DictVersion(BatchSegmenterLearner innerLearner, java.io.File dictFile, java.lang.String distanceNames)
           
DictVersion(java.lang.String[] featurePattern, BatchSegmenterLearner innerLearner, java.io.File dictFile, java.lang.String distanceNames)
           
DictVersion(java.lang.String[] featurePattern, BatchSegmenterLearner innerLearner, com.wcohen.ss.lookup.SoftDictionary softDictionary, java.lang.String distanceNames)
           
 
Method Summary
 Segmenter batchTrain(SegmentDataset dataset)
           
static void main(java.lang.String[] args)
           
 void setSchema(ExampleSchema schema)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictVersion

public DictVersion(BatchSegmenterLearner innerLearner,
                   java.io.File dictFile,
                   java.lang.String distanceNames)
            throws java.io.IOException,
                   java.io.FileNotFoundException
Throws:
java.io.IOException
java.io.FileNotFoundException

DictVersion

public DictVersion(java.lang.String[] featurePattern,
                   BatchSegmenterLearner innerLearner,
                   java.io.File dictFile,
                   java.lang.String distanceNames)
            throws java.io.IOException,
                   java.io.FileNotFoundException
Throws:
java.io.IOException
java.io.FileNotFoundException

DictVersion

public DictVersion(java.lang.String[] featurePattern,
                   BatchSegmenterLearner innerLearner,
                   com.wcohen.ss.lookup.SoftDictionary softDictionary,
                   java.lang.String distanceNames)
Method Detail

setSchema

public void setSchema(ExampleSchema schema)
Specified by:
setSchema in interface BatchSegmenterLearner

batchTrain

public Segmenter batchTrain(SegmentDataset dataset)
Specified by:
batchTrain in interface BatchSegmenterLearner

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        java.io.FileNotFoundException
Throws:
java.io.IOException
java.io.FileNotFoundException