Document-term matrix re-weighting functions implementation in R.