lexname(query)
Returns the type of query.
wordnet = ximport("wordnet") print wordnet.lexname("bee") >>>animal