Text this: Calculul structurilor optimale