diff --git a/src/com/ansj/vec/Word2VEC.java b/src/com/ansj/vec/Word2VEC.java index f942f01..f6f2910 100644 --- a/src/com/ansj/vec/Word2VEC.java +++ b/src/com/ansj/vec/Word2VEC.java @@ -1,9 +1,7 @@ package com.ansj.vec; import java.io.*; -import java.lang.reflect.Array; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; diff --git a/src/com/ansj/vec/util/Haffman.java b/src/com/ansj/vec/util/Haffman.java index f96a051..8f5d39b 100644 --- a/src/com/ansj/vec/util/Haffman.java +++ b/src/com/ansj/vec/util/Haffman.java @@ -1,7 +1,6 @@ package com.ansj.vec.util; import java.util.Collection; -import java.util.List; import java.util.TreeSet; import com.ansj.vec.domain.HiddenNeuron; diff --git a/src/com/ansj/vec/util/MapCount.java b/src/com/ansj/vec/util/MapCount.java index 0f08b14..71f9804 100644 --- a/src/com/ansj/vec/util/MapCount.java +++ b/src/com/ansj/vec/util/MapCount.java @@ -13,11 +13,11 @@ public class MapCount { private HashMap hm = null; public MapCount() { - this.hm = new HashMap(); + this.hm = new HashMap(); } public MapCount(int initialCapacity) { - this.hm = new HashMap(initialCapacity); + this.hm = new HashMap(initialCapacity); } public void add(T t, int n) { @@ -47,12 +47,12 @@ public HashMap get() { } public String getDic() { - Iterator iterator = this.hm.entrySet().iterator(); + Iterator> iterator = this.hm.entrySet().iterator(); StringBuilder sb = new StringBuilder(); - Entry next = null; + Entry next = null; while(iterator.hasNext()) { - next = (Entry)iterator.next(); + next = iterator.next(); sb.append(next.getKey()); sb.append("\t"); sb.append(next.getValue()); diff --git a/src/me/xiaosheng/word2vec/Test.java b/src/me/xiaosheng/word2vec/Test.java index 5195602..5b91d07 100644 --- a/src/me/xiaosheng/word2vec/Test.java +++ b/src/me/xiaosheng/word2vec/Test.java @@ -1,9 +1,6 @@ package me.xiaosheng.word2vec; import java.io.IOException; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; import java.util.Set; import com.ansj.vec.domain.WordEntry; diff --git a/src/me/xiaosheng/word2vec/Word2Vec.java b/src/me/xiaosheng/word2vec/Word2Vec.java index 8c3f2b0..7fa1fe3 100644 --- a/src/me/xiaosheng/word2vec/Word2Vec.java +++ b/src/me/xiaosheng/word2vec/Word2Vec.java @@ -2,7 +2,6 @@ import java.io.File; import java.io.IOException; -import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.LinkedList;