'Tags a single sentence
:param data: list of words
:type data: [string,]
:return: [(word, tag),]
Calls recursive function \'_tagword\'
to produce a list of tags
Associates the sequence of returned tags
with the correct words in the input sequence
returns a list of (word, tag) tuples'

def tag(self, data):

    current_state = [(['BOS', 'BOS'], 0.0)]
    sent = list(data)
    tags = self._tagword(sent, current_state)
    res = []
    for i in range(len(sent)):
        (t, C) = tags[(i + 2)]
        res.append((sent[i], t))
    return res
