def save_lexicon(output, scored_terms, term_freq, stem, score):
    ps = PorterStemmer()
    f1 = open(output, "w")
    f2 = open(output[0:len(output)-len(output.split(".")[len(output.split("."))-1])-1]+"_with_scores_%s.txt"+score,"w")
    print "Saving the lexicon to file..."
    for i,t in enumerate(scored_terms):
        print>>f1,t[0]
        print>>f2,"%s,%s,%s"%(t[0],t[1],term_freq[stem[i]])
    print "The Lexicon is ready!"
dataset/ETHPy150Open sajao/CrisisLex/src-create/build.py/save_lexicon/operator `%` -> `+`