1.
Natural Language Processing (NLP) is a branch of Artificial Intelligence (AI) that enables
computers to understand, interpret, and generate human language in a way that is useful and
meaningful.
2. Real-world Applications of NLP
1. Chatbots & Virtual Assistants (e.g., Siri, ChatGPT): Help businesses provide 24/7 automated
customer support.
2. Sentiment Analysis: Used by companies to analyze customer feedback and social media
trends.
3. Machine Translation (e.g., Google Translate): Breaks language barriers for global
communication.
//4.
import re
text_emails = "Contact us at support@[Link] or sales@[Link]. For more, email
info@[Link]."
emails = [Link](r"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-z]{2,}", text_emails)
print("Emails:", emails)
text_ing = "NLP is amazing for cleaning and processing text while learning new techniques."
ing_words = [Link](r"\b\w+ing\b", text_ing)
print("Words ending with 'ing':", ing_words)
//5.
import re
text = "NLP makes AI smarter! But, sometimes, it’s challenging... Don’t you agree?"
# Remove punctuation
clean_text = [Link](r"[^\w\s]", "", text)
# Convert to lowercase
clean_text = clean_text.lower()
# Split into words
words = clean_text.split()
print(words)