Text this: Characterizing out-of-distribution generalization of neural networks: application to the disordered Su–Schrieffer–Heeger model