ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1707796 - /ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/eval/SHARPXMI.java
Date Fri, 09 Oct 2015 19:12:25 GMT
Author: dligach
Date: Fri Oct  9 19:12:25 2015
New Revision: 1707796

URL: http://svn.apache.org/viewvc?rev=1707796&view=rev
Log:
now for OTHER option, training on train + dev (rather than just train)

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

Modified: ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/eval/SHARPXMI.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/eval/SHARPXMI.java?rev=1707796&r1=1707795&r2=1707796&view=diff
==============================================================================
--- ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/eval/SHARPXMI.java
(original)
+++ ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/eval/SHARPXMI.java
Fri Oct  9 19:12:25 2015
@@ -289,17 +289,20 @@ public class SHARPXMI {
                params.stats = evaluation.trainAndTest( allTrainFiles, testFiles );
                break;
             case OTHER:
-               // train on the training set and evaluate on specified xmi files
+               // train on the training set + dev set and evaluate on specified xmi files
                // these files should have the necessary preprocessing in the initial view
                // and gold standard relation annotations in the gold view
                // the path to the xmi files must be specified from command line 
-               trainFiles = getTrainTextFiles( options.getBatchesDirectory() );
-               trainFiles = toXMIFiles( options, trainFiles );
+               
+               List<File> trainAndDevFiles = new ArrayList<>();
+               trainAndDevFiles.addAll( getTrainTextFiles( options.getBatchesDirectory()
) );
+               trainAndDevFiles.addAll( getDevTextFiles( options.getBatchesDirectory() )
);
+               trainAndDevFiles = toXMIFiles( options, trainAndDevFiles );
                List<File> xmiFiles = new ArrayList<>();
                for(File xmiFile : options.getPathToXmifilesForEvaluation().listFiles()) {
                  xmiFiles.add( xmiFile );
                }
-               params.stats = evaluation.trainAndTest( trainFiles, xmiFiles );
+               params.stats = evaluation.trainAndTest( trainAndDevFiles, xmiFiles );
                break;
             default:
                throw new IllegalArgumentException( "Invalid EvaluateOn: " + options.getEvaluteOn()
);



Mime
View raw message