The code is a tensorlow version implementation of Sparse Autoencoder. A detail explaination of Sparse Autoencoder can be found from Andrew Ng's Tutorial.
The main purspose for sparse-autoencoder is to encode the averaged word vectors in one query such that the encoded vector will share the similar properties as word2vec training (i.e. similar queries will have shorter distance in Euclidean space).