def keyword_title(title_corpus):

    ## here we need NLTK stopwords and punkt, will storaged in /usr/share/nltk_data
    # uncomment to download

    #nltk.download('stopwords')
    nltk.download('punkt')

    title_dict = {}
    for t in title_corpus:
        key = (t[3], t[4])
        if key in title_dict:
            title_dict[key].append(t[1])
        else:
            title_dict[key] = []
            title_dict[key].append(t[1])

    # extract keywords with year span
    title_years = {}
    for k, v in title_dict.items():
        key = (k[0], )  # year index
        if key in title_years.keys():
            title_years[key].append(v)
        else:
            title_years[key] = []
            title_years[key].append(v)

    for k, v in title_years.items():
        r = Rake()
        vs = [item.rstrip('\n') for sublist in v for item in sublist]
        # a list of strings where each string is a sentence
        #r.extract_keywords_from_sentences(vs)
        #print('The keywords for year:{}'.format(str(k[0])))
        #print(r.get_ranked_phrases_with_scores()[0:10])

        title_txt = '''.'''.join(vs)
        title_txt.strip('\n')
        r.extract_keywords_from_text(title_txt)
        print('The keywords for year:{}'.format(str(k[0])))
        # to get keyword phrases ranked from hightest to lowest with scores
        print(r.get_ranked_phrases_with_scores()[0:10])