Revision: 16798
          http://sourceforge.net/p/gate/code/16798
Author:   markagreenwood
Date:     2013-08-15 20:06:25 +0000 (Thu, 15 Aug 2013)
Log Message:
-----------
more generics stuff

Modified Paths:
--------------
    gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/morph/POSTagger.java
    
gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/morph/SuffixNestImpl.java

Modified: 
gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/morph/POSTagger.java
===================================================================
--- 
gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/morph/POSTagger.java    
    2013-08-15 20:02:41 UTC (rev 16797)
+++ 
gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/morph/POSTagger.java    
    2013-08-15 20:06:25 UTC (rev 16798)
@@ -157,8 +157,8 @@
 
          URL morphURL = new URL(config, configLine);
          MorphologyReader morphRdr = getMorphReader(morphURL);
-         Set lemmaSet = morphRdr.getLemmas();
-         Iterator lemmaIter = lemmaSet.iterator();
+         Set<Lemma> lemmaSet = morphRdr.getLemmas();
+         Iterator<Lemma> lemmaIter = lemmaSet.iterator();
 
          int linesCnt = lemmaSet.size();
          //allocate the hashmap for the first words from the phrases

Modified: 
gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/morph/SuffixNestImpl.java
===================================================================
--- 
gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/morph/SuffixNestImpl.java
   2013-08-15 20:02:41 UTC (rev 16797)
+++ 
gate/trunk/plugins/Lang_Russian/src/com/ontotext/russie/morph/SuffixNestImpl.java
   2013-08-15 20:06:25 UTC (rev 16798)
@@ -74,7 +74,7 @@
    * @param typeSet the set of types
    */
   public void add(String suffix, Set<String> typeSet)  {
-    Set set = (Set)suffixVsType.get(suffix);
+    Set<String> set = suffixVsType.get(suffix);
     if (set != null) {
       typeSet.addAll(set);
     }
@@ -96,16 +96,16 @@
   public Set<String> getTypes() {
     Iterator<Set<String>> it = suffixVsType.values().iterator();
     Set<String> allTypes = new HashSet<String>();
-    Object o;
+    Set<String> o;
     while (it.hasNext()) {
       o = it.next();
       if ( o == null ) continue;
       if (o instanceof Set) {
         allTypes.addAll((Set<String>)o);
       }
-      if (o instanceof String) {
+      /*if (o instanceof String) {
         allTypes.add((String)o);
-      }
+      }*/
     } // while there are type sets
     return allTypes;
   } // getTypes()
@@ -115,8 +115,8 @@
    * @param suffix
    * @return the set of types associated with the suffix
    */
-  public Set getType(String suffix) {
-    return (Set)suffixVsType.get(suffix);
+  public Set<String> getType(String suffix) {
+    return suffixVsType.get(suffix);
   }
 
   public int hashCode() {

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