Home > Courses > Artificial intelligence (CSC 309) > Natural Language Processing (NLP)

Natural Language Processing (NLP)

Subject: Artificial intelligence (CSC 309)
Natural Language Processing (NLP) is a field of Artificial Intelligence (AI) that enables computers to understand, interpret, and generate human language such as English, French, Yoruba, or Arabic.
It sits at the intersection of computer science, linguistics, and machine learning.





In simple terms, NLP allows machines to read, listen, and respond to human language.

Examples you use every day:
- ChatGPT and chatbots
- Google Translate
- Voice assistants (Siri, Alexa)
- Spam email filters
- Text autocomplete

How NLP Works (Basic Pipeline)


A typical NLP system follows these steps:
Step 1: Text Input: for example sentence "AI is transforming education."
Step 2: Preprocessing: Cleaning and preparing text.
Common preprocessing tasks:
- Lowercasing
- Removing punctuation
- Tokenization: splitting text into words or sentences
- Removing stopwords: filtering out common words (like "the", "is") that don’t add meaning. For example: ["ai", "transforming", "education"]

Step 3: Text Representation: convert text to numbers. Using methods is as
- Bag of Words
- Word embeddings (Word2Vec, GloVe)
- Transformers (BERT, GPT)

Step 4: Model Processing: machine learning or deep learning model analyzes the text.
Step 5: Output: For examples:
- Sentiment: Positive
- Translation
- Chatbot reply

Key NLP Tasks


1. Tokenization: Breaking text into words or sentences. "I love AI" → ["I", "love", "AI"]
2. Part-of-Speech Tagging: Identify grammar roles. AI (noun) is (verb) powerful (adjective)
3. Named Entity Recognition (NER): find names, places, organizations. For exmaple "Google is in USA"
Google= Organization, USA = Location

4. Sentiment Analysis: Detect emotion or opinion. For example "I love this course" = Positive
5. Machine Translation: Translate languages. Hello = Bonjour
6. Text Summarization: Shorten long documents automatically.

NLP Libraries in Python


Popular tools:
- NLTK: basic learning
- spaCy: industrial NLP
- Transformers (HuggingFace): modern AI
- TextBlob: simple tasks

We will be suing NLTK in this course


By: Vision University

Comments

No Comment yet!

Login to comment or ask question on this topic


Previous Topic