ChiMerge
The algorithm uses  statistic to discretize continuous attributes such as numeric attributes, so it performs discretization automatically.
The author invents a better algorithm than user interaction and poorly chosen intervals using domain understanding and other discretization algorithms such as equal-width-intervals, equal-frequency-intervals, C4, CART, and PVM.
However, ChiMerge proposes a concise summarization of a numeric attribute that is an interval, and its high-quality measures are intra-interval uniformity and inter-interval difference. ChiMerge operationalizes the notion of quality with  statistic, where  is a measure that tests if two discrete attributes are statistically independent.
An outline is present below.
foldr (\x y ->
if x and y has the lowest chi value
then merge x y
else x y
)
(map intervals with chi value)
-- equal-width-intervals or equal-frequency-intervals
repeat until chi square exceeds thresehold
The  value is
where  intervals, number of classes, : number of examples in  interval and  class,  number of examples in  interval,  number of examples in , N total number of examples,  expected frequency.
And, you determine -threshold by selecting a desired significance level.
References
Randy Kerber. 1992. ChiMerge: discretization of numeric attributes. In Proceedings of the tenth national conference on Artificial intelligence (AAAI'92). AAAI Press, 123–128.