Your language alphabet is A, B, C. You want to be able to later compute P(any word).
A program already went through the training corpus to collect trigram probabilities for:
P(A | nothing before)
P(A | only A before)
P(A | only B before)
P(A | only C before)
P(A | AA)
P(A | AB)
P(A | AC)
P(A | BA)
…
P(B | nothing before)
P(B | only A before)
,,,,
P(C | nothing before)
P(C | 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. Make sure it displays the content of the data structure in an easy to read format. You have to prepare your own input file with made-up numbers. Name it nlp.txt
Answers
Answered by
0
Answer:
hey I don't understand
Similar questions
Social Sciences,
3 months ago
Chemistry,
3 months ago
Physics,
7 months ago
Sociology,
1 year ago
Hindi,
1 year ago