added DTM wrapper, supports training on a corpus