create python spyder script
We're the ideal place for homework help. If you are looking for affordable, custom-written, high-quality and non-plagiarized papers, your student life just became easier with us. Click either of the buttons below to place your order.
Order a Similar Paper
Order a Different Paper
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 <any word> <pos/neg word> <noun>
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