ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1696983 - in /ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference: ae/features/UMLSFeatureExtractor.java eval/EvaluationOfEventCoreference.java
Date Fri, 21 Aug 2015 13:42:25 GMT
Author: tmill
Date: Fri Aug 21 13:42:25 2015
New Revision: 1696983

URL: http://svn.apache.org/r1696983
Log:
Fix to make use of new NO_DOCUMENT_ID constant.

Modified:
    ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/features/UMLSFeatureExtractor.java
    ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/eval/EvaluationOfEventCoreference.java

Modified: ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/features/UMLSFeatureExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/features/UMLSFeatureExtractor.java?rev=1696983&r1=1696982&r2=1696983&view=diff
==============================================================================
--- ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/features/UMLSFeatureExtractor.java
(original)
+++ ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/features/UMLSFeatureExtractor.java
Fri Aug 21 13:42:25 2015
@@ -16,7 +16,6 @@ import org.apache.ctakes.typesystem.type
 import org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation;
 import org.apache.ctakes.typesystem.type.textsem.Markable;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.cas.CASException;
 import org.apache.uima.fit.util.JCasUtil;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.cas.FSArray;
@@ -137,7 +136,7 @@ public class UMLSFeatureExtractor implem
 	  String docId = null;
 	  
 	  docId = DocumentIDAnnotationUtil.getDocumentID(jcas);
-	  if(docId != null) return docId;
+	  if(docId != DocumentIDAnnotationUtil.NO_DOCUMENT_ID) return docId;
 	  
 	  try{
 	    if(jcas.getView(ViewUriUtil.URI) != null){

Modified: ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/eval/EvaluationOfEventCoreference.java
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/eval/EvaluationOfEventCoreference.java?rev=1696983&r1=1696982&r2=1696983&view=diff
==============================================================================
--- ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/eval/EvaluationOfEventCoreference.java
(original)
+++ ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/eval/EvaluationOfEventCoreference.java
Fri Aug 21 13:42:25 2015
@@ -120,7 +120,7 @@ public class EvaluationOfEventCoreferenc
   }
   
   private static Logger logger = Logger.getLogger(EvaluationOfEventCoreference.class);
-  public static float COREF_DOWNSAMPLE = 0.1f;
+  public static float COREF_DOWNSAMPLE = 0.5f;
   protected static ParameterSettings allParams = new ParameterSettings(DEFAULT_BOTH_DIRECTIONS,
COREF_DOWNSAMPLE, "tk",
       1.0, 1.0, "linear", ComboOperator.SUM, 0.1, 0.5);
 
@@ -411,7 +411,7 @@ public class EvaluationOfEventCoreferenc
     @Override
     public void process(JCas jCas) throws AnalysisEngineProcessException {
       String docId = DocumentIDAnnotationUtil.getDocumentID(jCas);
-      if(docId == null){
+      if(docId == DocumentIDAnnotationUtil.NO_DOCUMENT_ID){
         docId = new File(ViewUriUtil.getURI(jCas)).getName();
       }
       logger.info(String.format("Processing %s\n", docId));



Mime
View raw message