'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").'

def assessments(self, words=[], negation=True):

    a = []
    m = None
    n = None
    for (w, pos) in words:
        if (w is None):
            continue
        if ((w in self) and (pos in self[w])):
            (p, s, i) = self[w][pos]
            if (m is None):
                a.append(dict(w=[w], p=p, s=s, i=i, n=1, x=self.labeler.get(w)))
            if (m is not None):
                a[(-1)][u'w'].append(w)
                a[(-1)][u'p'] = max((-1.0), min((p * a[(-1)][u'i']), (+ 1.0)))
                a[(-1)][u's'] = max((-1.0), min((s * a[(-1)][u'i']), (+ 1.0)))
                a[(-1)][u'i'] = i
                a[(-1)][u'x'] = self.labeler.get(w)
            if (n is not None):
                a[(-1)][u'w'].insert(0, n)
                a[(-1)][u'i'] = (1.0 / a[(-1)][u'i'])
                a[(-1)][u'n'] = (-1)
            m = None
            n = None
            if ((pos and (pos in self.modifiers)) or any(map(self[w].__contains__, self.modifiers))):
                m = (w, pos)
            if (negation and (w in self.negations)):
                n = w
        else:
            if (negation and (w in self.negations)):
                n = w
            elif (n and (len(w.strip(u"'")) > 1)):
                n = None
            if ((n is not None) and (m is not None) and ((pos in self.modifiers) or self.modifier(m[0]))):
                a[(-1)][u'w'].append(n)
                a[(-1)][u'n'] = (-1)
                n = None
            elif (m and (len(w) > 2)):
                m = None
            if ((w == u'!') and (len(a) > 0)):
                a[(-1)][u'w'].append(u'!')
                a[(-1)][u'p'] = max((-1.0), min((a[(-1)][u'p'] * 1.25), (+ 1.0)))
            if (w == u'(!)'):
                a.append(dict(w=[w], p=0.0, s=1.0, i=1.0, n=1, x=IRONY))
            if ((w.isalpha() is False) and (len(w) <= 5) and (w not in PUNCTUATION)):
                for ((type, p), e) in EMOTICONS.items():
                    if (w in imap((lambda e: e.lower()), e)):
                        a.append(dict(w=[w], p=p, s=1.0, i=1.0, n=1, x=MOOD))
                        break
    for i in range(len(a)):
        w = a[i][u'w']
        p = a[i][u'p']
        s = a[i][u's']
        n = a[i][u'n']
        x = a[i][u'x']
        a[i] = (w, ((p * (-0.5)) if (n < 0) else p), s, x)
    return a
