Digit recognizer