For a serious NLP pipeline, you usually separate the analysis into layers.

A sentence contains multiple kinds of information simultaneously:


1. Lexical Layer

“What are the words?”

Example:

running -> run

2. Grammatical Layer

“How do the words function grammatically?”

Includes:

Example:

running = VERB, present participle
dogs = plural noun

3. Syntactic Layer

“How are words structurally connected?”

Includes:

Example:

John ate pizza

subject = John
verb = ate
object = pizza

This is sentence structure.


4. Semantic Layer

“What does it mean?”

Includes:

Example:

bank = financial institution

vs

bank = river edge

5. Pragmatic Layer

“What is implied by context?”

Includes:

Example:

Can you open the window?

Literal: question

Pragmatic meaning: request


6. Discourse Layer

“How do sentences connect together?”

Includes:

Example:

John entered the room.
He sat down.

"He" = John

7. Knowledge Layer

“How does this connect to world knowledge?”

Includes:

Example:

doctor -> medical profession
hospital -> place of work

8. Statistical Layer

“How common or probable is this?”

Includes:

Example:

strong tea

is more probable than

powerful tea

9. Vector / Embedding Layer

“How is meaning represented numerically?”

Includes:

Example:

king - man + woman ≈ queen

10. Logical Layer

“Can meaning be represented formally?”

Includes:

Example:

All humans are mortal.
Socrates is human.
=> Socrates is mortal.

11. Emotional / Affective Layer

“What emotion or tone exists?”

Includes:

Example:

I love this

= positive sentiment


12. Phonetic / Speech Layer

“How does it sound?”

Includes:

Useful for:


13. Information Extraction Layer

“What structured data can be extracted?”

Includes:

Example:

Apple acquired Beats in 2014

Extract:

(Apple, acquired, Beats)

14. Reasoning Layer

“What conclusions can be inferred?”

Includes:


Modern LLM systems combine many of these implicitly.

Traditional NLP systems usually build them explicitly as separate pipelines.

A full advanced NLP stack often looks like:

Raw Text
→ Tokenization
→ POS Tagging
→ Parsing
→ NER
→ Coreference
→ Semantic Parsing
→ Embeddings
→ Knowledge Linking
→ Reasoning
→ Generation

WordNet mainly helps in:

SpaCy mainly helps in:

Transformers mainly help in: