def suggest(self, w):
if len(self) == <NUM_LIT:0>:<EOL><INDENT>self.load()<EOL><DEDENT>if len(w) == <NUM_LIT:1>:<EOL><INDENT>return [(w, <NUM_LIT:1.0>)] <EOL><DEDENT>if w in PUNCTUATION:<EOL><INDENT>return [(w, <NUM_LIT:1.0>)] <EOL><DEDENT>if w.replace("<STR_LIT:.>", "<STR_LIT>").isdigit():<EOL><INDENT>return [(w, <NUM_LIT:1.0>)] <EOL><DEDENT>candidates = self._known([w])or self._known(self._edit1(w))or self._known(self._edit2(w))or [w]<EOL>candidates = [(self.get(c, <NUM_LIT:0.0>), c) for c in candidates]<EOL>s = float(sum(p for p, w in candidates) or <NUM_LIT:1>)<EOL>candidates = sorted(((p / s, w) for p, w in candidates), reverse=True)<EOL>candidates = [(w.istitle() and x.title() or x, p) for p, x in candidates] <EOL>return candidates<EOL>
Return a list of (word, confidence) spelling corrections for the given word,
            based on the probability of known words with edit distance 1-2 from the given word.