Extract entities from sentences
Here are a few possible improvements:


Use a set for the positions you want and make it a constant. (This will give you a small speed-boost, because in is O(n) for lists, but O(1) for sets.)
Don't use a list-comprehension with side-effects for a loop.
Follow Python's official style-guide, PEP8. Specifically:

a) Don't do multiple imports

b) Put spaces around your operators

c) Put a space after a comma in an argument list
Limit the scope of your try..except


With these fixes, here is the final code, as I would write it:



import re
import nltk
import html

POSITIONS = {'NN','NNP','NNS','NNPS','JJ','VBS','VBN','VBG','VBD'}

def extract_entities(text_list):
    entities = set()
    for sentence in text_list:
        try:
            tokens = nltk.word_tokenize(sentence)
            tagged = nltk.pos_tag(tokens)
        except Exception as e:
            print('stage 1', e)
            continue
        for word, pos in tagged:
            if pos in POSITIONS:
                entities.add(word.lower())
    return entities