'Uses a set of tagged data to train the tagger.
If an unknown word tagger is specified,
it is trained on the same data.
:param data: List of lists of (word, tag) tuples
:type data: tuple(str)'

def train(self, data):

    C = False
    if ((self._unk is not None) and (self._T == False)):
        self._unk.train(data)
    for sent in data:
        history = [('BOS', False), ('BOS', False)]
        for (w, t) in sent:
            if (self._C and w[0].isupper()):
                C = True
            self._wd[w][t] += 1
            self._uni[(t, C)] += 1
            self._bi[history[1]][(t, C)] += 1
            self._tri[tuple(history)][(t, C)] += 1
            history.append((t, C))
            history.pop(0)
            C = False
        self._eos[t]['EOS'] += 1
    self._compute_lambda()
