You can try something like this:
def nounify(verb_word): set_of_related_nouns = set() for lemma in wn.lemmas(wn.morphy(verb_word, wn.VERB), pos="v"): for related_form in lemma.derivationally_related_forms(): for synset in wn.synsets(related_form.name(), pos=wn.NOUN): if wn.synset('person.n.01') in synset.closure(lambda s:s.hypernyms()): set_of_related_nouns.add(synset) return set_of_related_nouns
This method searches for all derivatives related nouns in the verb and checks to see if they have a “person” as a hypernim.
This input
print nounify("created") print nounify("teach") print nounify("spoke")
will return this conclusion
set([Synset('creator.n.02'), Synset('creature.n.02'), Synset('creature.n.03')]) set([Synset('teacher.n.01')]) set([Synset('speaker.n.03'), Synset('speaker.n.01')])
Unfortunately, your example of a "fund" is not considered, since "funder" is not listed as a derivationally related form for a "fund" in WordNet.
source share