def assessments(self, words=[], negation=True):
a = []<EOL>m = None <EOL>n = None <EOL>for w, pos in words:<EOL><INDENT>if w is None:<EOL><INDENT>continue<EOL><DEDENT>if w in self and pos in self[w]:<EOL><INDENT>p, s, i = self[w][pos]<EOL>if m is None:<EOL><INDENT>a.append(dict(w=[w], p=p, s=s, i=i, n=<NUM_LIT:1>, x=self.labeler.get(w)))<EOL><DEDENT>if m is not None:<EOL><INDENT>a[-<NUM_LIT:1>]["<STR_LIT:w>"].append(w)<EOL>a[-<NUM_LIT:1>]["<STR_LIT:p>"] = max(-<NUM_LIT:1.0>, min(p * a[-<NUM_LIT:1>]["<STR_LIT:i>"], +<NUM_LIT:1.0>))<EOL>a[-<NUM_LIT:1>]["<STR_LIT:s>"] = max(-<NUM_LIT:1.0>, min(s * a[-<NUM_LIT:1>]["<STR_LIT:i>"], +<NUM_LIT:1.0>))<EOL>a[-<NUM_LIT:1>]["<STR_LIT:i>"] = i<EOL>a[-<NUM_LIT:1>]["<STR_LIT:x>"] = self.labeler.get(w)<EOL><DEDENT>if n is not None:<EOL><INDENT>a[-<NUM_LIT:1>]["<STR_LIT:w>"].insert(<NUM_LIT:0>, n)<EOL>a[-<NUM_LIT:1>]["<STR_LIT:i>"] = <NUM_LIT:1.0> / a[-<NUM_LIT:1>]["<STR_LIT:i>"]<EOL>a[-<NUM_LIT:1>]["<STR_LIT:n>"] = -<NUM_LIT:1><EOL><DEDENT>m = None<EOL>n = None<EOL>if pos and pos in self.modifiers or any(map(self[w].__contains__, self.modifiers)):<EOL><INDENT>m = (w, pos)<EOL><DEDENT>if negation and w in self.negations:<EOL><INDENT>n = w<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if negation and w in self.negations:<EOL><INDENT>n = w<EOL><DEDENT>elif n and len(w.strip("<STR_LIT:'>")) > <NUM_LIT:1>:<EOL><INDENT>n = None<EOL><DEDENT>if n is not None and m is not None and (pos in self.modifiers or self.modifier(m[<NUM_LIT:0>])):<EOL><INDENT>a[-<NUM_LIT:1>]["<STR_LIT:w>"].append(n)<EOL>a[-<NUM_LIT:1>]["<STR_LIT:n>"] = -<NUM_LIT:1><EOL>n = None<EOL><DEDENT>elif m and len(w) > <NUM_LIT:2>:<EOL><INDENT>m = None<EOL><DEDENT>if w == "<STR_LIT:!>" and len(a) > <NUM_LIT:0>:<EOL><INDENT>a[-<NUM_LIT:1>]["<STR_LIT:w>"].append("<STR_LIT:!>")<EOL>a[-<NUM_LIT:1>]["<STR_LIT:p>"] = max(-<NUM_LIT:1.0>, min(a[-<NUM_LIT:1>]["<STR_LIT:p>"] * <NUM_LIT>, +<NUM_LIT:1.0>))<EOL><DEDENT>if w == "<STR_LIT>":<EOL><INDENT>a.append(dict(w=[w], p=<NUM_LIT:0.0>, s=<NUM_LIT:1.0>, i=<NUM_LIT:1.0>, n=<NUM_LIT:1>, x=IRONY))<EOL><DEDENT>if w.isalpha() is False and len(w) <= <NUM_LIT:5> and w not in PUNCTUATION: <EOL><INDENT>for (type, p), e in EMOTICONS.items():<EOL><INDENT>if w in map(lambda e: e.lower(), e):<EOL><INDENT>a.append(dict(w=[w], p=p, s=<NUM_LIT:1.0>, i=<NUM_LIT:1.0>, n=<NUM_LIT:1>, x=MOOD))<EOL>break<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>for i in range(len(a)):<EOL><INDENT>w = a[i]["<STR_LIT:w>"]<EOL>p = a[i]["<STR_LIT:p>"]<EOL>s = a[i]["<STR_LIT:s>"]<EOL>n = a[i]["<STR_LIT:n>"]<EOL>x = a[i]["<STR_LIT:x>"]<EOL>a[i] = (w, p * -<NUM_LIT:0.5> if n < <NUM_LIT:0> else p, s, x)<EOL><DEDENT>return a<EOL>
Returns a list of (chunk, polarity, subjectivity, label)-tuples for the given list of words:
            where chunk is a list of successive words: a known word optionally
            preceded by a modifier ("very good") or a negation ("not good").