finish wfreq2vocab.cpp