ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1616286 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventProperties.java
Date Wed, 06 Aug 2014 17:04:56 GMT
Author: clin
Date: Wed Aug  6 17:04:55 2014
New Revision: 1616286

URL: http://svn.apache.org/r1616286
Log:
fix warnings for Event Properties Evaluation code

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

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventProperties.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventProperties.java?rev=1616286&r1=1616285&r2=1616286&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventProperties.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventProperties.java
Wed Aug  6 17:04:55 2014
@@ -110,13 +110,13 @@ Evaluation_ImplBase<Map<String, Annotati
 			evaluation.prepareXMIsFor(patientSets);
 			evaluation.logClassificationErrors(workingDir, "ctakes-event-property-errors");
 
-			List<Integer> allTraining = new ArrayList<Integer>(trainItems);
+			List<Integer> allTraining = new ArrayList<>(trainItems);
 			List<Integer> allTest = null;
 			if(options.getTest()){
 				allTraining.addAll(devItems);
-				allTest = new ArrayList<Integer>(testItems);
+				allTest = new ArrayList<>(testItems);
 			}else{
-				allTest = new ArrayList<Integer>(devItems);
+				allTest = new ArrayList<>(devItems);
 			}
 
 
@@ -169,6 +169,7 @@ Evaluation_ImplBase<Map<String, Annotati
 		}
 	}
 
+	@SuppressWarnings("deprecation")
 	@Override
 	protected Map<String, AnnotationStatistics<String>> test(
 			CollectionReader collectionReader,
@@ -182,12 +183,12 @@ Evaluation_ImplBase<Map<String, Annotati
 
 		Function<EventMention, ?> eventMentionToSpan = AnnotationStatistics.annotationToSpan();
 		Map<String, Function<EventMention, String>> propertyGetters;
-		propertyGetters = new HashMap<String, Function<EventMention, String>>();
+		propertyGetters = new HashMap<>();
 		for (String name : PROPERTY_NAMES) {
 			propertyGetters.put(name, getPropertyGetter(name));
 		}
 
-		Map<String, AnnotationStatistics<String>> statsMap = new HashMap<String,
AnnotationStatistics<String>>();
+		Map<String, AnnotationStatistics<String>> statsMap = new HashMap<>();
 
 		for(String propertyName : PROPERTY_NAMES){
 			statsMap.put(propertyName, new AnnotationStatistics<String>());



Mime
View raw message