Statistical mechanisms in language acquisition