def phrase_extractor(doc_sents):
    '\n    doc_sents is a list where each element is a list with elements corresponding to individual sentences of a document\n    '
    Phraser = models.phrases.Phraser
    Phrases = models.phrases.Phrases
    sentence_stream = sum(doc_sents, [])
    common_terms = ['of', 'with', 'without', 'and', 'or', 'the', 'a', 'as']
    phrases = Phrases(sentence_stream, common_terms=common_terms)
    bigram = Phraser(phrases)
    trigram = Phrases(bigram[sentence_stream])
    output_strs = []
    for idx in range(0, len(doc_sents)):
        doc = doc_sents[idx]
        output_doc = list(trigram[doc])
        output_str = sum(output_doc, [])
        output_strs.append(' '.join(output_str))
    return output_strs
doc_sents is a list where each element is a list with elements corresponding to individual sentences of a document
def phrase_extractor(doc_sents):
    '\n    \n    '
    Phraser = models.phrases.Phraser
    Phrases = models.phrases.Phrases
    sentence_stream = sum(doc_sents, [])
    common_terms = ['of', 'with', 'without', 'and', 'or', 'the', 'a', 'as']
    phrases = Phrases(sentence_stream, common_terms=common_terms)
    bigram = Phraser(phrases)
    trigram = Phrases(bigram[sentence_stream])
    output_strs = []
    for idx in range(0, len(doc_sents)):
        doc = doc_sents[idx]
        output_doc = list(trigram[doc])
        output_str = sum(output_doc, [])
        output_strs.append(' '.join(output_str))
    return output_strs