What is NLP — Natural Language Processing Part — II

Hussain Wali
3 min readDec 25, 2020

In our previous discussion we got introduced to NLP and saw few of the major applications developed using NLP. In this section we’ll go one step further and see what is NLP up close.

Natural Language Processing is the branch of computer science focused on developing systems which can allow computers to understand us humans in our own everyday languages. It is a field with many roots. It also helps us understand our own languages better. It’s heavily depended on Linguistics so sometimes it is also called Computational Linguistics.

Few of the areas related to NLP are:

i. Artificial Intelligence

ii. Formal Language (Automata) Theory

iii. Machine Learning

iv. Linguistics

v. Psycholinguistics

vi. Cognitive Science

vii. Philosophy of Language

NLP ! But Why ?

Why did humans develop lanuages?

The goal in the production and comprehension of Natural Language Processing is communication. Well what is communication? Communication is delivering your message to someone in order for them to understand you. In NLP we have to consider both sides of the communication: the speaker’s side and the listener’s side. For the Speakers’ side the three steps of Communication: Intention, Generation and Synthesis.

  • Intention — also known as content selection, strategic generation. It is deciding when and what information to transmit
  • Generation — also known as surface realization, tactical generation. Translate the information to be communicated (in internal logical representation or “language of thought”) into string of words in desired natural language.
  • SynthesisOutput the result in the desired modality, text or speech

For the Listeners’ side the comprehension steps are:

  • Perception — Map input modality to a string of words, e.g., optical character recognition (OCR) or speech recognition.
  • Analyisis — Determine the information content of the string.

i. Syntactic interpretation (parsing): Find the correct parse tree showing the phrase structure of the string.

ii. Semantic Interpretation: Extract the (literal) meaning of the string (logical form)

iii. Pragmatic Interpretation: Consider effect of the overall context on altering the literal meaning of a sentence.

  • Incorporation — Decide whether or not to believe the content of the string and add it to the knowledge base (KB).

Before moving on let’s see the difference between syntax, semantic and pragmatics:

Syntax: concerns the sentence structure, rules of grammar and the proper ordering of words and its affect on meaning. The different ordering of the words completely changes the meaning of the sentences e.g., the dog bit the boy, the boy bit the dog, bit boy dog the the,

Semantic: [study of meaning of sentence] concerns the literal meaning of the words, phrases and sentences. This means analyzing the meaning of a word when used in a specific way in a sentence. For example “plant” can be used as a photosynthetic organism (noun), a manufacturing facility (noun), as the act of sowing (verb).

on Syntax level this sentence correct: “a rabbit chased the dog through the lawn”

But Semantically this sentence doesn’t make sense because we know a rabbit will never be chasing a dog.

Pragmatics: [study of meaning of a sentence within a certain context]considers the overall context. It concerns the overall communicative and social context and its effect on interpretation. For example you have a green light, you have a green ambient lightening, green light while driving a car, go a head on a project, possess a green light bulb.

writersdigest concludes these nicely:

“Syntax is what we use to do our best to communicate on the most basic level. Semantics helps us determine if there’s any meaning to be found. Pragmatics enables us to apply the correct meaning to the correct situation.”

If you have read this far you are awesome! please leave a comment with you suggestions/criticism. Don’t forget to follow me for our next discussion.

--

--

Hussain Wali

Software Engineer by profession. Data Scientist by heart. MS Data Science at National University of Science and Technology Islamabad.