Question: Please answer following questions along with Python code and its result. Make sure to import NLTK. 1. Write a program to print the 50 most

Please answer following questions along with Python code and its result. Make sure to import NLTK.

1. Write a program to print the 50 most frequent bigrams (pairs of adjacent words) of brown corpus text in romance category, omitting bigrams that contain stopwords.

stopwords = nltk.corpus.stopwords.words('english')

2. Write a program to guess the number of syllables contained in a random word you choose, making use of the CMU Pronouncing Dictionary.

entries = nltk.corpus.cmudict.entries()

3. Define a function find_language() that takes a string as its argument and returns a list of languages that have that string as a word. Use the udhr corpus and limit your searches to files in the Latin-1 encoding.

from nltk.corpus import udhr

languages = ['Chickasaw', 'English', 'German_Deutsch', 'Greenlandic_Inuktikut', 'Hungarian_Magyar', 'Ibibio_Efik']

def find_language(word):

langlist = []

fill the middle part please delete this line

return langlist

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!