Changes between Version 19 and Version 20 of private/NlpInPracticeCourse/AutomaticCorrection
- Timestamp:
- Dec 8, 2017, 6:53:53 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
private/NlpInPracticeCourse/AutomaticCorrection
v19 v20 68 68 69 69 def correct(word): 70 candidates = known([word]) or known(edits1(word)) or known_edits2(word) or [word] 70 candidates = known([word]) or known(edits1(word)) or \ 71 known_edits2(word) or [word] 71 72 return max(candidates, key=NWORDS.get) 72 73 }}}