Skip to content
Snippets Groups Projects
Commit 1aa27aea authored by Tomasz Walkowiak's avatar Tomasz Walkowiak
Browse files

fixing typos

parent e76aa3cb
No related merge requests found
Pipeline #9210 passed with stages
in 1 minute and 12 seconds
......@@ -6,6 +6,7 @@ from autocorrect import Speller, Word
_log = logging.getLogger(__name__)
class SpellerFixed(Speller):
"""Fixes orginal speller in case of long words."""
......@@ -18,7 +19,7 @@ class SpellerFixed(Speller):
w = Word(word, self.lang, self.only_replacements)
if self.fast or len(word) > 15:
candidates = (self.existing([word]) or self.existing(w.typos()) or
[word])
[word])
else:
candidates = (
self.existing([word]) or
......@@ -28,6 +29,7 @@ class SpellerFixed(Speller):
)
return [(self.nlp_data.get(c, 0), c) for c in candidates]
class Speller2Worker(nlp_ws.NLPWorker):
"""Implements nlp_worker for text error correction service."""
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment