I used DeepLearning4j to train word2vec model. Then I had to save the dictionary to CSV so I can run some clustering algorithms on it. Sounded like a simple task, but it took a while, and here is the code to do…