You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by cl...@apache.org on 2016/07/19 17:07:10 UTC
svn commit: r1753404 -
/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/TemporalRelationExtractorAnnotator.java
Author: clin
Date: Tue Jul 19 17:07:10 2016
New Revision: 1753404
URL: http://svn.apache.org/viewvc?rev=1753404&view=rev
Log:
temporally remove confidence score from classification results for CNN implementation
Modified:
ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/TemporalRelationExtractorAnnotator.java
Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/TemporalRelationExtractorAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/TemporalRelationExtractorAnnotator.java?rev=1753404&r1=1753403&r2=1753404&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/TemporalRelationExtractorAnnotator.java (original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/TemporalRelationExtractorAnnotator.java Tue Jul 19 17:07:10 2016
@@ -103,7 +103,7 @@ public abstract class TemporalRelationEx
minmaxExtractorURI = new File(outputDirectoryName, FEATURE_TRANSFORM_NAME + "_Zscore_extractor.dat").toURI();
return minmaxExtractorURI;
}
- */
+ */
/**
* Defines the list of feature extractors used by the classifier. Subclasses
@@ -162,7 +162,7 @@ public abstract class TemporalRelationEx
public void initialize(UimaContext context) throws ResourceInitializationException {
allowClassifierModelOnClasspath(context);
super.initialize(context);
-// minmaxExtractor = createMinMaxNormalizationExtractor();
+ // minmaxExtractor = createMinMaxNormalizationExtractor();
/**for normalization
if (this.minmaxExtractorURI != null) {
try {
@@ -238,7 +238,7 @@ public abstract class TemporalRelationEx
}
}*/
}
-
+
/**for normalization
//transform features:
if (this.featureTransformExtractor != null) {
@@ -265,7 +265,8 @@ public abstract class TemporalRelationEx
// during classification feed the features to the classifier and create
// annotations
else {
- // String predictedCategory = this.classify(features);
+ String predictedCategory = this.classify(features);
+ /**
Map<String,Double> scores = this.classifier.score(features);
Map.Entry<String, Double> maxEntry = null;
@@ -296,7 +297,7 @@ public abstract class TemporalRelationEx
e.printStackTrace();
throw new AnalysisEngineProcessException(e);
}
- }
+ }*/
// add a relation annotation if a true relation was predicted
if (predictedCategory != null && !predictedCategory.equals(NO_RELATION_CATEGORY)) {
@@ -310,7 +311,7 @@ public abstract class TemporalRelationEx
arg2 = temp;
}
- createRelation(jCas, arg1, arg2, predictedCategory, confidence);
+ createRelation(jCas, arg1, arg2, predictedCategory, 0.0);
}
}
} // end pair in pairs