Text this: Decomposition of superpositions of density functions and discrete distributions