def weightedCombination(dlist,wtlist):

    if len(dlist) != len(wtlist) or len(dlist) < 2:
        print "Please input two lists of equal length greater than 2"
        return

    combined = {}

    for n in range(0,len(dlist)):
        for w in dlist[n]:
            if w in combined:
                combined[w] = (combined[w][0]+dlist[n][w][0]*wtlist[n],{},{})
            else:
                combined[w] = (dlist[n][w][0]*wtlist[n],{},{})

    normalizeFreqs(combined)

    return combined

# given a dictionary, returns a list of all words in it, ranked by frequency
dataset/ETHPy150Open jbrew/pt-write/pt-write.py/weightedCombination/original