Question
PYTHON Use urllib to download the 500 most frequent English words (sorted by frequency) from https://sketchengine.co.uk/wp-content/uploads/word-list/english/english-word-list-total.csv. Process the file and store the words (only) in
PYTHON
Use urllib to download the 500 most frequent English words (sorted by frequency) from https://sketchengine.co.uk/wp-content/uploads/word-list/english/english-word-list-total.csv. Process the file and store the words (only) in a suitable data structure W, keeping them in order. Print out the 20 most frequent English words and their rank, as follows: 1. 'the' - 2. 'and' - 3. 'to' -
Download a story of famous computer bugs from http://textfiles.com/100/famous.bug as string S.
Remove from the text S all words that are not in W. Make sure your code is efficient.
Perform a word frequency count for the words in S and store the resulting data. Print the 20 most frequent words in string S using the same format shown in part (b).
Compare (using a program!) the 20 most frequent words in the text to the 20 most frequent words in the English language, and print out any major discrepancy. For example, it might be that the most frequent word is the same but the second most frequent word is different, etc. Keep efficiency in mind, as before.
Using python
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started