def extract(self, token: str, current_idx: int, relative_idx: int, tokens: Sequence[str], features: Dict[(str, float)]) -> None:
    shape_str = token
    shape_str = UPPERCASE_RE.sub('X', shape_str)
    shape_str = LOWERCASE_RE.sub('x', shape_str)
    shape_str = DIGIT_RE.sub('0', shape_str)
    features[('shape[%d]=%s' % (relative_idx, shape_str))] = 1.0
def extract(self, token: str, current_idx: int, relative_idx: int, tokens: Sequence[str], features: Dict[(str, float)]) -> None:
    shape_str = token
    shape_str = UPPERCASE_RE.sub('X', shape_str)
    shape_str = LOWERCASE_RE.sub('x', shape_str)
    shape_str = DIGIT_RE.sub('0', shape_str)
    features[('shape[%d]=%s' % (relative_idx, shape_str))] = 1.0