How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Scott Your Own Question

Scott
Scott, MIT Graduate
Category: Homework
Satisfied Customers: 3040
Experience:  MIT Graduate (Math, Programming, Science, and Music)
3546829
Type Your Homework Question Here...
Scott is online now
A new question is answered every 9 seconds

My question is regarding python 3.5 language models and

Customer Question

My question is regarding python 3.5 language models and smoothing. I have to develop a program that does the following a) Write a function to compute unigram unsmoothed and smoothed models. Print out the unigram
probabilities computed by each model for the Toy dataset.
b) Write a function to compute bigram unsmoothed and smoothed models. Print out the bigram probabilities
computed by each model for the Toy dataset.
c) Write a function to compute sentence probabilities under a language model. Print out the probabilities
of sentences in Toy dataset using the smoothed unigram and bigram models.
d) Write a function to return the perplexity of a test corpus given a particular language model. Print
out the perplexities computed for sampletest.txt using a smoothed unigram model and a smoothed
bigram model.
Check: Do your numbers agree with those computed by hand. If not, go back and check if
you have the right computation.
using the nltk libraries. The program needs to run without any arguments. It should read files in the same directory. Absolute
paths must not be used. When downloaded, you code should run with a simple command such as java
LangModel or python LangModel.py
Submitted: 3 months ago.
Category: Homework
Customer: replied 3 months ago.
i can also send you the files to work on if somebody who can do that responds
Customer: replied 3 months ago.
here you can find the files
Customer: replied 3 months ago.
question 5-6
Expert:  Bruce Wilner replied 3 months ago.

Smoothed models of what?

Are these signal spectra? Are they images in the spatial (as opposed to sequency) domain?

I need a bit more detail before I can respond in a semantically meaningful manner.

Expert:  Bruce Wilner replied 3 months ago.

Of course, this is more of an electrical engineering question, so to speak: the MATERIAL is electrical engineering, while the TOOL (Python) is an obvious component of the mature engineer's toolbox. We don't place languages on pedestals, as programmers are wont to do: a programming language is just a tool for characterizing a problem and using the raw power of Ye Olde Computerre to solve it.

Of course, I'm an electrical engineer, which helps.

Customer: replied 3 months ago.
The program needs to be implemented with python though. Can you do it with python or not? The questions i want help with are just 5-6 that are the coding part
Expert:  Bruce Wilner replied 3 months ago.

Do me a tremendous favor:

Copy the text of questions 5 and 6 and plant them physically into the "Messages" stream of this Request.

That's the mechanism whereby we OFFICIALLY agree to a change of scope.

One of these days, I will figure out why Python has become so popular. It has numerous grievous issues. In fact, take a look at this paper, which I wrote some years ago. I apologize if you have difficulty following all of it, which I expect you will.