名詞を抽出する関数をPythonで実装してください。
He wrote rapidly and without interruption.
def extract_nouns(text):
    """ Extracts all the nouns in a given text.
    
    Parameters
    ----------
    text: str
        The text to be parsed.
    
    Returns
    -------
    list
        A list of nouns extracted from the text.
    """
    words = nltk.word_tokenize(text)
    tagged_words = nltk.pos_tag(words)
    nouns = [word[0] for word in tagged_words if word[1] == 'NN' or word[1] == 'NNS']
    return nouns

nouns = extract_nouns("He wrote rapidly and without interruption.")
print(nouns)
# Output: ['He', 'interruption']