Please enable JavaScript.
Coggle requires JavaScript to display documents.
Natural Language Processing(NLP) - Coggle Diagram
Natural Language Processing(NLP)
Introduction
Purpose:
Achieving human-like language processing for various applications.
Definition:
Interaction between computers and human languages using computational techniques to analyze and represent naturally occurring texts.
Applications
Question Answering:
Finding direct answers to user questions.
Information Extraction:
Pulling useful facts from text.
Machine Translation:
Translating text between languages.
Text Summarization:
Shortening long text into key points.
Context and Sentiment Analysis:
Understanding topics and emotions.
Conversational Agents:
Chatbots that talk with users.
Linguistics:
The scientific study of language. It includes:
Semantics:
Meaning of words and sentences.
Morphology:
Word formation.
Pragmatics:
Understanding in context.
Phonology:
Study of sounds.
Syntax:
Sentence structure.
Formal vs Natural Language
Formal Language (Python, Java, etc...)
Fixed, unambiguous meanings.
Clear grammar and rules.
Natural Language (Human language)
Ambiguous, evolving, context-driven.
Example: "The chicken is ready to eat" (who eats whom?).
Components of NLP
Natural Language Understanding (NLU):
Understand and interpret input sentences.
Subcomponents of NLU
Morphological & Lexical Analysis
E.g., "preregistration" → pre + register + tion.
Break text into words, analyze word structure.
Syntactic Analysis (Parsing)
Grammar rules: Word order and relationships.
E.g., Reject "the girl the go to the school".
Semantic Analysis
Extract literal meaning.
E.g., Reject "colorless blue idea" (nonsense phrase).
Discourse Integration
Meaning depends on prior/following sentences.
E.g., "She wanted it" — what is "it"?
Pragmatic Analysis
Real-world context and purpose.
E.g., "Close the window?" as a polite request.
Natural Language Generation (NLG):
Generate sentences from internal data.
Reverse of NLU:
From data to human language.
Components
Surface Realization:
How to say it.
Discourse Planning:
What to say.
Lexical Selection:
Choose the correct words.
History of NLP
1950s Turing Test proposed Georgetown experiment on machine translation.
1960s ELIZA chatbot created (psychotherapist simulation).
1970s Conceptual ontologies, chatterbots like Jabberwacky and ALICE.
1980s Shift to Machine Learning approaches due to computational power increase.
General Tasks in NLP
Tokenization / Segmentation:
Break text into words, sentences.
Stemming:
Reduce words to root form (e.g., running → run).
Part-of-Speech (POS) Tagging:
Label words (noun, verb, adjective).
Word Sense Disambiguation:
Resolve word meanings from context.
Contextual Analysis:
Extract themes from unstructured texts.
Sentiment Analysis:
Detect emotions in text.
Ontologies in NLP
Ontologies:
The structured representation of knowledge that defines concepts (entities) and relationships between them.
Purpose:
Helps machines understand the meaning of words and how they relate to each other.
Applications
Semantic Web:
Enhances web data with meaning for better search and integration.
Google Image Search:
Uses ontologies to connect image tags with concepts.
Challenges in NLP
Phonology:
Speech recognition, tagging.
Morphology:
Word formation, segmentation.
Lexicon:
Word sense, named entity recognition.
Syntax:
Grammar rules, sentence parsing.
Semantics:
Understanding literal meaning.
Discourse:
Topic tracking across sentences.
Pragmatics:
Common-sense reasoning.
OCR:
Converting scanned text to machine-readable form.
Techniques used in NLP
Symbolic
Human-curated facts and rules.
Deep analysis, rule-based systems.
Statistical
Probabilistic models.
Use of large text corpora.
Example: Google's search model.
Connectionist
Neural networks.
Learn from examples rather than pre-coded rules.
Morphological & Lexical Analysis
Morphology:
Analyzes word structure (e.g., preregistration = pre + registra + tion).
Lexical Analysis:
Breaks text into words/sentences and studies their meaning, role, and relationships.
Lexicon:
The vocabulary of a language.
Syntactic Analysis
Syntax:
Focuses on correct word order and grammar.
Analyzes sentence structure to show how words relate.
Incorrect order (e.g., "the girl the go to the school") is rejected.
Semantic Analysis
Semantics:
Deals with the literal or dictionary meaning of words and sentences.
Gives meaning to structures built by syntax.
Nonsense phrases (e.g., "colorless blue idea") are rejected.
Discourse Integration
Discourse:
Understands a sentence based on previous and following sentences.
Example: In "she wanted it", the meaning of "it" depends on earlier context.
Pragmatic Analysis
Pragmatics:
Focuses on meaning in real-world and social context.
Requires world knowledge to interpret purpose.
E.g., "Close the window?" is likely a request, not an order.
Segmentation & Named Entity Recognition
Segmentation:
Breaks text into words and meaningful units.
E.g., Detects words, dates, places in sentences.
Named Entity Recognition (NER): Identifies names of people, places, organizations, dates, etc.
Stemming
Stemming:
Reduces words to their root form.
E.g., car, cars → car, run, ran, running → run, stemmer, stemming, stemmed → stem.
POS Tagging
Assigning grammatical categories.
E.g., "Today is a beautiful day." → "Today (Noun)", "is (Verb)", etc.
Word Sense Disambiguation
Determining meaning of words based on context.
E.g., "bank" (money institution) vs "bank" (river edge).
Contextual and Sentiment Analysis
Extracting themes and emotional tone from texts.
E.g., Positive or negative restaurant reviews.
Sentiment Analysis
Identify emotional tone in reviews or comments.
E.g., Understand user satisfaction, dissatisfaction, or emotional reaction.