Text this: Thermodynamic graph-rewriting