Text this: Optimal structural analysis