ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1715430 - in /ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference: ae/DeterministicMarkableAnnotator.java ae/MentionClusterCoreferenceAnnotator.java eval/EvaluationOfEventCoreference.java
Date Fri, 20 Nov 2015 22:05:31 GMT
Author: tmill
Date: Fri Nov 20 22:05:31 2015
New Revision: 1715430

URL: http://svn.apache.org/viewvc?rev=1715430&view=rev
Log:
Improved markables, added uncertainty engine, separated out mention and pair features.

Modified:
    ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/DeterministicMarkableAnnotator.java
    ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/MentionClusterCoreferenceAnnotator.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/DeterministicMarkableAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/DeterministicMarkableAnnotator.java?rev=1715430&r1=1715429&r2=1715430&view=diff
==============================================================================
--- ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/DeterministicMarkableAnnotator.java
(original)
+++ ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/DeterministicMarkableAnnotator.java
Fri Nov 20 22:05:31 2015
@@ -145,7 +145,7 @@ public class DeterministicMarkableAnnota
       boolean blockedByConj = false;
       for(ConllDependencyNode pathEl : DependencyUtility.getPath(progeny, node, originalNode)){
         if(pathEl == originalNode) continue;
-        if(pathEl.getDeprel().equals("conj") || pathEl.getDeprel().equals("cc") || pathEl.getPostag().equals(".")
|| pathEl.getPostag().equals(",") || pathEl.getDeprel().equals("meta") 
+        if(pathEl.getDeprel().equals("conj") || pathEl.getDeprel().equals("cc") || pathEl.getPostag().equals(".")
|| pathEl.getPostag().equals(",") || pathEl.getDeprel().equals("punct") || pathEl.getDeprel().equals("meta")

             || pathEl.getCoveredText().matches("(([A-Z][\\.\\:\\)])|(#\\d+)|(\\d+[\\.\\:\\)]))")){
           blockedByConj = true;
           break;

Modified: ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/MentionClusterCoreferenceAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/MentionClusterCoreferenceAnnotator.java?rev=1715430&r1=1715429&r2=1715430&view=diff
==============================================================================
--- ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/MentionClusterCoreferenceAnnotator.java
(original)
+++ ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/MentionClusterCoreferenceAnnotator.java
Fri Nov 20 22:05:31 2015
@@ -14,7 +14,7 @@ import java.util.Set;
 
 import org.apache.ctakes.core.util.ListFactory;
 import org.apache.ctakes.coreference.ae.features.cluster.MentionClusterAgreementFeaturesExtractor;
-import org.apache.ctakes.coreference.ae.features.cluster.MentionClusterAttributeAgreementFeaturesExtractor;
+import org.apache.ctakes.coreference.ae.features.cluster.MentionClusterAttributeFeaturesExtractor;
 import org.apache.ctakes.coreference.ae.features.cluster.MentionClusterDepHeadExtractor;
 import org.apache.ctakes.coreference.ae.features.cluster.MentionClusterDistSemExtractor;
 import org.apache.ctakes.coreference.ae.features.cluster.MentionClusterMentionFeaturesExtractor;
@@ -118,7 +118,7 @@ public class MentionClusterCoreferenceAn
     extractors.add(new MentionClusterDepHeadExtractor());
     extractors.add(new MentionClusterStackFeaturesExtractor());
     extractors.add(new MentionClusterSalienceFeaturesExtractor());
-    extractors.add(new MentionClusterAttributeAgreementFeaturesExtractor());
+    extractors.add(new MentionClusterAttributeFeaturesExtractor());
 //    extractors.add(new MentionClusterDistanceFeaturesExtractor());
     
     try {
@@ -134,8 +134,14 @@ public class MentionClusterCoreferenceAn
   protected List<FeatureExtractor1<Markable>> getMentionExtractors(){
     List<FeatureExtractor1<Markable>> extractors = new ArrayList<>();
     // mention features from pairwise system:
+    extractors.add(new MentionClusterAgreementFeaturesExtractor());
+    extractors.add(new MentionClusterSectionFeaturesExtractor());
+    extractors.add(new MentionClusterUMLSFeatureExtractor());
+    extractors.add(new MentionClusterDepHeadExtractor());
+    extractors.add(new MentionClusterSalienceFeaturesExtractor());
+
     extractors.add(new MentionClusterMentionFeaturesExtractor());
-    extractors.add(new MentionClusterAttributeAgreementFeaturesExtractor());
+    extractors.add(new MentionClusterAttributeFeaturesExtractor());
 
     return extractors;
   }

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=1715430&r1=1715429&r2=1715430&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 Nov 20 22:05:31 2015
@@ -18,6 +18,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.apache.ctakes.assertion.medfacts.cleartk.PolarityCleartkAnalysisEngine;
+import org.apache.ctakes.assertion.medfacts.cleartk.UncertaintyCleartkAnalysisEngine;
 import org.apache.ctakes.core.resource.FileLocator;
 import org.apache.ctakes.core.util.DocumentIDAnnotationUtil;
 import org.apache.ctakes.coreference.ae.CoreferenceChainScoringOutput;
@@ -246,6 +247,8 @@ public class EvaluationOfEventCoreferenc
     if(!skipWrite){
       AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
       aggregateBuilder.add(PolarityCleartkAnalysisEngine.createAnnotatorDescription());
+      aggregateBuilder.add(UncertaintyCleartkAnalysisEngine.createAnnotatorDescription());
+      
       aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ViewCreatorAnnotator.class,
ViewCreatorAnnotator.PARAM_VIEW_NAME, "Baseline"));
       aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(DocumentIDPrinter.class));
       aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ParagraphAnnotator.class));
@@ -324,6 +327,7 @@ public class EvaluationOfEventCoreferenc
       CollectionReader collectionReader, File directory) throws Exception {
     AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
     aggregateBuilder.add(PolarityCleartkAnalysisEngine.createAnnotatorDescription());
+    aggregateBuilder.add(UncertaintyCleartkAnalysisEngine.createAnnotatorDescription());
     aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(DocumentIDPrinter.class));
     aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ParagraphAnnotator.class));
     aggregateBuilder.add(AnalysisEngineFactory.createEngineDescription(ParagraphVectorAnnotator.class));



Mime
View raw message