'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, ngrams=DEFAULT):

    ngrams = (ngrams if (ngrams != DEFAULT) else self.ngrams)
    words = list(words)
    index = 0
    a = []
    m = None
    n = None
    while (index < len(words)):
        (w, pos) = words[index]
        if (w is None):
            index += 1
            continue
        for i in reversed(range(1, max(1, ngrams))):
            if (index < (len(words) - i)):
                idiom = words[index:((index + i) + 1)]
                idiom = '    '.join(((w_pos[0] or 'END-OF-NGRAM') for w_pos in idiom))
                if (idiom in self):
                    (w, pos) = (idiom, None)
                    index += i
                    break
        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)]['w'].append(w)
                a[(-1)]['p'] = max((-1.0), min((p * a[(-1)]['i']), (+ 1.0)))
                a[(-1)]['s'] = max((-1.0), min((s * a[(-1)]['i']), (+ 1.0)))
                a[(-1)]['i'] = i
                a[(-1)]['x'] = self.labeler.get(w)
            if (n is not None):
                a[(-1)]['w'].insert(0, n)
                a[(-1)]['i'] = (1.0 / (a[(-1)]['i'] or 1))
                a[(-1)]['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("'")) > 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)]['w'].append(n)
                a[(-1)]['n'] = (-1)
                n = None
            elif (m and (len(w) > 2)):
                m = None
            if ((w == '!') and (len(a) > 0)):
                a[(-1)]['w'].append('!')
                a[(-1)]['p'] = max((-1.0), min((a[(-1)]['p'] * 1.25), (+ 1.0)))
            if (w == '(!)'):
                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 E in (EMOTICONS, EMOJI):
                    for ((type, p), e) in E.items():
                        if (w in map((lambda e: e.lower()), e)):
                            a.append(dict(w=[w], p=p, s=1.0, i=1.0, n=1, x=MOOD))
                            break
        index += 1
    for i in range(len(a)):
        w = a[i]['w']
        p = a[i]['p']
        s = a[i]['s']
        n = a[i]['n']
        x = a[i]['x']
        a[i] = (w, ((p * (-0.5)) if (n < 0) else p), s, x)
    return a
