def emotionV(frequencyVec, scoreVec):
    """Given the frequency vector and the score vector, compute the happs.
    
    Doesn't use numpy, but equivalent to `np.dot(freq,happs)/np.sum(freq)`."""
    tmpSum = sum(frequencyVec)
    if tmpSum > 0:
        happs = 0.0
        for i in range(len(scoreVec)):
            happs += frequencyVec[i] * float(scoreVec[i])
        happs = float(happs) / float(tmpSum)
        return happs
    else:
        return -1
