import spacydef main(): nlp = spacy.load("en_core_web_sm") text ="This is a test sentence so that we can see the parts of speech and dependencies" doc = nlp(text)for token in doc:print(token.text, token.pos_, token.dep_)main()
Challenge
What is the most frequent noun in a movie script of your choice?
Choose a movie script to work on, tag the script with part of speech labels, and count the nouns. Which is the most frequent noun in the script you chose?