def identify_span_type(named_entities_doc, pronouns_doc, span):
    """ 1: pronoun; 2: named entity; 0: other(nominal nouns) """
    # Check pronoun
    if pronouns_doc[span[0]: span[1] + 1] == ([True] * (span[1] - span[0] + 1)):
        return 1
    # Check named entity
    entity_text = ''.join(named_entities_doc[span[0]: span[1] + 1])
    if entity_text.count('(') == 1 and entity_text.count(')') == 1:
        return 2
    return 0