Here's why:
* Direct objects are the nouns or pronouns that receive the action of the verb.
* In this sentence, the verb is "inventing".
* The philologist is the one who is inventing something, and that something is "witty neologisms".
Therefore, "neologisms" is the direct object of the verb "inventing".