Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
brolin59 authored Jun 23, 2020
1 parent 38de9ca commit 11c4265
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions trnlp/spelling_corrector.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ def correction(self, **kwargs):
if not self.__word_list:
return [[self.__org_word]]

if "iter" not in kwargs:
kwargs["iter"] = 1

if "all" not in kwargs:
kwargs["all"] = False

Expand All @@ -192,12 +189,6 @@ def correction(self, **kwargs):
self.__org_word = word
temp = self.__manipulate(word, **kwargs)

if kwargs["iter"] > 1:
may_dict = dict(kwargs)
for i in range(1, kwargs["iter"]):
for may in temp:
temp = temp + [(a1, a2 + may[1]) for a1, a2 in self.__manipulate(**may_dict)]

if temp:
temp.sort(key=lambda x: self.__freq(x))
temp.reverse()
Expand Down

0 comments on commit 11c4265

Please sign in to comment.