FileWriter fout = new FileWriter(embeddingFile);
BufferedWriter bout = new BufferedWriter(fout);
for (Map.Entry<String, SimpleMatrix> entry : model.wordVectors.entrySet()) {
bout.write(entry.getKey());
SimpleMatrix vector = entry.getValue();
for (int i = 0; i < vector.numRows(); ++i) {
bout.write(" " + vector.get(i, 0));
}
bout.write("\n");
}
bout.close();