Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.apache.ctakes.temporal.eval;
 
 import java.io.File;
 import java.util.List;
 
 import  org.cleartk.eval.AnnotationStatistics;
 
 
 public class EvaluationOfNEPredicateEventSpans extends
 
 	public EvaluationOfNEPredicateEventSpans(File baseDirectory,
 			File rawTextDirectoryFile xmlDirectoryXMLFormat xmlFormat,
 			File xmiDirectoryFile treebankDirectory,
 			Class<? extends AnnotationannotationClass) {
 		super(baseDirectoryrawTextDirectoryxmlDirectoryxmlFormat,
 				xmiDirectorytreebankDirectorynullannotationClass);
 		// TODO Auto-generated constructor stub
 	}
 
 	public EvaluationOfNEPredicateEventSpans(File baseDirectory,
 			File rawTextDirectoryFile xmlDirectoryXMLFormat xmlFormat,
 			File xmiDirectory) {
 		super(baseDirectoryrawTextDirectoryxmlDirectoryxmlFormat,
 				xmiDirectoryEventMention.class);
 		// TODO Auto-generated constructor stub
 	}
 
 		// not training a model - just using the NEs and predicates
 	    return AnalysisEngineFactory.createEngineDescription(NoOpAnnotator.class);
 	}
 
 	protected void trainAndPackage(File directorythrows Exception {
 		// TODO Auto-generated method stub
 
 	}
 
 		// not training a model - just using the NEs and predicates
 //		return AnalysisEngineFactory.createEngineDescription(NoOpAnnotator.class);
 	    return NEPredicateEventAnnotator.createAnnotatorDescription(directory);
 	}
 
 	protected Collection<? extends AnnotationgetGoldAnnotations(JCas jCasSegment segment) {
 		return selectExact(jCasEventMention.classsegment);
 	}
 
 	protected Collection<? extends AnnotationgetSystemAnnotations(JCas jCasSegment segment) {
 		return selectExact(jCasEventMention.classsegment);
 	}

Parameters:
args
 
 	public static void main(String[] argsthrows Exception{
 		Options options = CliFactory.parseArguments(Options.classargs);
 	    List<IntegerpatientSets = options.getPatients().getList();
 	    List<IntegertrainItems = getTrainItems(options);
 	    List<IntegertestItems = getTestItems(options);
 	        new File("target/eval/event-spans"),
	        options.getRawTextDirectory(),
	        options.getXMLDirectory(),
	        options.getXMLFormat(),
	        options.getXMIDirectory());
	    evaluation.prepareXMIsFor(patientSets);
	    evaluation.setLogging(.new File("target/eval/ctakes-event-errors.log"));
	    AnnotationStatistics<Stringstats = evaluation.trainAndTest(trainItemstestItems);
	    ..println(stats);
	}
New to GrepCode? Check out our FAQ X