basic preprocessing prior to LDA