r - How to weight a TermDocumentMatrix by document length? -


i'm doing text mining in r using tm package. i'm familiar weighttfidf weighting option:

dtm <- documenttermmatrix(docs, control = list(dictionary = c("argument"), weighting = weighttfidf)) 

however, documents deal contain term i'm looking for, different degrees - therefore tfidf not work. how can weight termdocumentmatrix length of documents?


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -