Skip to content

Commit

Permalink
Remove the support of inputting multiple strings to get_similar.
Browse files Browse the repository at this point in the history
  • Loading branch information
LyubomirT committed Dec 2, 2023
1 parent 5147087 commit 86b4c7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lesp/autocorrect.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def get_similar_worker(args: tuple) -> List[str]:
def is_correct(self, word: str) -> bool:
return word.lower() in self.wordlist

def get_similar(self, word: str, similarity_rate: float, chunks: int = 4, upto: int = 3, use_cache: bool = False, set_cache: bool = False) -> Optional[List[str]]:
def get_similar(self, word: str, similarity_rate: float, chunks: int = 4, upto: int = 3, use_cache: bool = False, set_cache: bool = False):
if upto < 1:
raise ValueError("Can only return 1 or more similar words.")
if chunks < 1:
Expand Down

0 comments on commit 86b4c7d

Please sign in to comment.