Revision: 17674
          http://sourceforge.net/p/gate/code/17674
Author:   markagreenwood
Date:     2014-03-15 10:48:33 +0000 (Sat, 15 Mar 2014)
Log Message:
-----------
and that's all the K* plugins cleaned up and the compiler warnings enabled

Modified Paths:
--------------
    gate/trunk/plugins/Keyphrase_Extraction_Algorithm/build.xml
    
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/gate/creole/kea/CorpusImporter.java
    
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/gate/creole/kea/Kea.java
    gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/Counter.java
    gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/GermanStemmer.java
    
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/IteratedLovinsStemmer.java
    gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAFilter.java
    
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAKeyphraseExtractor.java
    
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAModelBuilder.java
    
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAPhraseFilter.java
    gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/LovinsStemmer.java
    gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/NumbersFilter.java
    gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/Stemmer.java
    gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/Stopwords.java
    
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/StopwordsEnglish.java
    
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/StopwordsGerman.java

Modified: gate/trunk/plugins/Keyphrase_Extraction_Algorithm/build.xml
===================================================================
--- gate/trunk/plugins/Keyphrase_Extraction_Algorithm/build.xml 2014-03-15 
10:22:11 UTC (rev 17673)
+++ gate/trunk/plugins/Keyphrase_Extraction_Algorithm/build.xml 2014-03-15 
10:48:33 UTC (rev 17674)
@@ -1,92 +1,88 @@
-<project name="kea" default="dist" basedir="." >
-  <!-- Prevent Ant from warning about includeantruntime not being set -->
-  <property name="build.sysclasspath" value="ignore" />
+<project name="kea" default="dist" basedir=".">
+       <!-- Prevent Ant from warning about includeantruntime not being set -->
+       <property name="build.sysclasspath" value="ignore" />
 
-  <property file="build.properties" />
+       <property file="build.properties" />
 
-  <property name="src" location="src"/>
-  <property name="build" location="build"/>
-  <property name="dist"  location="dist"/>
-  <property name="jar.location" location="kea.jar" />
-  <property name="doc.dir" location="doc" />
-  <property name="javadoc.dir" location="${doc.dir}/javadoc" />
-  
-  <property name="gate.home" location="../.." />
-  <property name="gate.lib" location="${gate.home}/lib" />
-  <property name="gate.jar" location="${gate.home}/bin/gate.jar" />
- 
-  <path id="classpath">
-    <pathelement location="${gate.jar}" />
-    <fileset dir="${gate.lib}">
-      <include name="**/*.jar" />
-      <include name="**/*.zip" />
-    </fileset>
-    <fileset dir="lib"> 
-      <include name="*.jar"/>
-    </fileset>
-  </path> 
-  
-  <target name="init">
-    <!-- Create the time stamp -->
-    <tstamp/>
-    <!-- Create the build directory structure used by compile -->
-    <mkdir dir="${build}"/>
-  </target>
-  
-  <target name="compile" depends="init"
-        description="compile the source " >
-    <!-- Compile the java code from ${src} into ${build} -->
-    <javac srcdir="${src}" destdir="${build}" debug="true" source="1.4" 
target="1.4" encoding="UTF-8">
-     <classpath refid="classpath"/> 
-    </javac>
-  </target>
+       <property name="src" location="src" />
+       <property name="build" location="build" />
+       <property name="dist" location="dist" />
+       <property name="jar.location" location="kea.jar" />
+       <property name="doc.dir" location="doc" />
+       <property name="javadoc.dir" location="${doc.dir}/javadoc" />
 
-  <!-- Build JavaDoc documentation -->
-  <target name="doc.prepare">
-    <mkdir dir="${javadoc.dir}" />
-  </target>
+       <property name="gate.home" location="../.." />
+       <property name="gate.lib" location="${gate.home}/lib" />
+       <property name="gate.jar" location="${gate.home}/bin/gate.jar" />
+       <property name="gate.compile.maxwarnings" value="10000" />
 
