Change the implementation of isNoun to take a constant time O(1). More
comments added