Modelling linguistic communication using types