nltk.TnT.tag

TnT.tag(data)[source]

Tags a single sentence

Parameters:data ([string,]) – list of words
Returns:[(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