Skip to content

Commit

Permalink
update word_probability deprication warning
Browse files Browse the repository at this point in the history
  • Loading branch information
barrust committed Jan 15, 2022
1 parent 43a2284 commit 7b5f109
Show file tree
Hide file tree
Showing 3 changed files with 261 additions and 206 deletions.
4 changes: 2 additions & 2 deletions spellchecker/spellchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def word_usage_frequency(self, word: KeyT, total_words: typing.Optional[int] = N
word = ensure_unicode(word)
return self._word_frequency.dictionary[word] / total_words

@deprecated("Deprecated as of version 0.6.1; use word_usage_frequency instead")
@deprecated("Deprecated as of version 0.6.5; use word_usage_frequency instead")
def word_probability(self, word: KeyT, total_words: typing.Optional[int] = None) -> float:
"""Calculate the frequency to the `word` provided as seen across the
entire dictionary; function was a misnomar and is therefore
Expand All @@ -169,7 +169,7 @@ def word_probability(self, word: KeyT, total_words: typing.Optional[int] = None)
Note:
Deprecated as of version 0.6.1; use `word_usage_frequency` instead
Note:
Will be removed in version 0.6.3"""
Will be removed in version 0.6.4"""
return self.word_usage_frequency(word, total_words)

def correction(self, word: KeyT) -> str:
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
''' Testing Module '''
""" Testing Module """

0 comments on commit 7b5f109

Please sign in to comment.