NLP (Concepts & Pipeline)
Part-of-Speech (POS) Tagging
In shortPart-of-speech tagging labels each word in a text with its grammatical role, such as noun, verb or adjective, as a step in analysing language.
Part-of-speech (POS) tagging is the NLP task of labelling every word in a text with its grammatical category: noun, verb, adjective, adverb, pronoun and so on. It is one of the basic steps of syntax analysis, and it helps a machine work out what role each word plays, for example whether “book” is a thing or an action.
How it works
Text is first split into tokens (tokenization). A tagger then assigns each token a tag, using the word itself and its context. Early taggers were rule-based or statistical; modern ones are neural models trained on large annotated corpora. Many tools use the Universal Dependencies tag set (NOUN, VERB, ADJ, ADV, PROPN, DET, ADP and others).
Tools that do it:
- Google Cloud Natural Language API‘s syntax analysis returns, for each token, a detailed part-of-speech object (including features such as tense, number and case), a dependency label and the lemma.
- spaCy and NLTK in Python.
POS tags usually feed other steps: lemmatisation uses them to find the right base form, dependency parsing uses them to build sentence structure, and keyword extraction uses them to keep noun phrases.
How it’s used in SEO and marketing
- Keyword and phrase extraction: keep nouns and adjective-noun patterns (“waterproof hiking boots”) and drop filler words.
- Query analysis: separate the main noun (the thing searched for) from modifiers and verbs that hint at intent (“buy”, “fix”, “compare”).
- Content analysis: compare the share of nouns, verbs and adjectives across pages to spot style differences, as in MLforSEO’s syntax analysis Looker Studio visualisations.
- Product and review mining: pull out adjectives used with product features to understand how customers describe them.
- Cleaning transcripts and text before topic modelling.
Example
Run the sentence “Book a table at our new restaurant” through a syntax analysis template and the API would typically return “Book” as a VERB with imperative mood, “table” as a NOUN, “new” as an ADJ and “restaurant” as a NOUN. The verb in first position signals an action, which is useful when classifying queries and calls to action.
Limitations and things to watch
- Short, ungrammatical text (search queries, social posts) is harder to tag than full sentences.
- Ambiguous words can be mis-tagged, and errors carry into later steps.
- Tag sets differ between tools, so map them before comparing outputs.
- POS tags describe grammar, not meaning; combine them with entity and semantic analysis.
Learn it on MLforSEO
Where Part-of-Speech (POS) Tagging shows up on MLforSEO
Read about it on the blog
Sources and further reading
- How to do Syntax Analysis with Google's Natural Language API in Google Sheets (Apps Script) MLforSEO
- Google Sheets Syntax Analysis Template with Google Cloud Natural Language API for Grammatical Structure Parsing MLforSEO
- Google Cloud Natural Language API: Analyzing syntax
- Universal Dependencies: Universal POS tags
- spaCy: Linguistic features (POS tagging)
Other terms from NLP (Concepts & Pipeline)
- Content ModerationUsing NLP to flag text that may be harmful or sensitive, such as toxic, insulting or violent content, so it ca…
- Emotion detection/analysisAn NLP task that labels text with specific emotions such as joy, anger, sadness, fear and disgust, going beyon…
- Entity Extraction (NER)Named entity recognition: finding names of people, organisations, places, products and other things in text an…
- Entity Sentiment AnalysisNLP that scores the sentiment expressed towards each entity in a text, so one review can be positive about one…
- Lemmatisation and StemmingTwo ways to reduce words to a base form so variants count as one: stemming chops off endings, lemmatisation re…
- Lexical or morphological analysisThe first phase of NLP: splitting text into words and analysing their structure (roots, prefixes, suffixes) so…
- N-gram (Unigram, Bigram, Trigram)A contiguous sequence of n words or characters from a text: unigrams (1), bigrams (2), trigrams (3) and so on,…
- Natural Language Processing (NLP)The field of AI that enables computers to process, analyse and generate human language, from tokenisation and…
- Natural Language Understanding (NLU)The part of NLP focused on working out what text means: its intent, entities, sentiment and relationships, rat…

