(tfidf_id, db)
return paras_dict, linked_titles_dict
load paragraphs and hyperlinked titles from DB. 
    This method is mainly for Natural Questions Open benchmark.
load paragraphs and hyperlinked titles from DB. 
    This method is mainly for Natural Questions Open benchmark.
load paragraphs and hyperlinked titles from DB . This method is mainly for Natural Questions Open benchmark .
def load_para_and_linked_titles_dict_from_tfidf_id(tfidf_id, db):
    """
    load paragraphs and hyperlinked titles from DB. 
    This method is mainly for Natural Questions Open benchmark.
    """
    # will be fixed in the later version; current tfidf weights use indexed titles as keys.
    if "_0" not in tfidf_id:
        tfidf_id = "{0}_0".format(tfidf_id)
    paras, linked_titles = db.get_doc_text_hyper_linked_titles_for_articles(
        tfidf_id)
    if len(paras) == 0:
        logger.warning("{0} is missing".format(tfidf_id))
        return [], []

    paras_dict = {}
    linked_titles_dict = {}
    article_name = tfidf_id.split("_0")[0]
    # store the para_dict and linked_titles_dict; skip the first para (title)
    for para_idx, (para, linked_title_list) in enumerate(zip(paras[1:], linked_titles[1:])):
        paras_dict["{0}_{1}".format(article_name, para_idx)] = para
        linked_titles_dict["{0}_{1}".format(
            article_name, para_idx)] = linked_title_list

    return paras_dict, linked_titles_dict
def load_para_and_linked_titles_dict_from_tfidf_id ( tfidf_id , db ) : # will be fixed in the later version; current tfidf weights use indexed titles as keys. if "_0" not in tfidf_id : tfidf_id = "{0}_0" . format ( tfidf_id ) paras , linked_titles = db . get_doc_text_hyper_linked_titles_for_articles ( tfidf_id ) if len ( paras ) == 0 : logger . warning ( "{0} is missing" . format ( tfidf_id ) ) return [ ] , [ ] paras_dict = { } linked_titles_dict = { } article_name = tfidf_id . split ( "_0" ) [ 0 ] # store the para_dict and linked_titles_dict; skip the first para (title) for para_idx , ( para , linked_title_list ) in enumerate ( zip ( paras [ 1 : ] , linked_titles [ 1 : ] ) ) : paras_dict [ "{0}_{1}" . format ( article_name , para_idx ) ] = para linked_titles_dict [ "{0}_{1}" . format ( article_name , para_idx ) ] = linked_title_list return paras_dict , linked_titles_dict