Babies recognise grammar as early as five months, research shows.