edu.cmu.minorthird.ui
Class CommandLineUtil

java.lang.Object
  extended by edu.cmu.minorthird.ui.CommandLineUtil

public class CommandLineUtil
extends java.lang.Object

Minorthird-specific utilities for command line based interface routines.

Author:
William Cohen

Nested Class Summary
static class CommandLineUtil.AnnotatorOutputParams
           
static class CommandLineUtil.BaseParams
          Basic parameters used by almost everything.
static class CommandLineUtil.ClassificationSignalParams
          Parameters encoding the 'training signal' for classification learning.
static class CommandLineUtil.EditParams
          Parameters used by all 'train' routines.
static class CommandLineUtil.ExtractionSignalParams
          Parameters encoding the 'training signal' for extraction learning.
static class CommandLineUtil.GUIParams
          Basic parameters used by everything with a gui.
static class CommandLineUtil.LoadAnnotatorParams
          Parameters for testing a stored classifier.
static class CommandLineUtil.MixupParams
           
static class CommandLineUtil.MultiClassificationSignalParams
          Parameters encoding the 'training signal' for extraction learning.
static class CommandLineUtil.OnlineBaseParams
          Basic parameters used by almost everything.
static class CommandLineUtil.OnlineLearnerParams
          Parameters for Adding Examples to a Online Classifier
static class CommandLineUtil.OnlineSignalParams
          Parameters encoding the 'training signal' for extraction learning.
static class CommandLineUtil.SaveParams
          Parameters used by all 'train' routines.
static class CommandLineUtil.SplitterParams
          Parameters for doing train/test evaluation of a classifier.
static class CommandLineUtil.TaggerSignalParams
          Parameters encoding the 'training signal' for learning a token-tagger.
static class CommandLineUtil.TestClassifierParams
          Parameters for testing a stored classifier.
static class CommandLineUtil.TestExtractorParams
          Parameters for testing a stored classifier.
static class CommandLineUtil.TrainClassifierParams
          Parameters for training a classifier.
static class CommandLineUtil.TrainExtractorParams
          Parameters for training an extractor.
static class CommandLineUtil.TrainTaggerParams
          Parameters for training an extractor.
static class CommandLineUtil.ViewLabelsParams
           
 
Constructor Summary
CommandLineUtil()
           
 
Method Summary
static java.lang.String createSpanProp(java.lang.String spanTypes, MonotonicTextLabels labels)
          Creates a Mixup program that defines a SpanProp from a list of Span Types
static java.lang.Object newObjectFromBSH(java.lang.String s, java.lang.Class<?> expectedType)
          Create a new object from a fragment of bean shell code, and make sure it's the correct type.
protected static void safeSetRequiredAnnotation(SpanFeatureExtractor fe, java.lang.String s)
           
static Dataset toDataset(TextLabels textLabels, SpanFeatureExtractor fe, java.lang.String spanProp, java.lang.String spanType)
          Build a classification dataset from the necessary inputs.
static Dataset toDataset(TextLabels textLabels, SpanFeatureExtractor fe, java.lang.String spanProp, java.lang.String spanType, java.lang.String candidateType)
          Build a classification dataset from the necessary inputs.
static MultiDataset toMultiDataset(MonotonicTextLabels textLabels, SpanFeatureExtractor fe, java.lang.String[] multiSpanProp)
          Build a classification dataset from the necessary inputs.
static Dataset toSeqDataset(TextLabels textLabels, SpanFeatureExtractor fe, java.lang.String spanProp, java.lang.String spanType)
          Build a classification dataset from the necessary inputs.
static SequenceDataset toSequenceDataset(TextLabels labels, SpanFeatureExtractor fe, int historySize, java.lang.String tokenProp)
          Build a sequential classification dataset from the necessary inputs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandLineUtil

public CommandLineUtil()
Method Detail

safeSetRequiredAnnotation

protected static void safeSetRequiredAnnotation(SpanFeatureExtractor fe,
                                                java.lang.String s)

toSequenceDataset

public static SequenceDataset toSequenceDataset(TextLabels labels,
                                                SpanFeatureExtractor fe,
                                                int historySize,
                                                java.lang.String tokenProp)
Build a sequential classification dataset from the necessary inputs.


toDataset

public static Dataset toDataset(TextLabels textLabels,
                                SpanFeatureExtractor fe,
                                java.lang.String spanProp,
                                java.lang.String spanType)
Build a classification dataset from the necessary inputs.


toSeqDataset

public static Dataset toSeqDataset(TextLabels textLabels,
                                   SpanFeatureExtractor fe,
                                   java.lang.String spanProp,
                                   java.lang.String spanType)
Build a classification dataset from the necessary inputs.


toDataset

public static Dataset toDataset(TextLabels textLabels,
                                SpanFeatureExtractor fe,
                                java.lang.String spanProp,
                                java.lang.String spanType,
                                java.lang.String candidateType)
Build a classification dataset from the necessary inputs.


toMultiDataset

public static MultiDataset toMultiDataset(MonotonicTextLabels textLabels,
                                          SpanFeatureExtractor fe,
                                          java.lang.String[] multiSpanProp)
Build a classification dataset from the necessary inputs.


newObjectFromBSH

public static java.lang.Object newObjectFromBSH(java.lang.String s,
                                                java.lang.Class<?> expectedType)
Create a new object from a fragment of bean shell code, and make sure it's the correct type.


createSpanProp

public static java.lang.String createSpanProp(java.lang.String spanTypes,
                                              MonotonicTextLabels labels)
Creates a Mixup program that defines a SpanProp from a list of Span Types