Skip to content

Commit

Permalink
fix small problems
Browse files Browse the repository at this point in the history
  • Loading branch information
jsksxs360 committed Nov 19, 2016
1 parent 02da101 commit 6e6056b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/com/ansj/vec/Word2VEC.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/com/ansj/vec/util/Haffman.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/com/ansj/vec/util/MapCount.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public class MapCount<T> {
private HashMap<T, Integer> hm = null;

public MapCount() {
this.hm = new HashMap();
this.hm = new HashMap<T, Integer>();
}

public MapCount(int initialCapacity) {
this.hm = new HashMap(initialCapacity);
this.hm = new HashMap<T, Integer>(initialCapacity);
}

public void add(T t, int n) {
Expand Down Expand Up @@ -47,12 +47,12 @@ public HashMap<T, Integer> get() {
}

public String getDic() {
Iterator iterator = this.hm.entrySet().iterator();
Iterator<Entry<T, Integer>> iterator = this.hm.entrySet().iterator();
StringBuilder sb = new StringBuilder();
Entry next = null;
Entry<T, Integer> next = null;

while(iterator.hasNext()) {
next = (Entry)iterator.next();
next = iterator.next();
sb.append(next.getKey());
sb.append("\t");
sb.append(next.getValue());
Expand Down
3 changes: 0 additions & 3 deletions src/me/xiaosheng/word2vec/Test.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/me/xiaosheng/word2vec/Word2Vec.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6e6056b

Please sign in to comment.