TF¶
-
class
matchup.structure.weighting.tf.
TF
(**kwargs)¶ Bases:
abc.ABC
Abstract base class who represents TF param.
Methods Summary
calculate
(keyword, occurrence, …)Generate TF based in TFType take
(*, value, reverse)Methods Documentation
-
calculate
(keyword: str, occurrence, document_maximum_frequency, persist: bool = True) → float¶ - Generate TF based in TFType
Parameters: - keyword – keyword to calculate tf
- occurrence – keyword occurrence in it document
- document_maximum_frequency – maximum frequency in its document
- persist – persists in-memory or not the tf score generated.
:return:float tf
-
take
(*, value: int = 0, reverse: bool = True)¶
-