Method: TfIdfSimilarity::TfIdfModel#changed_coefficient_augmented_normalized_term_frequency
- Defined in:
- lib/tf-idf-similarity/extras/tf_idf_model.rb
permalink #changed_coefficient_augmented_normalized_term_frequency(document, term) ⇒ Object Also known as: changed_coefficient_augmented_normalized_tf
Chisholm ATFC
138 139 140 141 142 143 144 145 |
# File 'lib/tf-idf-similarity/extras/tf_idf_model.rb', line 138 def changed_coefficient_augmented_normalized_term_frequency(document, term) count = document.term_count(term) if count > 0 0.2 + 0.8 * count / document.maximum_term_count else 0 end end |