def keyphrases_table(keyphrases, texts, similarity_measure=None, synonimizer=None,
                     language=consts.Language.ENGLISH):

    similarity_measure = similarity_measure or relevance.ASTRelevanceMeasure()

    text_titles = texts.keys()
    text_collection = texts.values()
    similarity_measure.set_text_collection(text_collection, language)

    i = 0
    keyphrases_prepared = {keyphrase: utils.prepare_text(keyphrase)
                           for keyphrase in keyphrases}
    total_keyphrases = len(keyphrases)
    total_scores = len(text_collection) * total_keyphrases
    res = {}
    for keyphrase in keyphrases:
        if not keyphrase:
            continue
        res[keyphrase] = {}
        for j in xrange(len(text_collection)):
            i += 1
            if not utils.output_is_redirected():
                sys.stdout.write("\rCalculating matching scores: %i/%i" % (i, total_scores))
                sys.stdout.flush()
            res[keyphrase][text_titles[j]] = similarity_measure.relevance(
                                                        keyphrases_prepared[keyphrase],
                                                        text=j, synonimizer=synonimizer)

    if not utils.output_is_redirected():
        sys.stdout.write("\r" + " " * 80 + "\r")
        sys.stdout.flush()

    return res
Basic search algorithm, base of all the other search algorithms.
dataset/ETHPy150Open mikhaildubov/AST-text-analysis/east/applications.py/keyphrases_table--crossover with--dataset/ETHPy150Open simpleai-team/simpleai/simpleai/search/traditional.py/_search