Automatic acquisition of grammatical types for nouns