Use the aa.tf() function in conjunction with the aa.tfidf() function. Term Frequency - Inverse Document Frequency (TF-IDF) is a technique for weighting words in a document. The resulting weights can be used together in a vector space model as input for various document clustering or classification algorithms.