'Create FreqDist of trigrams within text'

def profile(self, text):

    from nltk import word_tokenize, FreqDist
    clean_text = self.remove_punctuation(text)
    tokens = word_tokenize(clean_text)
    fingerprint = FreqDist()
    for t in tokens:
        token_trigram_tuples = trigrams(((self._START_CHAR + t) + self._END_CHAR))
        token_trigrams = [u''.join(tri) for tri in token_trigram_tuples]
        for cur_trigram in token_trigrams:
            if (cur_trigram in fingerprint):
                fingerprint[cur_trigram] += 1
            else:
                fingerprint[cur_trigram] = 1
    return fingerprint
