Find the most frequent tag in a given sentence. Output the right tag name. If there are two or more tags with a similar frequency, output the first one.
Don't forget to tokenize the input sentence.
NLTK tagsets usually contain tuples. You can unpack a tuple with for (word, pos) in tagged
You may create a list of all POS tags in a sentence and then go through each of them. A for loop can help you.
You can count POS tags in the following way: ['NN', 'VBZ', 'ADJ', 'NN'].count('NN'). The output will be: 2. Another way to count the POS tags is to create a list of words of a specific POS and then count it with len().