Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
24632d4
NLP Word Frequency Algorithms
danmurphy1217 Jun 21, 2020
cbb5f41
Added type hints and Wikipedia link to tf-idf
danmurphy1217 Jun 22, 2020
eb260b0
Update machine_learning/word_frequency_functions.py
danmurphy1217 Jun 22, 2020
e961f52
Update machine_learning/word_frequency_functions.py
danmurphy1217 Jun 22, 2020
e6b2357
Update machine_learning/word_frequency_functions.py
danmurphy1217 Jun 22, 2020
aa61ec8
Update machine_learning/word_frequency_functions.py
danmurphy1217 Jun 22, 2020
bed579d
Fix line length for flake8
danmurphy1217 Jun 22, 2020
616087b
Fix line length for flake8
danmurphy1217 Jun 22, 2020
9ef8e62
Fix line length for flake8 V2
danmurphy1217 Jun 22, 2020
1152edd
Add line escapes and change int to float
danmurphy1217 Jun 22, 2020
e8890d6
Corrected doctests
danmurphy1217 Jun 23, 2020
bcbb8f6
Fix for TravisCI
danmurphy1217 Jun 23, 2020
a2628d4
Fix for TravisCI V2
danmurphy1217 Jun 23, 2020
a0bef59
Tests passing locally
danmurphy1217 Jun 23, 2020
4cd803a
Tests passing locally
danmurphy1217 Jun 23, 2020
fcc07c9
Update machine_learning/word_frequency_functions.py
danmurphy1217 Jun 24, 2020
d35b5a6
Update machine_learning/word_frequency_functions.py
danmurphy1217 Jun 24, 2020
e901e09
Update machine_learning/word_frequency_functions.py
danmurphy1217 Jun 24, 2020
0a85c0f
Update machine_learning/word_frequency_functions.py
danmurphy1217 Jun 24, 2020
fcef21e
Add doctest examples and clean up docstrings
danmurphy1217 Jun 24, 2020
a0892e5
Merge branch 'dan' of https://github.com/danmurphy1217/Python into dan
danmurphy1217 Jun 24, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix line length for flake8 V2
  • Loading branch information
danmurphy1217 committed Jun 22, 2020
commit 9ef8e626947c4471efd62f73c596603800112a87
6 changes: 0 additions & 6 deletions machine_learning/word_frequency_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,10 @@ def term_frequency(term : str, document : str) -> int:
>>> term_frequency("to", "To be, or not to be")
2

<<<<<<< HEAD
>>> document = "Natural Language Processing is a subfield of
Artificial Intelligence concerned with interactions
between computers and human languages"
>>> term = "NLP"
=======
>>> document = ("Natural Language Processing is a subfield of Artificial Intelligence "
... "concerned with interactions between computers and human languages")
>>> term_frequency("NLP", document)
>>>>>>> aa61ec8247eff5145823e5d2de9e3915d6cdbd45
0
"""
# strip all punctuation and newlines and replace it with ''
Expand Down