Question: Answer the following questions along with Python code and its result. Make sure to import NLTK and all of books . 1. Find all words

Answer the following questions along with Python code and its result. Make sure to import NLTK and all of books.

1. Find all words in the Chat Corpus (text5) starting with the letter b. Show them in alphabetical order without duplication (to get vocabulary).

2. Find all the four-letter words in the Chat Corpus (text5). With the help of a frequency distribution (FreqDist), show the first 10 words in decreasing order of frequency.

3. Write expressions for finding all words in text6 that meet the following conditions.

The result should be in the form of a list of words: ['word1', 'word2', ...]. (4 pts 1 pt each)

1) Ending in ize

2) Containing the letter z

3) Containing the sequence of letters pt

4) All lowercase letters except for an initial capital (i.e., titlecase)

4. What does the following Python code do?

>>> sum([len(w) for w in text1]) What does the number of summation means?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!