-  <target name="javadoc" depends="doc.prepare">
-    <javadoc destdir="${javadoc.dir}" packagenames="*"
-             classpathref="classpath"
-             encoding="UTF-8"
-             windowtitle="${plugin.name} JavaDoc"
-             source="1.6">
-      <sourcepath>
-        <pathelement location="${src}" />
-      </sourcepath>
-      <link href="http://docs.oracle.com/javase/6/docs/api/"; />
-      <link href="http://gate.ac.uk/gate/doc/javadoc/"; />
-    </javadoc>
-  </target>
+       <path id="classpath">
+               <pathelement location="${gate.jar}" />
+               <fileset dir="${gate.lib}">
+                       <include name="**/*.jar" />
+                       <include name="**/*.zip" />
+               </fileset>
+               <fileset dir="lib">
+                       <include name="*.jar" />
+               </fileset>
+       </path>
 
-  <target name="copy.resources" depends="init"
-        description="copy non-.java files from src to build" >
-    <copy todir="${build}" includeEmptyDirs="false">
-      <fileset dir="${src}" excludes="**/*.java" />
-    </copy>
-  </target>
-  
-  <target name="dist" depends="compile, copy.resources"
-        description="generate the distribution" >
-    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
-    <jar jarfile="${jar.location}" basedir="${build}"/>
-  </target>
+       <target name="init">
+               <!-- Create the time stamp -->
+               <tstamp />
+               <!-- Create the build directory structure used by compile -->
+               <mkdir dir="${build}" />
+       </target>
 
-  <target name="clean.classes"
-        description="clean up" >
-    <!-- Delete the ${build} and ${dist} directory trees -->
-    <delete dir="${build}"/>
-    <delete dir="${dist}"/>
-  </target>
+       <target name="compile" depends="init" description="compile the source ">
+               <!-- Compile the java code from ${src} into ${build} -->
+               <javac srcdir="${src}" destdir="${build}" debug="true" 
source="1.6" target="1.6" encoding="UTF-8">
+                       <classpath refid="classpath" />
+                       <compilerarg value="-Xmaxwarns" />
+                       <compilerarg value="${gate.compile.maxwarnings}" />
+                       <compilerarg value="-Xlint:all" />
+               </javac>
+       </target>
 
-  <target name="clean" depends="clean.classes" >
-    <!-- full clean also removes the generated JAR file -->
-    <delete file="${jar.location}" />
-  </target>
+       <!-- Build JavaDoc documentation -->
+       <target name="doc.prepare">
+               <mkdir dir="${javadoc.dir}" />
+       </target>
 
-  <!-- Targets used by the main GATE build file -->
-  <target name="build" depends="dist" />
-  <target name="test" />
-  <target name="distro.prepare" depends="clean.classes" />
+       <target name="javadoc" depends="doc.prepare">
+               <javadoc destdir="${javadoc.dir}" packagenames="*" 
classpathref="classpath" encoding="UTF-8" windowtitle="${plugin.name} JavaDoc" 
source="1.6">
+                       <sourcepath>
+                               <pathelement location="${src}" />
+                       </sourcepath>
+                       <link href="http://docs.oracle.com/javase/6/docs/api/"; 
/>
+                       <link href="http://gate.ac.uk/gate/doc/javadoc/"; />
+               </javadoc>
+       </target>
+
+       <target name="copy.resources" depends="init" description="copy 
non-.java files from src to build">
+               <copy todir="${build}" includeEmptyDirs="false">
+                       <fileset dir="${src}" excludes="**/*.java" />
+               </copy>
+       </target>
+
+       <target name="dist" depends="compile, copy.resources" 
description="generate the distribution">
+               <!-- Put everything in ${build} into the 
MyProject-${DSTAMP}.jar file -->
+               <jar jarfile="${jar.location}" basedir="${build}" />
+       </target>
+
+       <target name="clean.classes" description="clean up">
+               <!-- Delete the ${build} and ${dist} directory trees -->
+               <delete dir="${build}" />
+               <delete dir="${dist}" />
+       </target>
+
+       <target name="clean" depends="clean.classes">
+               <!-- full clean also removes the generated JAR file -->
+               <delete file="${jar.location}" />
+       </target>
+
+       <!-- Targets used by the main GATE build file -->
+       <target name="build" depends="dist" />
+       <target name="test" />
+       <target name="distro.prepare" depends="clean.classes" />
 </project>

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/gate/creole/kea/CorpusImporter.java
===================================================================
--- 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/gate/creole/kea/CorpusImporter.java
   2014-03-15 10:22:11 UTC (rev 17673)
+++ 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/gate/creole/kea/CorpusImporter.java
   2014-03-15 10:48:33 UTC (rev 17674)
@@ -15,15 +15,14 @@
 
 package gate.creole.kea;
 
