Create Python/ Spyder Script
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
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


