Flare forecasting based on sunspot-groups characteristics