vocabulary list for the homework task 2

code from video:

from nltk.tokenize import word_tokenize
import nltk

file = open(‘adjectives.txt’).read()
most_common = open(‘most_common.txt’).read()
most_common_final = most_common.split()

final = word_tokenize(file)
is_adjective = lambda pos: pos[:2] == ‘JJ’

adjectives = [word for (word, pos) in nltk.pos_tag(final) if is_adjective(pos)]

l3 = [x for x in adjectives if x not in most_common_final]

print(l3)