Generalized skyrmions in QCD and the electroweak sector