An algorithm to generalize association rules