Write a program to print the first tagged word of any file in the Penn Treebank corpus; take the file identifier as an input.
Text corpora in NLTK
Tagged word
Report a typo
Sample Input 1:
wsj_0001.mrgSample Output 1:
('Pierre', 'NNP')Write a program in Python 3
from nltk.corpus import treebank
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.