full training matrix with bag of words