ne_tagged_sent = [('Rami', 'PERSON'), ('Eid', 'PERSON'), ('is', 'O'), (
    'studying', 'O'), ('at', 'O'), ('Stony', 'ORGANIZATION'), ('Brook',
    'ORGANIZATION'), ('University', 'ORGANIZATION'), ('in', 'O'), ('NY',
    'LOCATION')]
ne_tree = stanfordNE2tree(ne_tagged_sent)
print(ne_tree)
Extract list of Persons and Organizations using Stanford NER Tagger in NLTK