ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1734630 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
Date Fri, 11 Mar 2016 21:06:35 GMT
Author: clin
Date: Fri Mar 11 21:06:35 2016
New Revision: 1734630

URL: http://svn.apache.org/viewvc?rev=1734630&view=rev
Log:
1. use the newest sentence detector
2. change the data split, so we can test on the real test set
3. normalize timex to string

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java?rev=1734630&r1=1734629&r2=1734630&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
Fri Mar 11 21:06:35 2016
@@ -30,6 +30,7 @@ import org.apache.ctakes.contexttokenize
 import org.apache.ctakes.core.ae.OverlapAnnotator;
 import org.apache.ctakes.core.ae.SentenceDetector;
 import org.apache.ctakes.core.ae.TokenizerAnnotatorPTB;
+import org.apache.ctakes.core.cleartk.ae.SentenceDetectorAnnotator;
 import org.apache.ctakes.core.resource.FileLocator;
 import org.apache.ctakes.dependency.parser.ae.ClearNLPDependencyParserAE;
 import org.apache.ctakes.dependency.parser.ae.ClearNLPSemanticRoleLabelerAE;
@@ -146,13 +147,22 @@ public abstract class Evaluation_ImplBas
       @Option( longName = "patients" )
       public CommandLine.IntegerRanges getPatients();
 
-      @Option( longName = "train-remainders", defaultValue = "0-2" )
+//      @Option( longName = "train-remainders", defaultValue = "0-2" )
+//      public CommandLine.IntegerRanges getTrainRemainders();
+//
+//      @Option( longName = "dev-remainders", defaultValue = "3" )
+//      public CommandLine.IntegerRanges getDevRemainders();
+//
+//      @Option( longName = "test-remainders", defaultValue = "4-5" )
+//      public CommandLine.IntegerRanges getTestRemainders();
+      
+      @Option( longName = "train-remainders", defaultValue = "0-3" )
       public CommandLine.IntegerRanges getTrainRemainders();
 
-      @Option( longName = "dev-remainders", defaultValue = "3" )
+      @Option( longName = "dev-remainders", defaultValue = "4-5" )
       public CommandLine.IntegerRanges getDevRemainders();
 
-      @Option( longName = "test-remainders", defaultValue = "4-5" )
+      @Option( longName = "test-remainders", defaultValue = "6-7" )
       public CommandLine.IntegerRanges getTestRemainders();
 
       @Option( longName = "treebank", defaultToNull = true )
@@ -464,10 +474,12 @@ public abstract class Evaluation_ImplBas
             .add( AnalysisEngineFactory.createEngineDescription( SegmentsFromBracketedSectionTagsAnnotator.class
) );
 
       // identify sentences
-      aggregateBuilder.add( AnalysisEngineFactory.createEngineDescription(
-            SentenceDetector.class,
-            SentenceDetector.SD_MODEL_FILE_PARAM,
-            "org/apache/ctakes/core/sentdetect/sd-med-model.zip" ) );
+//      aggregateBuilder.add( AnalysisEngineFactory.createEngineDescription(
+//            SentenceDetector.class,
+//            SentenceDetector.SD_MODEL_FILE_PARAM,
+//            "org/apache/ctakes/core/sentdetect/sd-med-model.zip" ) );
+      aggregateBuilder.add(SentenceDetectorAnnotator.getDescription(FileLocator.locateFile("org/apache/ctakes/core/sentdetect/model.jar").getPath()));
+      
       // identify tokens
       aggregateBuilder.add( AnalysisEngineFactory.createEngineDescription( TokenizerAnnotatorPTB.class
) );
       // merge some tokens
@@ -1136,9 +1148,9 @@ public abstract class Evaluation_ImplBas
                String timeClass = timex.getTimeClass();
                
                //add normalized timex
-               scala.collection.immutable.Set<TemporalUnit> units = Utils.runTimexParser(timex.getCoveredText());
-               if(units != null){
-            	   property.setTextContent( units.mkString() );
+               String value = Utils.getTimexMLValue(timex.getCoveredText());
+               if(value != null){
+            	   property.setTextContent( value );
                }
                
                if ( timeClass!=null && (timeClass.equals( "DOCTIME" ) || timeClass.equals(
"SECTIONTIME" ) ) ) {



Mime
View raw message