Page 1 of 1

I already have existing functions for most things asked for: capitalisation --> proper_capitalization(sentence) remove s

Posted: Mon May 02, 2022 12:21 pm
by answerhappygod
I Already Have Existing Functions For Most Things Asked For Capitalisation Proper Capitalization Sentence Remove S 1
I Already Have Existing Functions For Most Things Asked For Capitalisation Proper Capitalization Sentence Remove S 1 (20.37 KiB) Viewed 35 times
I already have existing functions for most things asked for:
capitalisation --> proper_capitalization(sentence)
remove stopwords --> stop_word_removal(sentence,
stop_words)
remove punctuation --> remove_punc(sentence, punctuation)
remove duplicate words -->
remove_duplicate_words(sentence)
remove noises --> cleaning_noise(sentence)
stem words --> pos(sentence)
a To utilise all functions we created in previous tasks, we are going to make a function that would interact with users. Write a function tweet_analysis(), which does the following: 1. Ask for user input of the input filename with message: 'Enter the name of the file to read: 2. Ask for user input of the output filename with message: 'Enter the name of the file to write:' 3. Ask for user input of the stopwords with message: 'Enter your stopwords: 4. Ask for user input of the punctuations with message: "Enter your punctuations to remove 5. Load the file from the input file from step 1. 6. For each line from the given file, process 1. Capitalisation 2. Remove stopwords as given in step 3. 3. Remove punctuations as given in step 4. 4. Remove duplicate words 5. Remove noises 6. Stem words 7. Write the resulting sentences to the output file from step 2. 8. Save the resulting sentences to a list 9. Return the saved resulting sentences