Part-of-Speech Tagging Simplified
Tags: nlp, computerscience
Published: 2020-10-17 08:53:07

* [Introduction](#Intro)
* [Tags](#Tags)
* [Example](#Example)
* [How are POS Tags Assigned](#Methods)


<a name="Intro"/>
# Introduction
Part-of-Speech tagging is a very useful foundation of NLP and deeper NLP concepts.  The action involves analysing text and returning the tokens of the text with the appropriate Part-of-Speech (POS) tags.

<a name=“Tags”/>
# POS Tags
> Read this blog post on [my website](adamjhawley.github.io) for a better experience (dev.to please implement markdown tables)!

1. ADJ: [adjective](https://universaldependencies.org/u/pos/ADJ.html) -> super **cat**
2. ADP: [apposition](https://universaldependencies.org/u/pos/ADP.html) -> my **friend Liam**
3. ADV: [adverb](https://universaldependencies.org/u/pos/ADV.html) -> The boy ran **quickly**
4. AUX: [auxiliary](https://universaldependencies.org/u/pos/AUX_.html) -> He **will** make
5. CCONJ: [coordinating conjunction](https://universaldependencies.org/u/pos/CCONJ.html) -> this **and** that
6. DET: [determiner](https://universaldependencies.org/u/pos/DET.html) -> **the** squirrel
7. INTJ: [interjection](https://universaldependencies.org/u/pos/INTJ.html) -> **Oi!**
8. NOUN: [noun](https://universaldependencies.org/u/pos/NOUN.html) -> the **dog**
9. NUM: [numeral](https://universaldependencies.org/u/pos/NUM.html) -> **one** fork
10. PART: [particle](https://universaldependencies.org/u/pos/PART.html) -> **not** Sam **’s**
11. PRON: [pronoun](https://universaldependencies.org/u/pos/PRON.html) -> **he** shouts
12. PROPN: [proper noun](https://universaldependencies.org/u/pos/PROPN.html) -> **Helsinki** is beautiful
13. PUNCT: [punctuation](https://universaldependencies.org/u/pos/PUNCT.html) -> Hello **,** there **!**
14. SCONJ: [subordinating conjunction](https://universaldependencies.org/u/pos/SCONJ.html) -> I do this **while** they do that
15. SYM: [symbol](https://universaldependencies.org/u/pos/SYM.html) -> 5 **+** 10
16. VERB: [verb](https://universaldependencies.org/u/pos/VERB.html) -> They **think** that
17. X: [other](https://universaldependencies.org/u/pos/X.html) -> this **asd;lfkjasd;flkj**

> Source: [Universal POS tags](https://universaldependencies.org/u/pos/)  

Above is a list of the standardised POS tags. You will probably recognise many of them from English class.

<a name="Example">
# Example
Courtesy of Spacy’s visualiser (as always!), below I have included an example where the phrase “This is my house while I live here” has been analysed and POS tags have been assigned. You can see that the tags line up with what would be expected from the list above.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/d80u19xe0bp8bb9zy6co.png)

<a name="Methods"/>
# How Are POS Tags Assigned?
There are many different ways that POS Tags are assigned. These methods include dynamic programming algorithms (such as the popular [Viterbi algorithm](https://en.wikipedia.org/wiki/Viterbi_algorithm)). It is common to see hidden Markov models implemented in POS-tagging algorithms. As with many modern NLP elements, machine learning is now very popular for POS-tagging. In this case, computers analyse corpora of text which has been appropriately tagged already and try to learn how to tag tokens itself.