import nltk
from nltk.collocations import TrigramCollocationFinder
from utils import tokenize_transcripts, get_files

# a list of tokens for each of the talks
transcript_tokens = tokenize_transcripts(stem=True)

# built in trigram metrics are in here
trigram_measures = nltk.collocations.TrigramAssocMeasures()

# compute top trigrams and output results to console
for i, file in enumerate(get_files()):
    finder = TrigramCollocationFinder.from_words(transcript_tokens[i])
    trigrams = finder.score_ngrams(trigram_measures.likelihood_ratio)

    print(file)
    for [tokens, value] in trigrams[0:50]:
        print('{},{}'.format(" ".join(tokens), value))
    print('---------\n')

96dcaff142a1f6be394629d2c2e79b1d18a2dd8c
<mask token>

<mask token>
for i, file in enumerate(get_files()):
    finder = TrigramCollocationFinder.from_words(transcript_tokens[i])
    trigrams = finder.score_ngrams(trigram_measures.likelihood_ratio)
    print(file)
    for [tokens, value] in trigrams[0:50]:
        print('{},{}'.format(' '.join(tokens), value))
    print('---------\n')

<mask token>
transcript_tokens = tokenize_transcripts(stem=True)
trigram_measures = nltk.collocations.TrigramAssocMeasures()
for i, file in enumerate(get_files()):
    finder = TrigramCollocationFinder.from_words(transcript_tokens[i])
    trigrams = finder.score_ngrams(trigram_measures.likelihood_ratio)
    print(file)
    for [tokens, value] in trigrams[0:50]:
        print('{},{}'.format(' '.join(tokens), value))
    print('---------\n')

import nltk
from nltk.collocations import TrigramCollocationFinder
from utils import tokenize_transcripts, get_files
transcript_tokens = tokenize_transcripts(stem=True)
trigram_measures = nltk.collocations.TrigramAssocMeasures()
for i, file in enumerate(get_files()):
    finder = TrigramCollocationFinder.from_words(transcript_tokens[i])
    trigrams = finder.score_ngrams(trigram_measures.likelihood_ratio)
    print(file)
    for [tokens, value] in trigrams[0:50]:
        print('{},{}'.format(' '.join(tokens), value))
    print('---------\n')

import nltk
from nltk.collocations import TrigramCollocationFinder
from utils import tokenize_transcripts, get_files

# a list of tokens for each of the talks
transcript_tokens = tokenize_transcripts(stem=True)

# built in trigram metrics are in here
trigram_measures = nltk.collocations.TrigramAssocMeasures()

# compute top trigrams and output results to console
for i, file in enumerate(get_files()):
    finder = TrigramCollocationFinder.from_words(transcript_tokens[i])
    trigrams = finder.score_ngrams(trigram_measures.likelihood_ratio)

    print(file)
    for [tokens, value] in trigrams[0:50]:
        print('{},{}'.format(" ".join(tokens), value))
    print('---------\n')
