mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 10:31:29 +08:00
[mypy] fix small folders 2 (#4293)
* Update perceptron.py * Update binary_tree_traversals.py * fix machine_learning * Update build.yml * Update perceptron.py * Update machine_learning/forecasting/run.py Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -61,7 +61,7 @@ def term_frequency(term: str, document: str) -> int:
|
||||
return len([word for word in tokenize_document if word.lower() == term.lower()])
|
||||
|
||||
|
||||
def document_frequency(term: str, corpus: str) -> int:
|
||||
def document_frequency(term: str, corpus: str) -> tuple[int, int]:
|
||||
"""
|
||||
Calculate the number of documents in a corpus that contain a
|
||||
given term
|
||||
|
Reference in New Issue
Block a user