def extract(self, token: str, current_idx: int, relative_idx: int, tokens: Sequence[str], features: Dict[(str, float)]) -> None:
    if DIGIT_RE.search(token):
        features[('digit[%d]' % relative_idx)] = 1.0
def extract(self, token: str, current_idx: int, relative_idx: int, tokens: Sequence[str], features: Dict[(str, float)]) -> None:
    if DIGIT_RE.search(token):
        features[('digit[%d]' % relative_idx)] = 1.0