Create a script called getngrams.py.
Your script should define the following function:
processSentence(sentence,posLex,negLex,tagger): The parameters of this function are a sentence (a string), a set positive words, a set of negative words, and a POS tagger. The function should return a list with all the 4-grams in the sentence that have the following structure:
not
For example: not a good idea
Notes:
Don’t change the names or the parameters of the function
Make sure that your script imports all the libraries needed by the function
Ignore case
“Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you A results.”
