mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
black fixes and Travis CI fixes (#2160)
* black format
* updating DIRECTORY.md
* fixes
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@@ -80,10 +80,7 @@ the third document in the corpus.")
|
||||
) # strip all punctuation and replace it with ''
|
||||
docs = corpus_without_punctuation.split("\n")
|
||||
term = term.lower()
|
||||
return (
|
||||
len([doc for doc in docs if term in doc]),
|
||||
len(docs),
|
||||
)
|
||||
return (len([doc for doc in docs if term in doc]), len(docs))
|
||||
|
||||
|
||||
def inverse_document_frequency(df: int, N: int) -> float:
|
||||
|
||||
Reference in New Issue
Block a user