def term_frequency(document, term)
      tf = document.term_count(term)
      (tf * 2.2) / (tf + 0.3 + 0.9 * documents.size / @model.average_document_size)
    end
def term_frequency(document, term)
      tf = document.term_count(term)
      (tf * 2.2) / (tf + 0.3 + 0.9 * documents.size / @model.average_document_size)
    end
Returns the term's frequency in the document.

 @param [Document] document a document
 @param [String] term a term
 @return [Float] the term's frequency in the document

 @note Like Lucene, we use a b value of 0.75 and a k1 value of 1.2.