Revision: 16521
          http://sourceforge.net/p/gate/code/16521
Author:   nirajaswani
Date:     2013-02-08 16:09:18 +0000 (Fri, 08 Feb 2013)
Log Message:
-----------
a warning about not enough authors if we endup with only one author after 
ignore some authors

Modified Paths:
--------------
    gate/trunk/plugins/Teamware_Tools/src/gate/qa/QAForTeamwarePR.java

Modified: gate/trunk/plugins/Teamware_Tools/src/gate/qa/QAForTeamwarePR.java
===================================================================
--- gate/trunk/plugins/Teamware_Tools/src/gate/qa/QAForTeamwarePR.java  
2013-02-08 15:58:48 UTC (rev 16520)
+++ gate/trunk/plugins/Teamware_Tools/src/gate/qa/QAForTeamwarePR.java  
2013-02-08 16:09:18 UTC (rev 16521)
@@ -107,7 +107,7 @@
    * ignore annotators
    */
   private List<String> annotatorsToIgnore = null;
-  
+
   /**
    * Controller with QA PR as part of it.
    */
@@ -180,19 +180,18 @@
         }
       }
     }
-    
     // we need to ignore some of the annotators
     if(annotatorsToIgnore != null && !annotatorsToIgnore.isEmpty()) {
       annotators.removeAll(annotatorsToIgnore);
     }
-    
     // if no annotators found print a warning
-    if(annotators.isEmpty()) {
-      System.err.println("No annotators found for the document " +
-        document.getName() + "\n" +
-        "Please make sure the document is annotated using Teamware!");
+    if(annotators.isEmpty() || annotators.size() == 1) {
+      System.err
+        .println("No annotators or only one annotator found for the document " 
+
+          document.getName() + "\n" +
+          "Please make sure the document is annotated using Teamware and " +
+          "annotated by atleast two annotators!");
     }
-    
     // if documents are loaded from datastore, we store only the
     // persistence Ids
     // or the document object itself
@@ -367,6 +366,13 @@
     double consensusMicro = 0.0D;
     double annotatorMacro = 0.0D;
     double annotatorMicro = 0.0D;
+    // no result file found so quitting the execution
+    if(resultFiles == null) {
+      System.err
+        .println("WARNING: not enough information (most probably annotators)"
+          + " found for the summary to be generated!");
+      return;
+    }
     // one file at a time
     for(File file : resultFiles) {
       // finding author names
@@ -802,6 +808,7 @@
 
   /**
    * annotators to ignore when computing IAA
+   * 
    * @return
    */
   public List<String> getAnnotatorsToIgnore() {
@@ -810,6 +817,7 @@
 
   /**
    * annotators to ingore when computing IAA
+   * 
    * @param annotatorsToIgnore
    */
   @RunTime
@@ -819,7 +827,6 @@
     this.annotatorsToIgnore = annotatorsToIgnore;
   }
 
-
   /**
    * Storing individual results for each pair of annotators
    * 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to