Question: Programming Probability Collector [ 2 6 pts ] : You must make sure your C + + program compiles with g + + and runs
Programming Probability Collector pts:
You must make sure your C program compiles with g and runs on empress.csusm.edu or pts
Your language alphabet is A B C You want to be able to later compute Pany word
A program already went through the training corpus to collect trigram probabilities for:
PA nothing before
PA only A before
PA only B before
PA only C before
PA AA
PA AB
PA AC
PA BA
PB nothing before
PB only A before
PC nothing before
PC only A before
Q How many probabilities did it have to collect? Why?
After answering this question, write a C program to read a file containing these probabilities and store them in some data structure. You have to prepare your own input file with madeup numbers. Name it nlpProb.txt My sampleinput has the alphabet of a and b only
Make sure it displays the content of the data structure in an easy to read format.
Q How do you compute Pabca Give the equation. pa pba pcab
After answering this question, extend your program so that it will allow the user to enter any word made up of A B andor C and it will compute and output its probability.
Make sure it displays all the Ps that were used to compute the answer as I did.
see my demonstration program that uses the alphabet of a and b only
Test your program on abbcabaac and cabyou should test more but these are required to be submitted Must be submitted or you will not get any credit for the program!!
You must submit the outputs even if the programs do not work.
In that case, provide the bug report here:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
