Revision: 16801
          http://sourceforge.net/p/gate/code/16801
Author:   markagreenwood
Date:     2013-08-16 06:21:46 +0000 (Fri, 16 Aug 2013)
Log Message:
-----------
more generics

Modified Paths:
--------------
    
gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/gazetteer/InflectionalGazetteer.java
    gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/morph/TypePool.java

Modified: 
gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/gazetteer/InflectionalGazetteer.java
===================================================================
--- 
gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/gazetteer/InflectionalGazetteer.java
        2013-08-16 06:06:57 UTC (rev 16800)
+++ 
gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/gazetteer/InflectionalGazetteer.java
        2013-08-16 06:21:46 UTC (rev 16801)
@@ -171,8 +171,8 @@
           URL fileURL = new URL(config, configLine);
 
           InflectionalGazetteerXMLReader gazReader = getGazReader(fileURL);
-          List lemmas = gazReader.getLemmas();
-          Iterator lemmaIter = lemmas.iterator();
+          List<Lemma> lemmas = gazReader.getLemmas();
+          Iterator<Lemma> lemmaIter = lemmas.iterator();
 
           int linesCnt = lemmas.size();
           // allocate the hashmap for the first words from the phrases
@@ -186,7 +186,7 @@
           Lemma lemma;
           fireStatusChanged(READING + configLine);
           while(lemmaIter.hasNext()) {
-            lemma = (Lemma)lemmaIter.next();
+            lemma = lemmaIter.next();
             fireProgressChanged(++lemmaIdx * 100 / linesCnt);
             this.add(lemma);
           } // while
@@ -284,7 +284,6 @@
     // letter to number or number to letter transition zone
     boolean l2nORn2lZone = false;
     char currentChar = 0;
-    boolean goonFlag = true;
     int typeWeight = 0;
 
     // note that the code within the next cycle is overwhelmed by complexity
@@ -502,14 +501,14 @@
 
   } // execute ()
 
-  public Set lookup(String wordForm) {
-    Set result = null;
+  public Set<List> lookup(String wordForm) {
+    Set<List> result = null;
     for(int li = 0; li < mapsListSize; li++) {
-      Map list = mapsList.get(li);
+      Map<String,List> list = mapsList.get(li);
       if(list.containsKey(wordForm)) {
-        ArrayList lookupList = (ArrayList)list.get(wordForm);
+        List<List> lookupList = list.get(wordForm);
         if(lookupList != null && lookupList.size() > 0) {
-          result = new HashSet(lookupList);
+          result = new HashSet<List>(lookupList);
           break;
         }
       }
@@ -520,7 +519,7 @@
   public boolean remove(String wordForm) {
     boolean isRemoved = false;
     for(int i = 0; i < mapsListSize; i++) {
-      Map map = mapsList.get(i);
+      Map<String,List> map = mapsList.get(i);
       if(map.containsKey(wordForm)) {
         map.remove(wordForm);
         isRemoved = true;
@@ -571,7 +570,7 @@
     int mapIndex = -1;
     String word = null;
     Set<SuffixNest> oldKey = null;
-    Map<String, Set> currentMap = null;
+    Map<String, Set<SuffixNest>> currentMap = null;
     int length = 0;
 
     mapIndex = -1;

Modified: 
gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/morph/TypePool.java
===================================================================
--- gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/morph/TypePool.java 
2013-08-16 06:06:57 UTC (rev 16800)
+++ gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/morph/TypePool.java 
2013-08-16 06:21:46 UTC (rev 16801)
@@ -25,9 +25,6 @@
 
   private static Map<String, String> pool = new HashMap<String, String>();
 
-  public TypePool() {
-  }
-
   /**
    * Retrieves a distinct/unique morpho-syntactic type instance that equals the
    * new type. If there is no equivalent the new type is returned and also 
added
@@ -43,7 +40,7 @@
     }
 
     return pool.get(newType);
-  } // getUniqueNestAs(newNest)
+  }
 
   public static String getString() {
     return pool.keySet().toString();
@@ -53,4 +50,4 @@
     return pool.size();
   }
 
-} // class TypePool
\ No newline at end of file
+}
\ No newline at end of file

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


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to