sparse vectors from dictionaries in a more general way.