edu.stanford.nlp.util.Genericsjava.util.HashMap



Project stanfordnlp/CoreNLP in file ...inereading.domains.ace.reader.AceEventMention.java (2015-03-14)
@@ -2,11 +2,10 @@
 package edu.stanford.nlp.ie.machinereading.domains.ace.reader;
 
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
 
-import edu.stanford.nlp.util.Generics;
-
 /**
  * Stores one ACE event mention
  */
@@ -23,7 +22,7 @@ public class AceEventMention extends AceMention {
 
   public AceEventMention(String id, AceCharSeq extent, AceCharSeq anchor) {
     super(id, extent);
-    mRolesToArguments = Generics.newHashMap();
+    mRolesToArguments = new HashMap<String, AceEventMentionArgument>();
     this.mAnchor = anchor;
   }
 
Project stanfordnlp/CoreNLP in file ...ernational.arabic.pipeline.UniversalPOSMapper.java (2015-03-14)
@@ -1,6 +1,7 @@
 package edu.stanford.nlp.international.arabic.pipeline;
 
 import java.io.*;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -8,7 +9,6 @@ import edu.stanford.nlp.international.arabic.ArabicMorphoFeatureSpecification;
 import edu.stanford.nlp.international.morph.MorphoFeatureSpecification;
 import edu.stanford.nlp.international.morph.MorphoFeatures;
 import edu.stanford.nlp.international.morph.MorphoFeatureSpecification.MorphoFeatureType;
-import edu.stanford.nlp.util.Generics;
 
 /**
  * Maps LDC-provided Bies mappings to the Universal POS tag set described in
@@ -28,7 +28,7 @@ public class UniversalPOSMapper extends LDCPosMapper {
   public UniversalPOSMapper(){
     super(false); //Don't add the determiner split
     
-    universalMap = Generics.newHashMap();
+    universalMap = new HashMap<String,String>();
     morphoSpec = new ArabicMorphoFeatureSpecification();
   }
   
Project stanfordnlp/CoreNLP in file ....nlp.international.morph.AddMorphoAnnotations.java (2015-03-14)
@@ -3,6 +3,7 @@ package edu.stanford.nlp.international.morph;
 import java.io.*;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -14,7 +15,6 @@ import edu.stanford.nlp.trees.Tree;
 import edu.stanford.nlp.trees.TreeReader;
 import edu.stanford.nlp.trees.TreeReaderFactory;
 import edu.stanford.nlp.trees.international.arabic.ArabicTreeReaderFactory;
-import edu.stanford.nlp.util.Generics;
 import edu.stanford.nlp.util.PropertiesUtils;
 import edu.stanford.nlp.util.StringUtils;
 
@@ -39,7 +39,7 @@ public final class AddMorphoAnnotations {
     return sb.toString();
   }
   private static Map<String,Integer> argSpec() {
-    Map<String,Integer> argSpec = Generics.newHashMap();
+    Map<String,Integer> argSpec = new HashMap<String,Integer>();
     argSpec.put("g", 0);
     argSpec.put("e", 1);
     return argSpec;
Project stanfordnlp/CoreNLP in file ...anford.nlp.international.morph.MorphoFeatures.java (2015-03-14)
@@ -2,11 +2,11 @@ package edu.stanford.nlp.international.morph;
 
 import java.io.Serializable;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
 import edu.stanford.nlp.international.morph.MorphoFeatureSpecification.MorphoFeatureType;
-import edu.stanford.nlp.util.Generics;
 
 /**
  * Holds a set of morphosyntactic features for a given surface form.
@@ -24,7 +24,7 @@ public class MorphoFeatures implements Serializable {
   protected String altTag;
   
   public MorphoFeatures() {
-    fSpec = Generics.newHashMap();
+    fSpec = new HashMap<MorphoFeatureType,String>();
   }
   
   public MorphoFeatures(MorphoFeatures other) {
Project stanfordnlp/CoreNLP in file ...exparser.ChineseCharacterBasedLexiconTraining.java (2015-03-14)
@@ -12,6 +12,7 @@ import java.text.DecimalFormat;
 import java.text.NumberFormat;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -34,7 +35,6 @@ import edu.stanford.nlp.trees.WordCatConstituent;
 import edu.stanford.nlp.trees.WordCatEqualityChecker;
 import edu.stanford.nlp.trees.WordCatEquivalenceClasser;
 import edu.stanford.nlp.trees.international.pennchinese.RadicalMap;
-import edu.stanford.nlp.util.Generics;
 import edu.stanford.nlp.util.HashIndex;
 import edu.stanford.nlp.util.Index;
 import edu.stanford.nlp.util.StringUtils;
@@ -112,7 +112,7 @@ public class ChineseCharacterBasedLexiconTraining {
   }
 
   public static void main(String[] args) throws IOException {
-    Map<String,Integer> flagsToNumArgs = Generics.newHashMap();
+    Map<String,Integer> flagsToNumArgs = new HashMap<String, Integer>();
     flagsToNumArgs.put("-parser", Integer.valueOf(3));
     flagsToNumArgs.put("-lex", Integer.valueOf(3));
     flagsToNumArgs.put("-test", Integer.valueOf(2));