Applications of Huang–Rhys theory in semiconductor optical spectroscopy