-import java.awt.*;
-import java.awt.event.ActionEvent;
-import java.io.*;
-import java.util.*;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.swing.*;
-import gate.*;
+import gate.AnnotationSet;
+import gate.Corpus;
+import gate.Document;
+import gate.Executable;
+import gate.Factory;
+import gate.FeatureMap;
+import gate.Gate;
+import gate.Resource;
 import gate.creole.AbstractVisualResource;
 import gate.creole.ExecutionException;
 import gate.gui.MainFrame;
@@ -31,12 +30,43 @@
 import gate.util.Err;
 import gate.util.ExtensionFileFilter;
 
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.AbstractAction;
+import javax.swing.BorderFactory;
+import javax.swing.Box;
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import org.apache.commons.io.IOUtils;
+
 /**
  * A simple utility to import KEA style corpora into GATE.
  * It is registered as a GATE viewer for the KEA Processing Resource and it is
  * available from the main pane.
  */
+@SuppressWarnings("serial")
 public class CorpusImporter extends AbstractVisualResource {
+
+  private static final long serialVersionUID = 5318018411995211792L;
+
   public CorpusImporter() {
   }
   /**
@@ -220,10 +250,11 @@
                   String fileName = textFiles[i].getCanonicalPath();
                   int pos = fileName.lastIndexOf(textExt);
                   fileName = fileName.substring(0, pos) + keyExt;
-                  List keys = new ArrayList();
+                  List<String> keys = new ArrayList<String>();
                   Exception e = null;
+                  BufferedReader reader = null;
                   try{
-                    BufferedReader reader;
+                    
                     if(encoding != null && encoding.length() > 0){
                       reader = new BomStrippingInputStreamReader(
                                  new FileInputStream(fileName), encoding);
@@ -239,6 +270,9 @@
                   }catch(IOException ioe){
                     e = ioe;
                   }
+                  finally {
+                    IOUtils.closeQuietly(reader);
+                  }
                   if(keys.isEmpty() || e != null){
                     MainFrame.unlockGUI();
                     int res = JOptionPane.showOptionDialog(CorpusImporter.this,
@@ -360,13 +394,13 @@
   protected boolean annotateKeyPhrases(Document document,
                                     String annSetName,
                                     String keyphraseAnnotationType,
-                                    List phrases) throws Exception{
+                                    List<String> phrases) throws Exception{
     if(phrases == null || phrases.isEmpty()) return false;
     //create a pattern
     String patternStr = "";
-    Iterator phraseIter = phrases.iterator();
+    Iterator<String> phraseIter = phrases.iterator();
     while(phraseIter.hasNext()){
-      String phrase = (String)phraseIter.next();
+      String phrase = phraseIter.next();
       patternStr += patternStr.length() == 0 ?
                  "\\Q" + phrase + "\\E" :
                  "|\\Q" + phrase + "\\E";

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/gate/creole/kea/Kea.java
===================================================================
--- 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/gate/creole/kea/Kea.java  
    2014-03-15 10:22:11 UTC (rev 17673)
+++ 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/gate/creole/kea/Kea.java  
    2014-03-15 10:48:33 UTC (rev 17674)
@@ -15,22 +15,43 @@
  
 package gate.creole.kea;
 
-import java.io.*;
-import java.util.*;
+import gate.Annotation;
+import gate.AnnotationSet;
+import gate.Factory;
+import gate.Resource;
+import gate.creole.AbstractLanguageAnalyser;
+import gate.creole.ExecutionException;
+import gate.creole.ResourceInstantiationException;
+import gate.gui.ActionsPublisher;
+import gate.gui.MainFrame;
+import gate.util.Err;
+import gate.util.InvalidOffsetException;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
+
+import javax.swing.Action;
 import javax.swing.JFileChooser;
 import javax.swing.JOptionPane;
+
 import kea.KEAFilter;
-import weka.core.*;
-import gate.*;
-import gate.creole.*;
-import gate.gui.ActionsPublisher;
-import gate.gui.MainFrame;
-import gate.util.Err;
-import gate.util.InvalidOffsetException;
+import weka.core.Attribute;
+import weka.core.FastVector;
+import weka.core.Instance;
+import weka.core.Instances;
 
 /**
  * This is wrapper for using the KEA Keyphrase extractor
@@ -45,8 +66,11 @@
  *  of extracting keyphrases.
  * </UL>
  */
+@SuppressWarnings("serial")
 public class Kea extends AbstractLanguageAnalyser implements ActionsPublisher{
 
+  private static final long serialVersionUID = 8297240873486868105L;
+
   /**
    * Anonymous constructor, required by GATE. Does nothing.
    */
@@ -58,7 +82,7 @@
    * Save model.
    * @return
    */
-  public List getActions() {
+  public List<Action> getActions() {
     return actions;
   }
 
@@ -90,7 +114,7 @@
     //generate the first attribute: the text
     //this will be used for both training and application modes.
     double[] newInst = new double[2];
-    newInst[0] = (double)data.attribute(0).addStringValue(text);
+    newInst[0] = data.attribute(0).addStringValue(text);
 
     if(trainingMode.booleanValue()){
       //training mode -> we need to collect the keyphrases
@@ -102,14 +126,14 @@
       AnnotationSet kpSet = annSet.get(keyphraseAnnotationType);
       if(kpSet != null && kpSet.size() > 0){
         //use a set to avoid repetitions
-        Set keyPhrases = new HashSet();
+        Set<String> keyPhrases = new HashSet<String>();
 
-        Iterator keyPhraseIter = kpSet.iterator();
+        Iterator<Annotation> keyPhraseIter = kpSet.iterator();
         //initialise the string for the second attribute
         String keyPhrasesStr = "";
         while(keyPhraseIter.hasNext()){
           //get one keyphrase annotation
-          Annotation aKeyPhrase = (Annotation)keyPhraseIter.next();
+          Annotation aKeyPhrase = keyPhraseIter.next();
           try{
             //get the string for the keyphrase annotation
             String keyPhraseStr = document.getContent().
@@ -127,7 +151,7 @@
           }
         }
         //all the keyphrases have been enumerated -> create the second 
attribute
-        newInst[1] = (double)data.attribute(1).addStringValue(keyPhrasesStr);
+        newInst[1] = data.attribute(1).addStringValue(keyPhrasesStr);
       }else{
         //no keyphrase annotations
         newInst[1] = Instance.missingValue();
@@ -165,7 +189,7 @@
       }
       //annotate the document with the results -> create a list with all the
       //keyphrases found by KEA
-      List phrases = new ArrayList();
+      List<String> phrases = new ArrayList<String>();
       for(int i = 0; i < topRankedInstances.length; i ++){
         if(topRankedInstances[i] != null){
           phrases.add(topRankedInstances[i].
@@ -187,13 +211,13 @@
    * @param phrases the list of keyphrases.
    * @throws Exception
    */
-  protected void annotateKeyPhrases(List phrases) throws Exception{
+  protected void annotateKeyPhrases(List<String> phrases) throws Exception{
     if(phrases == null || phrases.isEmpty()) return;
     //create a pattern
     String patternStr = "";
-    Iterator phraseIter = phrases.iterator();
+    Iterator<String> phraseIter = phrases.iterator();
     while(phraseIter.hasNext()){
-      String phrase = (String)phraseIter.next();
+      String phrase = phraseIter.next();
       patternStr += patternStr.length() == 0 ?
                  "\\Q" + phrase + "\\E" :
                  "|\\Q" + phrase + "\\E";
@@ -399,7 +423,7 @@
     }catch(Exception e){
       throw new ResourceInstantiationException(e);
     }
-    actions = new ArrayList();
+    actions = new ArrayList<Action>();
     actions.add(new SaveModelAction());
     actions.add(new LoadModelAction());
     return this;
@@ -438,6 +462,7 @@
       throw new ExecutionException(e);
     }
     // Get rid of instances in filter
+    @SuppressWarnings("unused")
     Instance dummy;
     while ((dummy = keaFilter.output()) != null) {};
     trainingFinished = true;
@@ -572,5 +597,5 @@
   /**
    * The list of GUI actions available from this PR on popup menus.
    */
-  protected List actions;
+  protected List<Action> actions;
 }
\ No newline at end of file

Modified: gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/Counter.java
===================================================================
--- gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/Counter.java      
2014-03-15 10:22:11 UTC (rev 17673)
+++ gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/Counter.java      
2014-03-15 10:48:33 UTC (rev 17674)
@@ -27,6 +27,7 @@
  * @author Eibe Frank ([email protected])
  * @version 1.0
  */
+@SuppressWarnings("serial")
 public class Counter implements Serializable {
   
   /** Integer value stored */

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/GermanStemmer.java
===================================================================
--- 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/GermanStemmer.java    
    2014-03-15 10:22:11 UTC (rev 17673)
+++ 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/GermanStemmer.java    
    2014-03-15 10:48:33 UTC (rev 17674)
@@ -65,6 +65,7 @@
  * @author    Gerhard Schwarz
  * @version   $Id: GermanStemmer.java,v 1.3 2005/02/03 12:52:20 valyt Exp $
  */
+@SuppressWarnings("serial")
 public class GermanStemmer extends Stemmer
 {
     /**

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/IteratedLovinsStemmer.java
===================================================================
--- 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/IteratedLovinsStemmer.java
        2014-03-15 10:22:11 UTC (rev 17673)
+++ 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/IteratedLovinsStemmer.java
        2014-03-15 10:48:33 UTC (rev 17674)
@@ -19,7 +19,6 @@
 
 package kea;
 
-import java.util.*;
 
 /**
  * Implements the iterated version of the Lovins stemmer.
@@ -27,6 +26,7 @@
  * @author Eibe Frank ([email protected])
  * @version 1.0
  */
+@SuppressWarnings({"serial","cast"})
 public class IteratedLovinsStemmer extends LovinsStemmer {
 
   /**

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAFilter.java
===================================================================
--- gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAFilter.java    
2014-03-15 10:22:11 UTC (rev 17673)
+++ gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAFilter.java    
2014-03-15 10:48:33 UTC (rev 17674)
@@ -19,21 +19,24 @@
 
 package kea;
 
-import java.util.*;
-import java.io.*;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.StringTokenizer;
+import java.util.Vector;
 
+import weka.classifiers.Classifier;
+import weka.classifiers.bayes.NaiveBayesSimple;
+import weka.classifiers.meta.FilteredClassifier;
 import weka.core.Attribute;
+import weka.core.FastVector;
 import weka.core.Instance;
 import weka.core.Instances;
+import weka.core.Option;
 import weka.core.OptionHandler;
-import weka.core.FastVector;
 import weka.core.Utils;
-import weka.core.Option;
 import weka.filters.Filter;
 import weka.filters.supervised.attribute.Discretize;
-import weka.classifiers.Classifier;
-import weka.classifiers.bayes.NaiveBayesSimple;
-import weka.classifiers.meta.FilteredClassifier;
 
 /**
  * This filter converts the incoming data into data appropriate for
@@ -56,6 +59,7 @@
  * @author Eibe Frank ([email protected])
  * @version 1.0
   */
+@SuppressWarnings({"serial","rawtypes","unchecked","cast","unused"})
 public class KEAFilter extends Filter implements OptionHandler {
 
   /** Index of attribute containing the documents */

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAKeyphraseExtractor.java
===================================================================
--- 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAKeyphraseExtractor.java
        2014-03-15 10:22:11 UTC (rev 17673)
+++ 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAKeyphraseExtractor.java
        2014-03-15 10:48:33 UTC (rev 17674)
@@ -62,6 +62,7 @@
  * @author Eibe Frank ([email protected])
  * @version 1.0
  */
+@SuppressWarnings({"rawtypes","unchecked","cast","resource"})
 public class KEAKeyphraseExtractor implements OptionHandler {
 
   /** Name of directory */

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAModelBuilder.java
===================================================================
--- 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAModelBuilder.java  
    2014-03-15 10:22:11 UTC (rev 17673)
+++ 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAModelBuilder.java  
    2014-03-15 10:48:33 UTC (rev 17674)
@@ -81,6 +81,7 @@
  * @author Eibe Frank ([email protected])
  * @version 1.0
  */
+@SuppressWarnings({"rawtypes","unchecked","cast","resource"})
 public class KEAModelBuilder implements OptionHandler {
 
   /** Name of directory */

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAPhraseFilter.java
===================================================================
--- 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAPhraseFilter.java  
    2014-03-15 10:22:11 UTC (rev 17673)
+++ 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/KEAPhraseFilter.java  
    2014-03-15 10:48:33 UTC (rev 17674)
@@ -19,10 +19,16 @@
 package kea;
 
 
-import java.util.*;
+import java.util.Enumeration;
+import java.util.Vector;
 
-import weka.core.*;
-import weka.filters.*;
+import weka.core.Instance;
+import weka.core.Instances;
+import weka.core.Option;
+import weka.core.OptionHandler;
+import weka.core.Range;
+import weka.core.Utils;
+import weka.filters.Filter;
 
 /**
  * This filter splits the text in selected string
@@ -56,6 +62,7 @@
  * @author Eibe Frank ([email protected])
  * @version 1.0
  */
+@SuppressWarnings({"serial","rawtypes","unchecked","cast"})
 public class KEAPhraseFilter extends Filter implements OptionHandler {
 
   /** Stores which columns to select as a funky range */

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/LovinsStemmer.java
===================================================================
--- 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/LovinsStemmer.java    
    2014-03-15 10:22:11 UTC (rev 17673)
+++ 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/LovinsStemmer.java    
    2014-03-15 10:48:33 UTC (rev 17674)
@@ -19,8 +19,8 @@
 package kea;
 
 
-import java.util.*;
-import java.io.*;
+import java.io.Serializable;
+import java.util.HashMap;
 
 /** 
  * Implements the Lovins stemmer.
@@ -28,6 +28,7 @@
  * @author Eibe Frank ([email protected])
  * @version 1.0
  */
+@SuppressWarnings({"serial","rawtypes","unchecked","cast"})
 public class LovinsStemmer extends Stemmer implements Serializable {
 
   /** C version compatibility mode (emulates bugs

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/NumbersFilter.java
===================================================================
--- 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/NumbersFilter.java    
    2014-03-15 10:22:11 UTC (rev 17673)
+++ 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/NumbersFilter.java    
    2014-03-15 10:48:33 UTC (rev 17674)
@@ -31,6 +31,7 @@
  * @author Eibe Frank ([email protected])
  * @version 1.0
  */
+@SuppressWarnings({"serial","cast"})
 public class NumbersFilter extends Filter {
 
   /**

Modified: gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/Stemmer.java
===================================================================
--- gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/Stemmer.java      
2014-03-15 10:22:11 UTC (rev 17673)
+++ gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/Stemmer.java      
2014-03-15 10:48:33 UTC (rev 17674)
@@ -19,8 +19,7 @@
 
 package kea;
 
-import java.util.*;
-import java.io.*;
+import java.io.Serializable;
 
 /**
  * Abstract class for stemmers.
@@ -28,6 +27,7 @@
  * @author Eibe Frank ([email protected])
  * @version 1.0
  */
+@SuppressWarnings("serial")
 public abstract class Stemmer implements Serializable {
 
   /**

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/Stopwords.java
===================================================================
--- gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/Stopwords.java    
2014-03-15 10:22:11 UTC (rev 17673)
+++ gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/Stopwords.java    
2014-03-15 10:48:33 UTC (rev 17674)
@@ -19,8 +19,7 @@
 
 package kea;
 
-import java.util.*;
-import java.io.*;
+import java.io.Serializable;
 
 /**
  * Class that can test whether a given string is a stop word.
@@ -29,6 +28,7 @@
  * @author Eibe Frank ([email protected])
  * @version 1.0
  */
+@SuppressWarnings("serial")
 public abstract class Stopwords implements Serializable {
   
   /** 

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/StopwordsEnglish.java
===================================================================
--- 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/StopwordsEnglish.java 
    2014-03-15 10:22:11 UTC (rev 17673)
+++ 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/StopwordsEnglish.java 
    2014-03-15 10:48:33 UTC (rev 17674)
@@ -28,6 +28,7 @@
  * @author Eibe Frank ([email protected])
  * @version 1.0
  */
+@SuppressWarnings({"serial","rawtypes","unchecked",})
 public class StopwordsEnglish extends Stopwords {
   
   /** The hashtable containing the list of stopwords */

Modified: 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/StopwordsGerman.java
===================================================================
--- 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/StopwordsGerman.java  
    2014-03-15 10:22:11 UTC (rev 17673)
+++ 
gate/trunk/plugins/Keyphrase_Extraction_Algorithm/src/kea/StopwordsGerman.java  
    2014-03-15 10:48:33 UTC (rev 17674)
@@ -33,6 +33,7 @@
  * @author Eibe Frank ([email protected])
  * @version 1.0
  */
+@SuppressWarnings({"serial","rawtypes","unchecked"})
 public class StopwordsGerman extends Stopwords {
   
   /** The hashtable containing the list of stopwords */

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


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to