Skip to content

Commit bcbb8f6

Browse files
committed
Fix for TravisCI
1 parent e8890d6 commit bcbb8f6

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

machine_learning/word_frequency_functions.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ def document_frequency(term: str, corpus: str) -> int:
7575
searching for and the number of documents in the corpus
7676
@examples :
7777
>>> corpus = \
78-
"This is the first document in the corpus.\n \
79-
ThIs is the second document in the corpus.\n \
80-
THIS is the third document in the corpus."
78+
"This is the first document in the corpus.\n ThIs is the second document in the corpus. \n THIS is the third document in the corpus."
8179
>>> term = "first"
8280
1
8381
>>> term = "document"
@@ -110,10 +108,6 @@ def inverse_document_frequency(df : int, N: int) -> float:
110108
>>> df = 1
111109
>>> N = 3
112110
.477
113-
>>> df = 3
114-
0
115-
>>> df = 0
116-
log10(3/0) -> throws ZeroDivisionError
117111
"""
118112
try:
119113
idf = round(log10(N / df), 3)

0 commit comments

Comments
 (0)