Tag Part of Speech API

Part of speech tagging is the process of marking up a word in a text as corresponding to a particular part of speech, based on both its definition and its context. This is a simple API that takes a text and returns the tagged text.

The API works on English text and uses the tag set of the Brown Corpus (for example NN = singular noun, JJ = adjective, AT = article). Every token in the response is followed by a slash and its tag.

GET
https://api.apileague.com/tag-pos
Example Request and Response
GET
https://api.apileague.com/{{ examples.getTagPos }}
{
    "tagged_text": "The/AT lazy/JJ dog/NN jumps/NNS over/UNDER the/AT quick/RB brown/JJ fox/NN"
}
cURL
Java
Javascript
Python
Go
C#
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}

Frequently Asked Questions

What tags are used?

The API uses the part-of-speech tag set of the Brown Corpus, with tags such as NN (Noun), VB (Verb), JJ (Adjective), RB (Adverb), and many others.

Does it handle multiple sentences?

Yes, the API can process longer texts containing multiple sentences and will tag each word accordingly.

Is it case-sensitive?

The API considers capitalization as a feature for tagging (e.g., "Apple" vs "apple"), but it is robust enough to handle standard sentence casing.

How is the POS Tagging API different from the Extract Entities API?

The POS Tagging API identifies the grammatical role of every word (noun, verb, adjective, etc.), while the Extract Entities API specifically identifies and classifies named entities like people, places, and organizations.

Questions? Need Help? Ask Away