Package etc.aloe.controllers

Examples of etc.aloe.controllers.LabelingController


            Segment segment = new Segment();
            segment.add(message);
            SegmentSet segmentSet = new SegmentSet();
            segmentSet.add(segment);

            LabelingController labelingController = new LabelingController();
            factory.configureLabeling(labelingController);

            FeatureSpecification spec = this.loadFeatureSpecification(options.inputFeatureSpecFile);
            Model model = this.loadModel(options.inputModelFile);

            labelingController.setModel(model);
            labelingController.setFeatureSpecification(spec);
            labelingController.setSegmentSet(segmentSet);
            labelingController.run();

            System.out.println("" + message.getPredictedLabel());
        } else {
            throw new IllegalArgumentException("Options must be for Single");
        }
View Full Code Here


           
            //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);
            labelingController.run();

            //Get the outputs
            EvaluationReport evalReport = labelingController.getEvaluationReport();

            System.out.println("== Saving Output ==");

            saveEvaluationReport(evalReport, options.outputEvaluationReportFile);
            if (options.makeROC) {
                ROC roc = evalReport.getROCs().get(0);
                saveROC(roc, options.outputROCFile);
            }
           
            if (options.outputFeatureValues) {
                Instances featureValues = labelingController.getFeatureValues();
                saveInstances(featureValues, options.outputFeatureValuesFile);
            }
           
            saveMessages(messages, options.outputCSVFile);
           
View Full Code Here

TOP

Related Classes of etc.aloe.controllers.LabelingController

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.