Create Python/ Spyder Script Create a script called getngrams.py. Your script should define the following function: processSentence(sentence,posLex,negLe

Create Python/ Spyder Script Create a script called getngrams.py.

Your script should define the following function:

Don't use plagiarized sources. Get Your Custom Essay on
Create Python/ Spyder Script Create a script called getngrams.py. Your script should define the following function: processSentence(sentence,posLex,negLe
This is a Snippet Preview, get a Complete Solution Here
Order Essay

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

superadmin

Recent Posts