incubator-ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevenbeth...@apache.org
Subject svn commit: r1401383 - /incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/eval/RelationExtractorEvaluation.java
Date Tue, 23 Oct 2012 18:54:06 GMT
Author: stevenbethard
Date: Tue Oct 23 18:54:06 2012
New Revision: 1401383

URL: http://svn.apache.org/viewvc?rev=1401383&view=rev
Log:
Simplifies relation extractor train and test code.

Modified:
    incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/eval/RelationExtractorEvaluation.java

Modified: incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/eval/RelationExtractorEvaluation.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/eval/RelationExtractorEvaluation.java?rev=1401383&r1=1401382&r2=1401383&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/eval/RelationExtractorEvaluation.java
(original)
+++ incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/eval/RelationExtractorEvaluation.java
Tue Oct 23 18:54:06 2012
@@ -172,12 +172,7 @@ public class RelationExtractorEvaluation
       } else {
       	// train on the entire training set and evaluate on the test set
       	List<File> testFiles = Arrays.asList(options.testDirectory.listFiles());
-      	
-      	CollectionReader trainCollectionReader = evaluation.getCollectionReader(trainFiles);
-      	evaluation.train(trainCollectionReader, modelsDir);
-      	
-      	CollectionReader testCollectionReader = evaluation.getCollectionReader(testFiles);
-      	AnnotationStatistics<String> stats = evaluation.test(testCollectionReader, modelsDir);
+      	AnnotationStatistics<String> stats = evaluation.trainAndTest(trainFiles, testFiles);
         System.err.print(stats);
       	return;
       }



Mime
View raw message