An automatic method to discriminate between adiabatic and transient-chirp dominated directly modulated semiconductor lasers (DML), useful to classify telecommunications transmitters, is presented. It is based on calculating the crosscorrelation between the optical power and chirp waveforms of the device under test and the use of a decision threshold. The accuracy of the algorithm is demonstrated using simulated signals obtained from a well-tested laser model complemented with experimentally-derived parameters for several real lasers. By modifying the confinement factor, the laser chirp behavior can gradually be transformed from transient to adiabatic, thus enabling the validation of the proposed algorithm. Correct classification results are reported. Due to its flexibility, ease of implementation, simplicity and accuracy, the classification algorithm here put forward, represents a practical tool for testing and fabrication of DMLs.