Text this: Unified description of thermal and nonthermal laser-induced ultrafast structural changes in materials