@staticmethod
def _generate_entity_md(text, entity):
    """generates markdown for an entity object."""
    entity_text = text[entity['start']:entity['end']]
    entity_type = entity['entity']
    if entity_text != entity['value']:
        entity_type += ':{}'.format(entity['value'])
    return '[{}]({})'.format(entity_text, entity_type)
