This problem involves identifying the part of speech of each word in text. **Example:** Identifying 'dog' as a noun in the text 'The dog is running'. **Constraints:** The input will be a string and the output should be a list of tuples containing the word and its part of speech. The model should be trained on a dataset of labeled text examples.
Test Cases
Test Case 1
Input:
'The dog is running'Expected:
[('The', 'DET'), ('dog', 'NOUN'), ('is', 'VERB'), ('running', 'VERB')]Test Case 2
Input:
'The cat is sleeping'Expected:
[('The', 'DET'), ('cat', 'NOUN'), ('is', 'VERB'), ('sleeping', 'VERB')]+ 3 hidden test cases