Implement Greedy Decoding to find the most likely sequence of words given a probability matrix. **Example:** Given a probability matrix [[0.1, 0.2, 0.7], [0.5, 0.3, 0.2]], the most likely sequence of words is the one with the highest probability. **Constraints:** The probability matrix is a 2D numpy array where each row represents a time step and each column represents a word in the vocabulary.
Test Cases
Test Case 1
Input:
[[[0.1, 0.2, 0.7], [0.5, 0.3, 0.2]]]Expected:
[2, 0]Test Case 2
Input:
[[[0.1, 0.2, 0.7], [0.5, 0.3, 0.2], [0.3, 0.4, 0.3]]]Expected:
[2, 0, 1]+ 3 hidden test cases