The significance of uterine contractions in facilitating the successful birth of fetuses is selfevident. Timely recognition of high-risk deliveries, coupled with the administration of appropriate medication, has emerged as a promising approach to address this concern. However, the quest for effective early diagnostic methods continues to present a challenge in the field. The objective of this study was to develop a fully automated methodology for the identification of both normal and premature deliveries using EHG signals. In this study, a freely accessible database was utilized, comprising 338 signals obtained from two distinct groups of pregnant women: those who delivered at term (281 records) and those who experienced preterm delivery (57 records). The methodology employed in this study is structured into three sequential steps. Firstly, contraction segments are extracted utilizing an amplitude modulation technique. Subsequently, a process is implemented to identify consistent contractions by correlating the extracted segments with the tocodynamometer (TOCO) signal. In this step, the consistency index is assessed. Lastly, features such as energy, contraction intensity, contraction duration, peak-to-peak amplitude, log detector, and Shannon entropy are extracted from each contractile activity segment, statistical analysis was conducted using a nonparametric Mann-Whitney U test to identify significant features, and a Random forest (RF) is employed for the classification and discrimination between term and preterm births. The findings of this study show that the average consistency Index (CCI) during pre-term conditions is 0.91, contrasting with a value of 0.9 during term conditions after the extraction of contraction segments. Moreover, our experimental research results display that the performance of RF can achieve an Accuracy of 89%, Sensitivity of 85.87%, and precision of 88.76%. Our results suggest that this simple and effective method can automatically recognize uterine contraction and differentiate between term and preterm EHG signals. This may pave the way for innovative applications in the prevention of preterm labor.