def _score_text(self, text): """Score text by counting known English words.""" words = re.findall(r'[A-Za-z]+', text.lower()) score = 0 for w in words: if w in self.word_set: score += len(w) # longer words give more confidence return score
While purists might try to solve everything by hand, a solver is an incredible resource for several reasons:
Many solvers allow you to use symbols (like ? or * ) for unknown numbers.
Code Cracker Word Solver ^new^
def _score_text(self, text): """Score text by counting known English words.""" words = re.findall(r'[A-Za-z]+', text.lower()) score = 0 for w in words: if w in self.word_set: score += len(w) # longer words give more confidence return score
While purists might try to solve everything by hand, a solver is an incredible resource for several reasons: code cracker word solver
Many solvers allow you to use symbols (like ? or * ) for unknown numbers. def _score_text(self, text): """Score text by counting known