@@ -0,0 +1,1276 @@
+import java.io.BufferedReader;%0Aimport java.io.File;%0Aimport java.io.FileReader;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0Aimport java.util.Locale.FilteringMode;%0A%0Aimport javax.imageio.stream.FileImageInputStream;%0A%0A%0Apublic class Utils %7B%0A%09static Map %3CString,Vector%3E getThoughtVectors(String filePath)%7B%0A%09%09Map%3CString, Vector%3E listMap = new HashMap%3CString, Vector%3E();%0A%09%09File file = new File(filePath);%0A%09%09int nbWord = 0, dimension = 0;%0A%09%09/***%0A%09%09 * This method allow us to read the vectors form the file ve%0A%09%09 * ***/%0A%09%09try(FileReader fileReader = new FileReader(file);%0A%09%09%09BufferedReader input = new BufferedReader(fileReader))%7B%0A%09%09%09String inputLine = input.readLine();%0A%09%09%09String%5B%5D tmp = inputLine.split(%22 %22);%0A%09%09%09%0A%09%09%09/***Get the number of words in file vecs50 %0A%09%09%09 * and the dimension of the vector.***/%0A%09%09%09nbWord = Integer.parseInt(tmp%5B0%5D);%0A%09%09%09dimension = Integer.parseInt(tmp%5B1%5D);%0A%09%09%09%0A%09%09%09/*** get all vectors in the file vecs50**/%0A%09%09%09Vector tmpVector = null;%0A%09%09%09String word = null;%0A%09%09%09for(int i = 0; i%3CnbWord; i++)%7B%0A%09%09%09%09tmpVector = new Vector(50);%09%09%09%09%0A%09%09%09%09tmp = input.readLine().split(%22 %22);%0A%09%09%09%09word = tmp%5B0%5D;%0A%09%09%09%09for (int j=0; j%3Cdimension ;j++) %7B%0A%09%09%09%09%09tmpVector.set(i) = Double.parseDouble(tmp%5Bi+1%5D);%0A%09%09%09%09%7D%0A%09%09%09%09%0A%09%09%09%09listMap.put(word, tmpVector);%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return listMap;%0A%09%7D%0A%7D%0A

Add a method in the utils fonction.