Introduction To NLP - Part 1

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Natural Language

Processing

FREEDMORE freedmores@bac.ac.bw
SIDUME
Agenda:

• What is Natural Language Processing (NLP)


• Use cases and Applications
• Contributing Fields
• State of research
Introduction

• Humans communicate through some form of language


either by text or speech.
• To make interactions between computers and humans,
computers need to understand natural languages used
by humans.
• Natural language processing is all about making
computers learn, process, and manipulate natural
languages.
Definition

So, What is Natural Language Processing (NLP)?

• “NLP is an interdisciplinary field concerned with the


interactions between computers and natural human
languages (e.g. English) — speech or text.”

• NLP is a branch of artificial intelligence that deals with


analysing, understanding, and generating the
languages that humans use naturally in order to
interface with computers in both written and spoken
contexts using natural human languages instead of
Real Examples of NLP in Action

•Personal assistants: Siri, Cortana, and Google


Assistant.

•Auto-complete: In search engines (e.g. Google).

•Spell checking: Almost everywhere, in your


browser, your IDE (e.g. Visual Studio), desktop apps
(e.g. Microsoft Word).

•Machine Translation: Google Translate.


Real Examples of NLP in Action
Real Examples of NLP in Action
Spell Checking
Business Related Use Cases

•Fast-food chains receive a vast amount of orders and


complaints daily; manually handling this will be tiresome
and repetitive, also inefficient in terms of time, labour and
cost. Thanks to recent advancements in conversational AI,
they can build virtual assistants that automate such
processes and reduce human intervention.
Business Related Use Cases

•Brands launch new products and market them on social media


platforms; they can measure campaigns’ success rates using metrics
such as reach and number of interactions. Still, they can’t understand the
consumers’ public sentiment automatically. This task can be automated
using sentiment analysis, a text classification task where machine
learning models are trained to quantify affective states and subjective
information.
Linguistics and Computer Science.

NLP is mainly divided into two fields: Linguistics and Computer Science.
The Linguistics side focuses on understanding the structure of
language, including the following sub-fields 
• Phonetics: The study of the sounds of human language.
• Phonology: The study of the sound systems in human languages.
• Morphology: The study of the formation and internal structure of
words.
• Syntax: The study of the formation and internal structure of
sentences.
• Semantics: The study of the meaning of sentences.
• Pragmatics: The study of the way sentences with their semantic
meanings are used for particular communicative goals. The study
of the use of language to accomplish goals
Linguistics and Computer Science.

The Computer Science side is concerned with translating linguistic


knowledge and domain expertise into computer programs with the help
of sub-fields such as Artificial Intelligence.
Approaches to solving NLP Tasks

Scientific advancements in NLP can be divided into:


rule-based systems, classical machine learning models, and most
recently, deep learning models.
Approaches to solving NLP Tasks

•Rule-based systems rely heavily on crafting domain-specific rules


(e.g. regular expressions).
•It can automate simple tasks such as extracting structured data
(e.g. dates, names) from unstructured data (e.g. webpages, emails).
•Not robust, due to the complexity of human languages,
•Hard to maintain, and can’t generalize across different domains.
Approaches to solving NLP Tasks

•Classical machine learning approaches can solve more challenging


problems (e.g. spam detection).
•Uses feature engineering (e.g. bag of words, part of speech tags) to
build machine learning models.
•Those models exploit systematic patterns in training data and can make
predictions for unseen data.
Approaches to solving NLP Tasks

•Deep learning models are currently the most popular in NLP research


and applications.
•They generalize even better than the classical machine learning
approaches.
•It doesn’t need hand-crafted features or feature engineering because
they automatically work as feature extractors, enabling end-to-end
model training.
•Deep learning models learning capabilities are more powerful than
shallow/classical ML ones.
•Ground-breaking performance levels achieved
•State-of-the-art
NLP Tasks & Research (English language)

1. Mostly Solved:
•Text Classification (e.g. spam detection in Gmail).
•Part of Speech (POS) tagging: Given a sentence, determine the POS tag for
each word (e.g. NOUN, VERB, ADV, ADJ).
•Named Entity Recognition (NER): Given a sentence, determine named entities
(e.g. person names, locations, organizations).
NLP Tasks & Research (English language)

2. Making a Solid Progress:


•Sentiment Analysis: Given a sentence, determine it’s polarity (e.g. positive,
negative, neutral), or emotions (e.g. happy, sad, surprised, angry, etc)
•Co-reference Resolution: Given a sentence, determine which words
(“mentions”) refer to the same objects (“entities”). for example (Manning is a
great NLP professor, he worked in the field for over two decades).
•Word Sense Disambiguation (WSD): Many words have more than one
meaning; we have to select the meaning which makes the most sense based on
the context (e.g. I went to the bank to get some money), here bank means a
financial institution, not the land beside a river.
•Machine Translation (e.g. Google Translate).
NLP Tasks & Research (English language)

3. Still Challenging:
•Dialogue agents and chat-bots, especially open-domain ones.
•Question Answering.
•Abstractive Summarization.
•NLP for low-resource languages (e.g. African languages, see Masakhane and 
∀ et al., 2020).
Some More Interesting NLP Applications

finding appropriate documents on certain topics from a database


of texts (for example, finding relevant books in a library)

extracting information from messages or articles on certain topics (for example,


building a database of all stock transactions described in the news on a given
day)

translating documents from one language to another (for example,


producing automobile repair manuals in many different languages)

summarizing texts for certain purposes (for example, producing


a 3-page summary of a 1000-page government report)
Some More Interesting NLP Applications

question-answering systems, where natural language is used to


query a database (for example, a query system to a personnel database)

automated customer service over the telephone (for example, to


perform banking transactions or order items from a catalogue)
tutoring systems, where the machine interacts with a student
(for example, an automated mathematics tutoring system)

spoken language control of a machine (for example, voice control of a VCR or


computer)
Production-Level Applications

A computer program in Canada accepts daily weather data and


automatically generates weather reports in English and French

Over 1,000,000 translation requests daily are processed by the


Babel Fish system available through Altavista

A visitor to Cambridge, MA can ask a computer about places


to eat using only spoken language. The system returns relevant
information from a database of facts about the restaurant scene.
Prototype-Level Applications

Computers grade student essays in a manner indistinguishable


from human graders
An automated reading tutor intervenes, through speech, when the
reader makes a mistake or asks for help
A computer watches a video clip of a soccer game and produces a
report about what it has seen
A computer predicts upcoming words and expands abbreviations to
help people with disabilities to communicate
To Be Continued …

You might also like