Erstellen einer Liste mit Antonyme für Adjektive in WordNet mit Python

Ich möchte in Python Folgendes tun (ich habe die NLTK-Bibliothek, aber ich bin nicht besonders gut mit Python, daher habe ich Folgendes in einem seltsamen Pseudocode geschrieben):

from nltk.corpus import wordnet as wn  #Import the WordNet library
for each adjective as adj in wn        #Get all adjectives from the wordnet dictionary
    print adj & antonym                #List all antonyms for each adjective 
once list is complete then export to txt file

Auf diese Weise kann ich ein vollständiges Wörterbuch mit Antonyme für Adjektive erstellen. Ich denke, es sollte machbar sein, aber ich weiß nicht, wie man das Python-Skript erstellt. Ich würde es gerne in Python machen, da dies die Muttersprache des NLTK ist.

Antworten auf die Frage(1)

Ihre Antwort auf die Frage