CodeNewbie Community 🌱

Cover image for Natural Language Processing 101
amananandrai
amananandrai

Posted on • Originally published at dev.to

Natural Language Processing 101

Introduction

Humans have tried to communicate with computers since the advent of these smart devices. Initially, punch cards were used to talk to large devices like ENIAC and UNIVAC, and then programming languages were developed for communicating with computer systems. The ultimate goal is to talk to humans or instruct them in the human-understandable language which is known as Natural Language. At the start of human-computer interaction, the languages were Assembly languages and then COBOL and FORTRAN which were easily interpreted by the machines but were difficult to understand by humans. Then programming languages were developed which were more human-understandable like SQL and Python. The number of natural languages present in the world is very large but the main focus of the research community is related to English.

In the present time, we can give voice commands to the computer systems and they respond to them. This is what we as humans are trying to achieve. In the commercial of a famous Automobile brand when the car understands the commands of its owner it is termed as "A Human Thing". We humans, try to talk to people to grow a bond with them. We also talk with our pets and even in some cases to non-living objects as well. If we receive a response from these things we feel a sense of connection with them. Communication helps in bonding. And if it is in the natural language then it is an immense joy.

Natural Language Processing

Natural Language Processing is the subset of Machine Learning which deals with the interpretation of natural language described above. NLP the abbreviation for Natural Language Processing is very famous among the Data Science and Machine Learning community. NLP helps to bypass programming languages to give commands to systems and allows us to use our voice and speech to give instructions. It basically breaks down the barriers of communication by allowing anyone, whether they have computing knowledge or not, to talk to bots, systems, apps, or any kind of software. The field of NLP is vast and research is constricted to just English but there are many languages present in the world and if we are able to make computers understand our local languages like Spanish, French, German, Afrikaans, Hindi, Tamil, Bengali, etc, then it would make the world a much better place. Computers would be able to assist humans in their daily tasks and even make the life of ordinary humans quite easy. It would not be necessary for common people to instruct computers to perform certain tasks to know about Programming languages. The general person can just say the commands and the computer performs the tasks.

NLP and its relation to Machine Learning

Machine learning, by definition, is a type of artificial intelligence that provides computers the ability to learn without being explicitly programmed. Machine learning finds patterns in data and based on that provides results. Machine learning can help NLP powered systems adjust actions according to the historical context and patterns it picks up in a conversation. Thus ML is one of the most important parts of NLP powered systems. The increase in the amount of data helps NLP models to better emulate human languages.

Things to learn for starting with NLP

There are different aspects of NLP. It has basically two parts - Natural language generation (NLG) and Natural language generation. The name itself explains that NLG means to generate sentences(language) and NLU means to understand the natural language of humans. GPT-3 which was one of the most famous word a few months ago is an NLG model which generates sentences based on given input and BERT which is a model used in Google search engine for NLU to process our queries and give answers based on them.

Some of the things whose knowledge can help in our road to glory in the path of NLP learning are-

  • Basic Linguistics
  • String Manipulation
  • Regular expressions
  • Data cleaning
  • Text analysis
  • Machine learning and Deep learning basics

Basic Linguistics is one of the essential parts of NLP apart from technical knowledge. One must know the basics of the language in which they are comfortable to build models for NLP. Knowledge of String Manipulation and Regular Expressions is required for starting with NLP. We are dealing with sentences and have to find patterns so string manipulation and regular expressions are required. Data Cleaning is one of the most important parts of any data science field. In NLP also it has a major role. We remove stopwords, emojis, punctuation marks to make Bag-of-Words which are used to train models. These things are done by the use of string manipulation and the help of regular expressions.

The most important part is Text Analysis in the NLP business. Various steps are there in the NLP pipeline which constitutes the Text analysis phase. Some of them are making n-grams. It is a collection of n consecutive words in a sentence which are used for finding the probability of the next word in sentence completion tasks or to fill up the missing words in sentences which are masked. Tokenization is another step in which the sentences are divided into tokens which consists of words, punctuation marks, etc. Stemming and Lemmatization are another steps in NLP pipeline, in Stemming we crop the words like 'cars' to 'car' and 'walking','walked' to 'walk' whereas in lemmatization means to get the root word using grammatical laws. An example of lemmatization is converting 'is', 'am', 'are' to 'be' as it is the root of all these words. One more important step is Part of Speech(POS) tagging in which the parts of speech of the different parts of sentences is identified. After performing these steps Machine learning and Deep Learning algorithms are used to perform various NLP tasks like Sentiment Analysis, Text Summarisation, Machine Translation, Question Answering, etc.


I hope this article has aroused interest in beginners about NLP and some more people will try to learn about NLP in near future.

Top comments (0)