NLP_PPT
NLP_PPT
LANGUAGE
PROCESSING(NLP)
Overview of NLP: Definition, Scope, Applications of NLP
Sep 2016 Google Neural Machine Translation (NMT) –reduce translation errors(deep LSTM)
HOW NLP?
• Faster response
• Without Bias
• Manage more volume of data
• To learn more GOALS
• Scientific- Computer to understand
• Practical – Using available data
WHY DO COMPUTERS HAVE DIFFICULTY WITH NLP?
Input Convert
USER MACHINE TEXT
ML
Out
RESPONSE PROCESS
Audio/Text
TERMS TO UNDERSTAND
Natural Language
Processing is divided
into sub-areas, i.e.,
Natural Language
Generation and
Natural Language
Understanding, which
are, as the name
suggests, associated
with the generation
and understanding of
the text.
SYNTAX
• Definition: The set of rules that governs the structure and order of words in sentences.
• Importance: Helps in understanding sentence structure and grammar.
• Example:
• Correct Syntax: "The cat sits on the mat."
• Incorrect Syntax: "Cat the mat on sits."
• Applications in NLP:
• Part-of-Speech (POS) tagging.
• Syntactic parsing to analyze grammatical structure.
MORPHOLOGY
• Definition: The study of the structure and formation of words, including roots, prefixes, suffixes,
and inflections.
• Types:
• Inflectional Morphology: Changes in word form to express tense, number, gender, etc. (e.g., "walk"
→ "walked").
• Derivational Morphology: Formation of new words by adding affixes (e.g., "happy" → "happiness").
• Definition: The study of meaning in language, including word meanings and sentence
meanings.
• Importance: Focuses on understanding the meaning of text.
• Example:
• "The bank is by the river" (financial institution vs. riverbank).
• Applications in NLP:
• Word sense disambiguation.
• Named entity recognition (NER).
• Sentiment analysis.
PRAGMATICS
• Definition: The study of how context influences the interpretation of meaning in language.
• Importance: Goes beyond literal meanings to understand implied meanings and situational
context.
• Example:
• Literal: "Can you pass the salt?" (Yes, I can.)
• Pragmatic: (Actually passing the salt).
• Applications in NLP:
• Chatbots and conversational agents.
• Sarcasm and irony detection.
• Context-aware language generation.
PHONOLOGY
• Definition: The study of the sound systems of a language and how sounds
are organized and used.
• Importance: Relevant in speech-related NLP tasks.
• Applications in NLP:
• Speech recognition (converting speech to text).
• Text-to-speech systems (TTS).
• Pronunciation correction tools.
NLU and NLG
• In addition to tokenization, various data cleaning and feature extraction techniques are applied,
including: Lemmatization, Stopwords Removal, Correcting Misspelled Words.
• Example- “Orange eats a Mary” - grammatically correct but does not make sense semantically.
DISCOURSE INTEGRATION
• comprehending the relationship between the current sentence and earlier sentences or the
larger context.
• contextualizing text and understanding the overall message conveyed.
• Role- examines how words, phrases, and sentences relate to each other within a larger
context.
• assesses the impact a word or sentence and how the combination of sentences affects the
overall meaning.
• helps in understanding implicit references and the flow of information across sentences.
• Example: "This is unfair!“ - "this" - need to examine the preceding or following sentences
PRAGMATIC ANALYSIS
• focusing on interpreting the inferred meaning of a text beyond its literal content.
• Role- aims to grasp these deeper meanings in communication. i.e what the writer
or speaker truly intends to convey?
• Importance of Understanding Intentions - the word "Hello" can have various
interpretations depending on the tone and context in which it is spoken.
• Example: "Hello! What time is it?“ -might be a straightforward request for the
current time, but it could also imply concern about being late.
NLP PIPELINE
• In Databases: Collaborate with data engineers to retrieve • Extract data using web scraping (e.g., BeautifulSoup,
data. Scrapy).
• Insufficient Data: Use data augmentation techniques: • Access APIs (e.g., Twitter, Reddit, news aggregators).
Objective: Clean and standardize text for meaningful analysis. • Convert text to lowercase.
Steps:
• Detect the text’s language.
• Basic Cleaning:
• Advanced Preprocessing:
• Remove HTML tags and irrelevant formatting.
• Perform Part-of-Speech (POS) tagging.
• Handle emojis (convert or remove).
• Conduct parsing for grammatical
• Perform spell checks for consistency. structure.
• Basic Preprocessing:
• Resolve coreferences for coherent
• Tokenize text into words or sentences. understanding.
• Remove stop words (e.g., “the,” “is”).
• Apply stemming or lemmatization.
FEATURE ENGINEERING
Healthcare Applications
• Clinical Text Analysis: Extracting insights from electronic health records (EHRs).
• Medical Chatbots: Offering basic medical advice and appointment scheduling.
• Drug Discovery: Analyzing medical literature for drug development.
• Disease Prediction: Detecting early signs of illness from patient records.
Language Translation and Localization
• Machine Translation: Tools like Google Translate for multilingual communication.
• Localization: Adapting content for cultural and regional relevance.
• Cross-Language Information Retrieval: Searching for information across languages.
SCOPE OF NLP (CONT…)
Chatbots
• Simulate human-like conversation using Natural Language Processing (NLP) and Machine
Learning (ML).
• Understand complex language and improve over time by learning from interactions.
• Function through two steps: understanding user input and providing appropriate responses.
Autocomplete in Search Engines
• Suggest possible completions for typed queries based on keyword predictions.
• Analyze vast datasets and patterns to provide relevant suggestions.
• NLP identifies relationships between words to predict user intent.
APPLICATIONS (CONT…..)
Voice Assistants
• Examples: Siri, Alexa, Google Assistant.
• Perform tasks such as making calls, setting reminders, and surfing the internet using voice
commands.
• Utilize speech recognition, natural language understanding, and NLP for interaction.
Language Translators
• Translate text between languages using Sequence-to-Sequence modeling.
• Transitioned from Statistical Machine Translation (SMT) to advanced NLP models for improved
accuracy.
• Examples: Google Translate, which identifies patterns and vocabulary of languages
APPLICATIONS (CONT…..)
Sentiment Analysis
• Analyze user sentiments on social media, reviews, or feedback.
• Employs NLP, text analysis, and computational linguistics to classify sentiments as positive,
negative, or neutral.
• Helps businesses gauge public opinion, understand brand perception, and improve services.
Grammar Checkers
• Enhance professional and academic writing by correcting grammar and spelling errors.
• Suggest synonyms and improve readability using NLP algorithms trained on large datasets.
• Essential for producing polished and error-free content.
APPLICATIONS (CONT…..)