Text this: A computational model of language functions in flexible goal-directed behaviour