LabelOptions options = (LabelOptions) modeOptions;
saveCommand(options.outputCommandFile);
//Set up the segmentation
Segmentation segmentation = factory.constructSegmentation();
//Create a labeling controller
LabelingController labelingController = new LabelingController();
//Provide implementations of the needed processes
factory.configureLabeling(labelingController);
//Process the input messages
MessageSet messages = this.loadMessages(options.inputCSVFile);
FeatureSpecification spec = this.loadFeatureSpecification(options.inputFeatureSpecFile);
Model model = this.loadModel(options.inputModelFile);
SegmentSet segments = segmentation.segment(messages);
//Run the labeling process
labelingController.setModel(model);
labelingController.setSegmentSet(segments);
labelingController.setFeatureSpecification(spec);