Text this: Improved Modeling and Generalization Capabilities of Graph Neural Networks With Legendre Polynomials