def find_named_entities(sent): tree = nltk.ne_chunk(sent) for st in tree.subtrees(): if st.label() != 'S': logger.debug(st)