0% found this document useful (0 votes)
3 views

Natural Language Processing

Uploaded by

juvelynasug.wri
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Natural Language Processing

Uploaded by

juvelynasug.wri
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Bachelor of Science in Computer Science

IS 101 CS ELECTIVE 3 – INTELLIGENT


SYSTEM

Natural Language Processing

Introduction to Natural Language Processing (NLP)


Natural Language Processing (NLP) is a branch of artificial intelligence (AI) that focuses
on the interaction between computers and humans through natural language. It enables
machines to understand, interpret, and generate human language, both written and spoken.

Key Components of NLP


NLP is made up of several important components that allow machines to process language:
1. Syntax: The arrangement of words to form a sentence.
2. Semantics: The meaning conveyed by words and sentences.
3. Pragmatics: Understanding context and intent in language beyond literal meanings.
4. Language Models: Machine learning models trained to predict and generate language.

What is Syntax in NLP?


Syntax refers to the structure and rules that govern how sentences are formed. Machines need
to understand sentence structure to process human language correctly.

Example:
 Correct syntax: "The cat sat on the mat."
 Incorrect syntax: "The sat cat on mat."

NLP Techniques for Syntax:

 Part-of-Speech Tagging: Identifying words as nouns, verbs, adjectives, etc.


 Dependency Parsing: Analyzing how words in a sentence relate to each other.

REPORTER: JUVELYN C. SUG


Bachelor of Science in Computer Science
IS 101 CS ELECTIVE 3 – INTELLIGENT
SYSTEM
Why is Syntax Important in NLP?
Syntax helps machines understand the grammatical relationships between words and ensures
that sentences are formed correctly, leading to better language comprehension.

What is Semantics in NLP?


Semantics deals with the meaning of words and sentences. It enables machines to determine
the correct meaning in various contexts.
Example:
 Word sense ambiguity: The word "bank" can refer to a financial institution or the side of
a river.
 NLP models use contextual clues to determine the intended meaning.
NLP Techniques for Semantics:
 Word Sense Disambiguation: Deciding which meaning of a word is being used in a given
context.
 Semantic Role Labeling: Understanding the role of words in a sentence (subject, object,
etc.).
Why is Semantics Important in NLP?
Semantics helps machines grasp the intended meaning of a sentence, ensuring more accurate
responses and interpretations.

What is Pragmatics in NLP?


Pragmatics considers the context in which language is used to understand the intent behind a
sentence. Machines need pragmatics to interpret non-literal language, such as idioms or polite
requests.
Example:
 Literal meaning: "Can you pass the salt?" (Asking about ability).
 Pragmatic meaning: "Can you pass the salt?" (Making a polite request).
NLP Techniques for Pragmatics:
 Intent Recognition: Identifying the user’s intent behind a question or command.

REPORTER: JUVELYN C. SUG


Bachelor of Science in Computer Science
IS 101 CS ELECTIVE 3 – INTELLIGENT
SYSTEM
 Dialogue Management: Managing conversations by understanding the context of
interactions.
Why is Pragmatics Important in NLP?
Pragmatics allows machines to engage in natural, human-like conversations by understanding
the nuances of language and the speaker's true intentions.

Language Models in NLP


Language models are key in NLP. These models predict the next word or phrase based on the
context and can also generate coherent text.
Popular Language Models:
 GPT (Generative Pretrained Transformer): A language model used for generating text.
 BERT (Bidirectional Encoder Representations from Transformers): A model used for
understanding the context of words in a sentence.
Example of Text Generation:
 Input: "The cat sat on the..."
 Output: "The cat sat on the mat."
Why are Language Models Important in NLP?
Language models power many NLP applications, such as text completion, summarization, and
content generation, making machines more efficient at understanding and producing human-
like language.

Applications of NLP in Chatbots


Chatbots are automated systems that interact with users via text or speech, powered by NLP.
They are commonly used for customer service, information retrieval, and task automation.
Example of a Chatbot Interaction:
 User: "What’s the weather today?"
 Chatbot: "The weather today is sunny with a high of 25°C."
NLP Techniques in Chatbots:
 Intent Recognition: Understanding the user's request.

REPORTER: JUVELYN C. SUG


Bachelor of Science in Computer Science
IS 101 CS ELECTIVE 3 – INTELLIGENT
SYSTEM
 Response Generation: Providing appropriate answers based on the query.
Why are Chatbots Important?
Chatbots help businesses automate customer interactions, providing immediate responses and
improving user experience.

Applications of NLP in Virtual Assistants


Virtual Assistants like Siri, Alexa, and Google Assistant use NLP to interpret voice commands
and perform tasks.
Example of Virtual Assistant Commands:
 User: "Hey Siri, set an alarm for 7 AM."
 Virtual Assistant: "Your alarm is set for 7 AM."
NLP Techniques in Virtual Assistants:
 Speech Recognition: Converting spoken language into text.
 Natural Language Understanding (NLU): Interpreting the meaning of spoken commands.
 Action Execution: Performing tasks based on the understood command.
Why are Virtual Assistants Important?
They make everyday tasks more convenient by allowing users to interact with technology
through simple, intuitive voice commands.

Real-World Applications of NLP


NLP is used in various fields and technologies:
1. Search Engines (e.g., Google): Interpreting user queries and delivering relevant results.
2. Social Media Monitoring: Analyzing public sentiment through comments and posts.
3. Healthcare: Extracting key information from medical records and assisting in diagnoses.
Example:
 Google Search Query: "Best restaurants near me."
 NLP helps interpret the query and provides a list of relevant restaurants.

REPORTER: JUVELYN C. SUG


Bachelor of Science in Computer Science
IS 101 CS ELECTIVE 3 – INTELLIGENT
SYSTEM
Why are Real-World Applications of NLP Important?
NLP improves user experience across industries by enabling faster, more accurate
communication between humans and machines.

Challenges in NLP
Despite its advances, NLP faces several challenges:
1. Ambiguity: Words with multiple meanings can be difficult for machines to interpret
correctly.
2. Context Understanding: Machines struggle with nuanced language, like sarcasm or
idioms.
3. Language Variations: Regional dialects and languages can create additional complexities.

Summary
In this module, we explored:
 The core concepts of Syntax, Semantics, and Pragmatics in NLP.
 How Language Models work and their role in text generation.
 The application of NLP in Chatbots and Virtual Assistants.
 Real-world use cases of NLP and the challenges the field still faces.
NLP is a rapidly evolving field that is transforming the way we interact with technology.

References
1. Jurafsky, D., & Martin, J. H. (2019). Speech and Language Processing. Pearson.
2. Goldberg, Y. (2017). Neural Network Methods for Natural Language Processing. Morgan
& Claypool.

REPORTER: JUVELYN C. SUG

You might also like