# How to know which kind of adverb in NLP Parts of Speech (POS) tagging?

There are 4 kinds of adverbs :

• Adverbs of Manner. For example, slowly, quietly
• Adverbs of Place. For example, there, far
• Adverbs of Frequency. For example, everyday, often
• Adverbs of Time. For example, now, first, early

nltk, spacy and textblob only tag a token as an adverb without specifying which kind it is.

Are there any libraries which tag including the type of adverb?

• Welcome to Ai, I request you to go through the community guidelines for effective feedback. – quintumnia Nov 16 '18 at 16:07

Generally POS taggers only use broad categories, especially if they work statistically: the more fine-grained the tagset is, the more training data you need. And unless there are differences in the distribution, the accuracy of the tagger would not be improved by adding more categories, eg

I ran [there/fast/often/early].

all work -- so nothing is gained by having subcategories of adverbs.

I suggest the easiest solution for this would be to have a list of adverbs by category, and simply look them up after the tagging. Just pick all words tagged as adverbs and check if they are in your list. Unless there are ambiguities (ie some adverbs can belong to multiple categories) it should be very straight forward, and would also work with any tagger/tagset that marks adverbials.

You might have to consult a grammar book to get a list of adverbial classes, but that again should be easy to do.

Adverbs are a category in a part of speech (POS) tagger. Other POS tags are noun, verb, pronouns and so on. The “Penn Treebank” is a famous example for a out-of-the-box POS tagger to identify different kind of adverbs. The “Penn Treebank” can be used together with Natural Language Toolkit (nltk) over a Python interface.

from nltk.corpus import ptb
nltk.help.upenn_tagset()

• The tags reported by upenn_tagset() include RB: adverb / RBR: adverb, comparative / RBS: adverb, superlative but not the sub-categories in the question. E.g. it can differentiate between "I ran fast", "I ran faster than you" and "I ran fastest of all". But cannot differentiate between "I ran fast" and "I ran often". So nltk.pos_tag(nltk.word_tokenize('I ran fast')) returns [('I', 'PRP'), ('ran', 'VBD'), ('fast', 'RB')] and nltk.pos_tag(nltk.word_tokenize('I ran often')) returns [('I', 'PRP'), ('ran', 'VBD'), ('often', 'RB')]. – Neil Slater Nov 16 '18 at 13:34