Enhanced gender detection algorithm for nouns