Learning vocabulary and grammar from cross-situational statistics