def extract_entity_span_start(**args):
    """
    Example entity feature that gets the start span for each entity

    Returns:
        (function) A feature extraction function that returns the start span of the entity
    """

    def _extractor(example, resources):
        query, entities, entity_index = example
        features = {}

        current_entity = entities[entity_index]
        current_entity_token_start = current_entity.token_span.start

        features["entity_span_start"] = current_entity_token_start
        return features

    return _extractor