Weight Learning in a Probabilistic Extension of Answer Set Programs