Trending December 2023 # Pos Tagging With Nltk And Chunking In Nlp # Suggested January 2024 # Top 17 Popular

You are reading the article Pos Tagging With Nltk And Chunking In Nlp updated in December 2023 on the website We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested January 2024 Pos Tagging With Nltk And Chunking In Nlp

POS Tagging

POS Tagging (Parts of Speech Tagging) is a process to mark up the words in text format for a particular part of a speech based on its definition and context. It is responsible for text reading in a language and assigning some specific token (Parts of Speech) to each word. It is also called grammatical tagging.

Let’s learn with a NLTK Part of Speech example:

Input: Everything to permit us.

Output: [(‘Everything’, NN),(‘to’, TO), (‘permit’, VB), (‘us’, PRP)]

In this tutorial, you will learn –

Steps Involved in the POS tagging example:

Tokenize text (word_tokenize)

apply pos_tag to above step that is nltk.pos_tag(tokenize_text)

NLTK POS Tags Examples are as below:

Abbreviation Meaning

CC coordinating conjunction

CD cardinal digit

DT determiner

EX existential there

FW foreign word

IN preposition/subordinating conjunction

JJ This NLTK POS Tag is an adjective (large)

JJR adjective, comparative (larger)

JJS adjective, superlative (largest)

LS list market

MD modal (could, will)

NN noun, singular (cat, tree)

NNS noun plural (desks)

NNP proper noun, singular (sarah)

NNPS proper noun, plural (indians or americans)

PDT predeterminer (all, both, half)

POS possessive ending (parent ‘s)

PRP personal pronoun (hers, herself, him, himself)

PRP$ possessive pronoun (her, his, mine, my, our )

RB adverb (occasionally, swiftly)

RBR adverb, comparative (greater)

RBS adverb, superlative (biggest)

RP particle (about)

TO infinite marker (to)

UH interjection (goodbye)

VB verb (ask)

VBG verb gerund (judging)

VBD verb past tense (pleaded)

VBN verb past participle (reunified)

VBP verb, present tense not 3rd person singular(wrap)

VBZ verb, present tense with 3rd person singular (bases)

WDT wh-determiner (that, what)

WP wh- pronoun (who)


The above NLTK POS tag list contains all the NLTK POS Tags. NLTK POS tagger is used to assign grammatical information of each word of the sentence. Installing, Importing and downloading all the packages of POS NLTK is complete.

What is Chunking in NLP?

Chunking in NLP is a process to take small pieces of information and group them into large units. The primary use of Chunking is making groups of “noun phrases.” It is used to add structure to the sentence by following POS tagging combined with regular expressions. The resulted group of words are called “chunks.” It is also called shallow parsing.

In shallow parsing, there is maximum one level between roots and leaves while deep parsing comprises of more than one level. Shallow parsing is also called light parsing or chunking.

Rules for Chunking:

There are no pre-defined rules, but you can combine them according to need and requirement.

For example, you need to tag Noun, verb (past tense), adjective, and coordinating junction from the sentence. You can use the rule as below

Following table shows what the various symbol means:

Name of symbol Description

. Any character except new line

* Match 0 or more repetitions

? Match 0 or 1 repetitions

Now Let us write the code to understand rule better

from nltk import pos_tag from nltk import RegexpParser text ="learn php from guru99 and make study easy".split() print("After Split:",text) tokens_tag = pos_tag(text) print("After Token:",tokens_tag) chunker = RegexpParser(patterns) print("After Regex:",chunker) output = chunker.parse(tokens_tag) print("After Chunking",output)


After Split: ['learn', 'php', 'from', 'guru99', 'and', 'make', 'study', 'easy'] After Token: [('learn', 'JJ'), ('php', 'NN'), ('from', 'IN'), ('guru99', 'NN'), ('and', 'CC'), ('make', 'VB'), ('study', 'NN'), ('easy', 'JJ')] After Regex: chunk.RegexpParser with 1 stages: RegexpChunkParser with 1 rules: After Chunking (S (mychunk learn/JJ) (mychunk php/NN) from/IN (mychunk guru99/NN and/CC) make/VB (mychunk study/NN easy/JJ))

The conclusion from the above Part of Speech tagging Python example: “make” is a verb which is not included in the rule, so it is not tagged as mychunk

Use Case of Chunking

Chunking is used for entity detection. An entity is that part of the sentence by which machine get the value for any intention.

Example: Temperature of New York. Here Temperature is the intention and New York is an entity.

In other words, chunking is used as selecting the subsets of tokens. Please follow the below code to understand how chunking is used to select the tokens. In this example, you will see the graph which will correspond to a chunk of a noun phrase. We will write the code and draw the graph for better understanding.

Code to Demonstrate Use Case import nltk text = "learn php from guru99" tokens = nltk.word_tokenize(text) print(tokens) tag = nltk.pos_tag(tokens) print(tag) cp =nltk.RegexpParser(grammar) result = cp.parse(tag) print(result) result.draw() # It will draw the pattern graphically which can be seen in Noun Phrase chunking


['learn', 'php', 'from', 'guru99'] -- These are the tokens [('learn', 'JJ'), ('php', 'NN'), ('from', 'IN'), ('guru99', 'NN')] -- These are the pos_tag (S (NP learn/JJ php/NN) from/IN (NP guru99/NN)) -- Noun Phrase Chunking


Noun Phrase chunking Graph

From the graph, we can conclude that “learn” and “guru99” are two different tokens but are categorized as Noun Phrase whereas token “from” does not belong to Noun Phrase.

Chunking is used to categorize different tokens into the same chunk. The result will depend on grammar which has been selected. Further Chunking NLTK is used to tag patterns and to explore text corpora.


We have discussed various pos_tag in the previous section. In this particular tutorial, you will study how to count these tags. Counting tags are crucial for text classification as well as preparing the features for the Natural language-based operations. I will be discussing with you the approach which guru99 followed while preparing code along with a discussion of output. Hope this will help you.

How to count Tags:

Here first we will write working code and then we will write different steps to explain the code.

from collections import Counter import nltk text = "Guru99 is one of the best sites to learn WEB, SAP, Ethical Hacking and much more online." lower_case = text.lower() tokens = nltk.word_tokenize(lower_case) tags = nltk.pos_tag(tokens) counts = Counter( tag for word, tag in tags) print(counts)


Counter({‘NN’: 5, ‘,’: 2, ‘TO’: 1, ‘CC’: 1, ‘VBZ’: 1, ‘NNS’: 1, ‘CD’: 1, ‘.’: 1, ‘DT’: 1, ‘JJS’: 1, ‘JJ’: 1, ‘JJR’: 1, ‘IN’: 1, ‘VB’: 1, ‘RB’: 1})

Elaboration of the code

To count the tags, you can use the package Counter from the collection’s module. A counter is a dictionary subclass which works on the principle of key-value operation. It is an unordered collection where elements are stored as a dictionary key while the count is their value.

Import nltk which contains modules to tokenize the text.

Write the text whose pos_tag you want to count.

Some words are in upper case and some in lower case, so it is appropriate to transform all the words in the lower case before applying tokenization.

Pass the words through word_tokenize from nltk.

Calculate the pos_tag of each token Output = [('guru99', 'NN'), ('is', 'VBZ'), ('one', 'CD'), ('of', 'IN'), ('the', 'DT'), ('best', 'JJS'), ('site', 'NN'), ('to', 'TO'), ('learn', 'VB'), ('web', 'NN'), (',', ','), ('sap', 'NN'), (',', ','), ('ethical', 'JJ'), ('hacking', 'NN'), ('and', 'CC'), ('much', 'RB'), ('more', 'JJR'), ('online', 'JJ')]

Now comes the role of dictionary counter. We have imported in the code line 1. Words are the key and tags are the value and counter will count each tag total count present in the text.

Frequency Distribution

Frequency Distribution is referred to as the number of times an outcome of an experiment occurs. It is used to find the frequency of each word occurring in a document. It uses FreqDistclass and defined by the nltk.probabilty module.

A frequency distribution is usually created by counting the samples of repeatedly running the experiment. The no of counts is incremented by one, each time. E.g.

freq_dist = FreqDist()

for the token in the document:

For any word, we can check how many times it occurred in a particular document. E.g.

Count Method: freq_dist.count(‘and’)This expression returns the value of the number of times ‘and’ occurred. It is called the count method.

Frequency Method: freq_dist.freq(‘and’)This the expression returns frequency of a given sample.

We will write a small program and will explain its working in detail. We will write some text and will calculate the frequency distribution of each word in the text.

import nltk a = "Guru99 is the site where you can find the best tutorials for Software Testing Tutorial, SAP Course for Beginners. Java Tutorial for Beginners and much more. Please visit the site chúng tôi and much more." words = nltk.tokenize.word_tokenize(a) fd = nltk.FreqDist(words) fd.plot()

Explanation of code:

Import nltk module.

Write the text whose word distribution you need to find.

Tokenize each word in the text which is served as input to FreqDist module of the nltk.

Apply each word to nlk.FreqDist in the form of a list

Plot the words in the graph using plot()

Please visualize the graph for a better understanding of the text written

Frequency distribution of each word in the graph

NOTE: You need to have matplotlib installed to see the above graph

Observe the graph above. It corresponds to counting the occurrence of each word in the text. It helps in the study of text and further in implementing text-based sentimental analysis. In a nutshell, it can be concluded that nltk has a module for counting the occurrence of each word in the text which helps in preparing the stats of natural language features. It plays a significant role in finding the keywords in the text. You can also extract the text from the pdf using libraries like extract, PyPDF2 and feed the text to nlk.FreqDist.

The key term is “tokenize.” After tokenizing, it checks for each word in a given paragraph or text document to determine that number of times it occurred. You do not need the NLTK toolkit for this. You can also do it with your own python programming skills. NLTK toolkit only provides a ready-to-use code for the various operations.

Counting each word may not be much useful. Instead one should focus on collocation and bigrams which deals with a lot of words in a pair. These pairs identify useful keywords to better natural language features which can be fed to the machine. Please look below for their details.

Collocations: Bigrams and Trigrams What is Collocations?

Collocations are the pairs of words occurring together many times in a document. It is calculated by the number of those pair occurring together to the overall word count of the document.

Consider electromagnetic spectrum with words like ultraviolet rays, infrared rays.

The words ultraviolet and rays are not used individually and hence can be treated as Collocation. Another example is the CT Scan. We don’t say CT and Scan separately, and hence they are also treated as collocation.

We can say that finding collocations requires calculating the frequencies of words and their appearance in the context of other words. These specific collections of words require filtering to retain useful content terms. Each gram of words may then be scored according to some association measure, to determine the relative likelihood of each Ingram being a collocation.

Collocation can be categorized into two types-

Bigrams combination of two words

Trigramscombinationof three words

Bigrams and Trigrams provide more meaningful and useful features for the feature extraction stage. These are especially useful in text-based sentimental analysis.

Bigrams Example Code import nltk text = "Guru99 is a totally new kind of learning experience." Tokens = nltk.word_tokenize(text) output = list(nltk.bigrams(Tokens)) print(output)


[('Guru99', 'is'), ('is', 'totally'), ('totally', 'new'), ('new', 'kind'), ('kind', 'of'), ('of', 'learning'), ('learning', 'experience'), ('experience', '.')] Trigrams Example Code

Sometimes it becomes important to see a pair of three words in the sentence for statistical analysis and frequency count. This again plays a crucial role in forming NLP (natural language processing features) as well as text-based sentimental prediction.

The same code is run for calculating the trigrams.

import nltk text = “Guru99 is a totally new kind of learning experience.” Tokens = nltk.word_tokenize(text) output = list(nltk.trigrams(Tokens)) print(output)


[('Guru99', 'is', 'totally'), ('is', 'totally', 'new'), ('totally', 'new', 'kind'), ('new', 'kind', 'of'), ('kind', 'of', 'learning'), ('of', 'learning', 'experience'), ('learning', 'experience', '.')] Tagging Sentences

Tagging Sentence in a broader sense refers to the addition of labels of the verb, noun, etc., by the context of the sentence. Identification of POS tags is a complicated process. Thus generic tagging of POS is manually not possible as some words may have different (ambiguous) meanings according to the structure of the sentence. Conversion of text in the form of list is an important step before tagging as each word in the list is looped and counted for a particular tag. Please see the below code to understand it better

import nltk text = "Hello Guru99, You have to build a very good site, and I love visiting your site." sentence = nltk.sent_tokenize(text) for sent in sentence: print(nltk.pos_tag(nltk.word_tokenize(sent)))


[(‘Hello’, ‘NNP’), (‘Guru99’, ‘NNP’), (‘,’, ‘,’), (‘You’, ‘PRP’), (‘have’, ‘VBP’), (‘build’, ‘VBN’), (‘a’, ‘DT’), (‘very’, ‘RB’), (‘good’, ‘JJ’), (‘site’, ‘NN’), (‘and’, ‘CC’), (‘I’, ‘PRP’), (‘love’, ‘VBP’), (‘visiting’, ‘VBG’), (‘your’, ‘PRP$’), (‘site’, ‘NN’), (‘.’, ‘.’)]

Code Explanation:

Code to import nltk (Natural language toolkit which contains submodules such as sentence tokenize and word tokenize.)

Text whose tags are to be printed.

Sentence Tokenization

For loop is implemented where words are tokenized from sentence and tag of each word is printed as output.

In Corpus there are two types of POS taggers:


Stochastic POS Taggers

1.Rule-Based POS Tagger: For the words having ambiguous meaning, rule-based approach on the basis of contextual information is applied. It is done so by checking or analyzing the meaning of the preceding or the following word. Information is analyzed from the surrounding of the word or within itself. Therefore words are tagged by the grammatical rules of a particular language such as capitalization and punctuation. e.g., Brill’s tagger.

2.Stochastic POS Tagger: Different approaches such as frequency or probability are applied under this method. If a word is mostly tagged with a particular tag in training set then in the test sentence it is given that particular tag. The word tag is dependent not only on its own tag but also on the previous tag. This method is not always accurate. Another way is to calculate the probability of occurrence of a specific tag in a sentence. Thus the final tag is calculated by checking the highest probability of a word with a particular tag.

POS tagging with Hidden Markov Model

Tagging Problems can also be modeled using HMM. It treats input tokens to be observable sequence while tags are considered as hidden states and goal is to determine the hidden state sequence. For example x = x1,x2,…………,xn where x is a sequence of tokens while y = y1,y2,y3,y4………ynis the hidden sequence.

How Hidden Markov Model (HMM) Works?

HMM uses join distribution which is P(x, y) where x is the input sequence/ token sequence and y is tag sequence.

Tag Sequence for x will be argmaxy1….ynp(x1,x2,….xn,y1,y2,y3,…..). We have categorized tags from the text, but stats of such tags are vital. So the next part is counting these tags for statistical study.


POS Tagging in NLTK is a process to mark up the words in text format for a particular part of a speech based on its definition and context.

Some NLTK POS tagging examples are: CC, CD, EX, JJ, MD, NNP, PDT, PRP$, TO, etc.

POS tagger is used to assign grammatical information of each word of the sentence. Installing, Importing and downloading all the packages of Part of Speech tagging with NLTK is complete.

Chunking in NLP is a process to take small pieces of information and group them into large units.

There are no pre-defined rules, but you can combine them according to need and requirement.

Chunking is used for entity detection. An entity is that part of the sentence by which machine get the value for any intention.

Chunking is used to categorize different tokens into the same chunk.

You're reading Pos Tagging With Nltk And Chunking In Nlp

Career Insights: All You Need To Know About Nlp Engineers

learn everything about NLP Engineers: Role, qualifications, skills, top institutes, recruiters, etc.

Roles and responsibilities: Natural Language Processing Engineer helps in improving our NLP products and creating new NLP applications. NLP Engineer responsibilities include transforming natural language data into useful features using NLP techniques to feed classification algorithms. To succeed in this role, you should possess outstanding skills in statistical analysis, machine learning methods, and text representation techniques.

Average salary (per annum)- US$128,915


Proven experience as an NLP Engineer or similar role

Understanding of NLP techniques for text representation, semantic extraction techniques, data structures, and modeling

Ability to effectively design software architecture

Deep understanding of text representation techniques (such as n-grams, a bag of words, sentiment analysis, etc), statistics and classification algorithms

Knowledge of Python, Java, and R

Ability to write robust and testable code

Experience with machine learning frameworks (like Keras or PyTorch) and libraries (like sci-kit-learn)

Strong communication skills

An analytical mind with problem-solving abilities

Degree in Computer Science, Mathematics, Computational Linguistics, or similar field.

Top 3 Online Courses:

Data science, Code academy: Machine Learning, Data Science, Python, Regular Expression, NLTK, spaCy, TensorFlow, sci-kit-learn, and more.

The course is for those who want to understand how computers work with human language, learn techniques and libraries for data analysis, and create natural language processing tools. 

Coursera – Natural Language Processing Specialization: This course covers a wide scope of tasks in Natural Language Processing from essential to cutting-edge: sentiment analysis, summarization, dialogue state tracking, to give some examples. After finishing, you will have the option to perceive NLP tasks in your everyday work, propose approaches, and judge what strategies are probably going to function admirably.

Natural Language Processing (NLP) with Python NLTK – Udemy: The course is structured as a prologue to the crucial concepts of Natural Language Processing (NLP) with Python. Mainly centered around working with NLTK, it gives the possibility of such NLP tasks as word tagging and chunking. As an enhancement, it presents certain machine learning algorithms, for example, credulous Bayes.

Top Institutes Offering the Program:

M.S. in Statistics, Data Science :Science: Stanford University

Master of Science in Data Science: University of Washington

Master of Science in Analytics: Northwestern University

Top Recruiters for This Job:

Eliassen Group: Eliassen Group provides strategic consulting and talent solutions to drive our clients’ innovation and business results. Its purpose is to positively impact the lives of its employees, clients, consultants, and the communities in which we operate. Leveraging over 30 years of success, its expertise in talent solutions, life sciences consulting, Agile consulting, cloud services, risk management, business optimization, and managed services enables the company to partner with its clients to execute its business strategy and scale effectively. 

Judge Group: The Judge Group, celebrating its 50th anniversary, is a leading professional services firm specializing in talent, technology, and learning solutions. It consults, staff, trains, and solves. Through its work, it makes people and organizations better. Its services are successfully delivered through a network of more than 30 offices in the United States, Canada, and India. The Judge Group serves more than 50 of the Fortune 100 and is responsible for over 9,000 professionals on assignment annually across a wide range of industries.

Jobot: Jobot blends proprietary AI technology and experienced recruiting pros to create the first of its kind job matching engine. This unique blend of technology and recruiting skills make recruiting top talent and building a positive work culture possible for every company. 

Huxley Banking & Financial Services: It delivers expert permanent and contract recruitment services across the US and all major financial hubs globally. Its efficient structure consists of delivery teams split by vertical market specialization. Through its local market knowledge, Huxley’s extensive database, and the support of an established global network, it identifies professionals its competitors would struggle to find.

Backup And Restore Forms Data In Chrome And Firefox With Lazarus

Lazarus is available for both Chrome and Firefox. After installation, you should notice the Lazarus icon on the right corner of the text fields on any web site. If you mouse over the icon after entering information, a pop up should appear telling you that Lazarus is saving the form.

There’s nothing you need to do since the add-on is automatically enabled after installation. Lazarus acts as a backup tool for saving the things you type into a long and detailed online form.

After setting a password, the pop up should now prompt to enter a password before you can recover data on a form.

This is also where you can specify how many days to keep the saved forms (it’s defaulted to 10). Forms can be kept until a maximum of 14 days.

Note that this add-on does not currently work in WYSIWYG mode in Chrome, as declared in the add-on’s information page. It also does not save data from a drop down menu with pre-loaded lists. Only text that you manually type in is saved automatically, as soon as you finish typing and move on to the next field.

Some forms may require confidential information, like Social Security numbers, Credit Card details, to name a few. If you don’t plan on putting a password, then it is highly recommended that you use this add-on only on your own computer and not a shared one.

If you are keen with filling out forms online, then Lazarus is a great preemptive tool to prevent data loss and having to type it all in again.

Kim Barloso

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.

By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time.

Part 10: Step By Step Guide To Master Nlp – Named Entity Recognition

This article was published as a part of the Data Science Blogathon


This article is part of an ongoing blog series on Natural Language Processing (NLP). In the previous article, we discussed semantic analysis, which is a level of NLP tasks. In that article, we discussed the techniques of Semantic analysis in which we discussed one technique named entity extraction, which is very important to understand in NLP.

This is part-10 of the blog series on the Step by Step Guide to Natural Language Processing.

Table of Contents

1. What is Named Entity Recognition (NER)?

2. Different blocks present in a Typical NER model

3. Deep understanding of Named Entity Recognition with an example

4. How does Named Entity Recognition work?

5. Use-cases of Named Entity Recognition

6. How can I use NER?

What is Named Entity Recognition (NER)?

Let’s first discuss what entities mean?

Entities are the most important chunks of a particular sentence such as noun phrases, verb phrases, or both. Generally, Entity Detection algorithms are ensemble models of :

Rule-based Parsing, python

Dictionary lookups,

POS Tagging,

Dependency Parsing.

For Example,

In the above sentence, the entities are:

Date: Thursday, Time: night, Location: Chateau Marmont, Person: Cate Blanchett

Now, we can start our discussion on Named Entity Recognition (NER),

1. Named Entity Recognition is one of the key entity detection methods in NLP.

2. Named entity recognition is a natural language processing technique that can automatically scan entire articles and pull out some fundamental entities in a text and classify them into predefined categories. Entities may be,



Monetary values,

Percentages, and more.

People’s names

Company names

Geographic locations (Both physical and political)

Product names

Dates and times

Amounts of money

Names of events

3. In simple words, Named Entity Recognition is the process of detecting the named entities such as person names, location names, company names, etc from the text.

4. It is also known as entity identification or entity extraction or entity chunking.

For Example,

5. With the help of named entity recognition, we can extract key information to understand the text, or merely use it to extract important information to store in a database.

6. The applicability of entity detection can be seen in many applications such as

Automated Chatbots,

Content Analyzers,

Consumer Insights, etc.

Commonly used types of named entity:

                                                   Image Source: Google Images 

Different blocks present in a Typical Named Entity Recognition model

A typical NER model consists of the following three blocks:

Noun Phrase Identification

This step deals with extracting all the noun phrases from a text with the help of dependency parsing and part of speech tagging.

Phrase Classification

In this classification step, we classified all the extracted noun phrases from the above step into their respective categories. To disambiguate locations, Google Maps API can provide a very good path. and to identify person names or company names, the open databases from DBpedia, Wikipedia can be used. Apart from this, we can also make the lookup tables and dictionaries by combining information with the help of different sources.

Entity Disambiguation

Sometimes what happens is that entities are misclassified, hence creating a validation layer on top of the results becomes useful. The use of knowledge graphs can be exploited for this purpose. Some of the popular knowledge graphs are:

Deep understanding of NER with an Example

Consider the following sentence:

The blue cells represent the nouns. Some of these nouns describe real things present in the world.

For Example, From the above, the following nouns represent physical places on a map.

“London”, “England”, “United Kingdom”

It would be a great thing if we can detect that! With that amount of information, we could automatically extract a list of real-world places mentioned in a document with the help of NLP.

Therefore, the goal of NER is to detect and label these nouns with the real-world concepts that they represent.

So, when we run each token present in the sentence through a NER tagging model, our sentence looks like as,

Let’s discuss what exactly the NER system does?

NER systems aren’t just doing a simple dictionary lookup. Instead, they are using the context of how a word appears in the sentence and used a statistical model to guess which type of noun that particular word represents.

Since NER makes it easy to grab structured data out of the text, therefore it has tons of uses. It’s one of the easiest methods to quickly get insightful value out of an NLP pipeline.

If you want to try out NER yourself, then refer to the link.

How does Named Entity Recognition work?

As we can simple observed that after reading a particular text, naturally we can recognize named entities such as people, values, locations, and so on.

For Example, Consider the following sentence:

Sentence: Sundar Pichai, the CEO of Google Inc. is walking in the streets of California.

From the above sentence, we can identify three types of entities: (Named Entities)

( “person”: “Sundar Pichai” ),

(“org”: “Google Inc.”),

(“location”: “California”).

But to do the same thing with the help of computers, we need to help them recognize entities first so that they can categorize them. So, to do so we can take the help of machine learning and Natural Language Processing (NLP).

Let’s discuss the role of both these things while implementing NER using computers:

NLP: It studies the structure and rules of language and forms intelligent systems that are capable of deriving meaning from text and speech.

Machine Learning: It helps machines learn and improve over time.

To learn what an entity is, a NER model needs to be able to detect a word or string of words that form an entity (e.g. California) and decide which entity category it belongs to.

So, as a concluding step we can say that the heart of any NER model is a two-step process:

Detect a named entity

Categorize the entity

So first, we need to create entity categories, like Name, Location, Event, Organization, etc., and feed a NER model relevant training data.

Then, by tagging some samples of words and phrases with their corresponding entities, we’ll eventually teach our NER model to detect the entities and categorize them.

Use-Cases of Named Entity Recognition 

As we have discussed in the above section that the Named entity recognition (NER) will help us to easily identify the key components in a text, such as names of people, places, brands, monetary values, and more.

And extracting the main entities from a text helps us to sort the unstructured data and detect the important information, which is crucial if you have to deal with large datasets.

So, Let’s discuss some of the interesting use cases of Named Entity Recognition:

Customer Support

                                                    Image Source: Google Images

Let’s discuss the use case of customer support tickets where we deal with a rising number of tickets, there we can use named entity recognition techniques to handle the customer requests faster.

From a business perspective, if we automate the repetitive customer service tasks, such as categorizing customers’ issues, and queries, then it saves you valuable time. As a result, it helps to improve your resolution rates and boost customer satisfaction.

Here, we can also use entity extraction to pull the relevant pieces of information, like product names or serial numbers, which makes it easier to route tickets to the most suitable agent or team for handling that issue.

Gain Insights from Customer Feedback

                                                      Image Source: Google Images 

For almost all of the product-based companies, Online reviews are a great source of taking the customer feedback, as they can provide rich insights about what customers like and dislike about your products and the aspects of your business that need improvements for business increment.

So, here we can use NER systems to organize all the customer feedback and pinpoint recurring problems.

For Example, we can use the NER system to detect locations that are mentioned most often in negative customer feedback, which might lead you to focus on a particular office branch.

Recommendation System

                                                      Image Source: Google Images

Many modern applications such as Netflix, YouTube, Facebook, etc. rely on recommendation systems to produces optimal customer experiences. A lot of these systems rely on named entity recognition, which can give suggestions based on the user search history.

For Example, if you watch a lot of educational videos on YouTube, then you’ll get more recommendations that have been classified as entity education.

Summarizing Resumes

                                                   Image Source: Google Images

While recruiting new peoples, Recruiters spend many hours of their day going through resumes and finds for the right candidate. Each resume contains almost the same type of information, but their organized manner and formatting are different, so this becomes a classic example of unstructured data.

So, here with the help of an entity extractor, the recruitment teams can instantly extract the most relevant information about candidates, from personal information such as name, address, phone number, date of birth, and email, etc, to information related to their training and experience like certifications, degree, company names, skills, etc.

Some more use-cases of NER are:

Optimizing search engine algorithms,

Content classification for news channels, etc.

  How can I use NER?

If you work on a business problem statement, and if you think that your business could benefit from NER, then you can use it pretty easily with the help of the following excellent open-source libraries:

This ends our Part-10 of the Blog Series on Natural Language Processing! Other Blog Posts by Me

You can also check my previous blog posts.

Previous Data Science Blog posts.


Here is my Linkedin profile in case you want to connect with me. I’ll be happy to be connected with you.


For any queries, you can mail me on Gmail.

End Notes

Thanks for reading!


How Does Qw Function In Perl With Syntax And Examples?

Introduction to Perl qw

Web development, programming languages, Software testing & others


The Perl has some default set of operators that are being used for a set of operations to be performed after the script code execution. Likewise, the qw() is the operator and the function which has been used to split the sentence into each string by using some delimiters like single quotes, parentheses, etc. Mainly it returns the array of the elements as the list values.

@array = qw(some sentences based on the users input); Loop used for to iterate the values $variable (@array) { }

The above codes are the basic syntax for utilizing the qw() operators in the script. We can use any set of delimiters while we are passing the inputs to the method.

How does qw function in Perl?

The qw operator in Perl used to split the sentences that the user inputs may be the n number of lines they giving the input to the script. So it’s difficult to perform the operations in the script for storing and retrieving the datas from memory. Using delimiters, we can split the strings in various ways, but the string characters are split and equivalent to the corresponding user input values. The qw is the quote word that is related to the other operators like qq and q.

The user input datas are stored as the elements of the array because the list is the ordered set of collections using scalar type input variables and values, and the arrays are the variables that held to the lists in the Perl codes. We can extract every array element in the string datatype values; it may be out of scope in the list using some delimiters like space, commas, quotes, backslash, forward slash, etc. These are some default delimiters available in the Perl scripts. For each Perl script functions, the operators are assigned to the variable values using some default loops; the values are iterated and displayed on the output screens.

The user input as sometimes list formats the list is the set of sequence scalar values it can be used and delimiters the datas using parenthesis and comma operators. By using these operators, the list is to be constructed and also each value of the list is known as the list elements; these elements are to be some sorting type of ordered with indexed values. These values are to be set and allotted with some storage positions in the memory. Quote function uses the embedded type of whitespaces. If we use non-alphanumeric characters in the strings, we use the q/ and q// operators as delimiters; the list is any type which they have used in the elements.

Each set of list elements are stored at a specific position in the memory list. The range set of operators is performed using these functions not only for the strings; by using the qw; we can avoid the quote marks. We entered the datas less in the list we use a punctuation set of characters as the delimiters in the array variables. Whenever the delimiters used, the opening and closing parenthesis are must be the same in the array elements.

Examples of Perl qw

Here are the following examples mention below

Example #1 #!/usr/bin/perl use warnings; use strict; my @months = qw(Dec Nov Oct Aug July June May Apr Mar Feb Jan); $months[0] = 'June'; @months[1..6] = qw(December November October August July June May April March February January); print("@months","n"); my @var1 = sort @var; print("@var1","n"); my @first = qw(Welcome To My DOmain kdjhv hkdsjbjkfw     qwdkhefj90898 iwidhfkjbdfkdh   qwdjehfkdbj o                                   qhkwdbjfqwljdk    qwhkdbjvjn wqdljkhfjb    qwkjefdb   qwjkdhbf qwkdhfjbdf wqihkewfj 2oiewhlfkj iwqehwfgkjdb eihwfjfb ewihfugejdv  owhefb oiewhkbd  qwdhksjb qiowhew); my @second = sort @first; print("@second","n");


Example #2


#!/usr/bin/perl use warnings; use strict; my @expn=(); @expn = ('12', '763', '127344', '73784','629387867', '23784', '82347', '346c', '73', '387', '83', '8374r', '83', '467', '837', '874', '93897', '3748', '784', '93'); @expn = qw/12 763 127344 73784 629387867 23784 82347 346c 73 387 83 8374r 83 467 837 874 93897 3748 784 93/; my %vars = (); while (my ($keys, $values) = each %vars) { }


Example #3


#!/usr/local/bin/perl use strict; use warnings; my %example = (); %example = qw( 1 718253 6253 welcome To My Domain kjagdsvj j kqwdbvwjkdfd lwjekfjwekjlfwekljf helfkjvwekjfhkwerhrfj kwejf kehgf wekrjg ewkhrjgh ewiiurh erjh 298 98 9028 928 cguh 2983 2763 jqwhevg 728365 28937 wdghe 298376 sdhgc 2837we sjdhg 3847 siudy 23847re6 sdedf 237eyr wdjh 23847r ewuy23  3847 weduf233 384 sjd qiwh 987 kjh 978 kjwqegh 786 ); foreach my $var (sort keys %example) { }


In the above three examples, we used the qw() operator with different scenarios; we can use the operator using some methods like sorting, unsorting, slicing the elements in the both array and list of the script.


In Perl scripts, we used different operators, keywords, variables, and functions to create the applications using text manipulations, data securities, other IT, System-related issues, Web development, and network programming concepts. In that programming concept, this operator is must be concatenated and split the huge datas using some delimiters technique.

Recommended Articles

This is a guide to Perl qw. Here we discuss How does qw function in Perl and Examples along with the codes and outputs. You may also have a look at the following articles to learn more –

Best Iphone 14 And 14 Pro Cases With Stand In 2023

Do you want protection against shocks while reading, binge-watching movies, or FaceTiming for your new iPhone 14? You can get all these by using an iPhone 14 case with a stand. The stand will enable you to go hands-free and view your iPhone in landscape or portrait mode. Also, these cases are sturdy enough to withstand drops. I have rounded up the best kickstand cases for iPhone 14 and 14 Pro. Check out below!

1. Spigen tough armor case – Editor’s choice

Spigen is the most well-known brand in the iPhone accessories industry. The Tough Armor with MagSafe compatibility offers multi-layered protection for better drop safety. Besides, it has Spigen’s signature Air Cushion Technology and Extreme Protection Tech of military-grade shock absorption standards. Also, it’s made of PC, TPU, and Impact Foam for longevity. 

The raised edges and lips safeguard the screen and camera from scratches and damage. Also, the tactile buttons provide you with reliable feedback and simple pressing. The built-in kickstand is durable and convenient for hands-free viewing. I liked its added grip at the corners and dual-tone matte finish. However, the hole cutout design didn’t work for me.


Extra grip

Optimal slimness



Weak magnets to hold on car vents

2. OtterBox Defender Series case – Just classic

OtterBox Defender Series, renowned for its tough case, comes with a multi-layer structure. Its DROP+ protection can endure 4X more drops than the military standards. Besides, the polycarbonate shell with synthetic rubber slipover is shock-absorbing and has 50% recycled plastic. So, your iPhone is safe from damaging drops, scratches, and bumps. 

I liked the port covers that prevent dust and dirt buildup. Though there are no built-in magnets, the case supports Qi and MagSafe wireless charging. Additionally, the supplied polyester holster is a 2-in-1 belt clip and a hands-free kickstand. The material is fully appropriate for 5G networks and includes a lifetime limited OtterBox guarantee.


Textured edges

Added bumpers

Port covers


No magnets in case

Bulky holster

3. ESR metal kickstand case – Crystal clear

This ESR crystal clear case is durable, thanks to the scratch-resistant acrylic back. Its Air-Guard corners, raised screen edges, and camera guard provide certified protection against drops, shocks, and bumps. Also, the soft shock-absorbing and non-slip polymer sides of this iPhone 14 Pro kickstand case provide a nice grip and great in-hand feel.

Besides, its highly modifiable kickstand offers 3 stand modes. So, you can adjust the hands-free viewing angle to 60 degrees and use your phone in landscape or portrait mode. Also, your stand will remain steady for a longer period thanks to a sturdy hinge and aluminum alloy patented design. This compact case offers wireless charging, so you can juice your phone without removing it.


1.2mm Raised edges and 0.5mm camera lip

Reinforced air-guard corners



Turns yellow

4. SUPCASE Unicorn Beetle Pro case – 360° Full-body protection

SUPCASE Unicorn Beetle Pro case has a back cover, screen protector, and a holster with a belt clip. It’s the winner of CNET’s “Best Case Scenario” drop test (20ft protection). Actually, the case is made of dual-layer hybrid polycarbonate back and shock-absorbing TPU bumper for extreme durability.

Besides, the front cover has a built-in screen protector. So, your display is shielded against scratches without compromising on touch sensitivity. The built-in kickstand enables both portrait and landscape viewing. There is a rotating and removable belt clip with a swivel for simple usage. What’s more? It is compatible with wireless charging.


20ft Drop protection

Reliable screen protector



5. Encased kickstand case – Thin screen protection

Encased Kickstand Series armor case has a scratch-resistant clear PC backplate and multi-layer protection design. Also, the mil-standard shockproof and ultra-protective bumper safeguards your iPhone from 10 ft drop damage. The reinforced camera guards keep the camera frame away from the surface. 

Besides, the supplied high-clarity screen protector is made of 2x toughened tempered glass. The case offers a seamless fit and wraps your iPhone to protect it from all sides. Also, the sturdy metal kickstand is made to endure and is constructed for robustness. Therefore, it won’t pop out or break as plastic patterns do.


10ft Drop protection

Reinforced corners

Durable metal hinge


Tempered glass screen protector cracks easily

6. TORRAS MarsClimber case – Premium matte finish

TORRAS iPhone 14 Pro case with stand has a contemporary bezel design, side laser texture, and translucent matte coating imported from Germany. So, it offers an outstanding ergonomic grip and a smooth feel without gathering lint. Besides, the back panel is covered with a nano-oleophobic and hydrophobic coating. 

Therefore, it prevents smudges, fingerprints, and scratches. The best part is the case is only 0.04 inches and is lightweight. Also, the dark grey hue will never fade or get filthy, so it’s long-lasting. You will get 8ft mil-grade drop protection thanks to the flexible TPU frame, 4 corners with internal X-SHOCK tech, and 360° honey-comb anti-shock airbags on both sides. 


3D Airbags design

Internal anti-shock cushion

360° Honeycomb pattern


Slippery in hand

7. MyBat Pro Stealth Series case – With ring holder

The MyBat Pro Stealth iPhone 14 Pro case with kickstand is tough and has dual-layered military-grade protection to withstand shocks and bumps. Its non-slip surface provides a good grip, and the elevated bezel edge prevents scratches. Besides, the case guards against germs and bacteria thanks to the anti-microbial lining. 

You may use the stylish and unobtrusive ring holder as a vertical kickstand. So, enjoy hands-free movie watching or FaceTiming your buddies. With the case’s integrated metal plate, you can easily attach your iPhone with any magnetic mount. But it doesn’t support wireless charging. Besides, the snug fit ensures easy access to all buttons and ports.


Non-slip bumper grip

Anti-microbial lining 

Built-in ring holder 


Not wireless charging compatible

8. SHEILDON wallet case – For leather aficionados

SHEILDON high-quality genuine leather case has precisely crafted oil wax cowhide leather. Therefore, the surface is scratch-resistant, shinier, and more streamlined. Your phone is protected from scratches, drops, and bumps thanks to a soft, full-body casing with a shockproof edge. Also, the thicker lips surrounding the lens safeguard your camera.

You can store 4 cards and bills in wallet slots. The magnetic closure and RFID-blocking technology keep everything secure. Besides, the folding stand enables viewing in landscape orientation. The precise cutouts enable you to access all functionalities conveniently. But the magnetic closing mechanism will become less effective if you insert many cards.


Genuine cowhide leather

Invisible kickstand

Magnetic closure


 Not suitable for Magsafe chargers

So, that’s all for today, folks!

The iPhone 14 or 14 Pro kickstand cases are best for using your device in hands-free mode. Some cases come with built-in screen protectors, but sometimes they are bulky or do not support MagSafe or wireless charging. Besides, there are several cases for iPhone 14 and 14 Pro. Check these out before making a purchase.

Explore more…

Author Profile


Ava is an enthusiastic consumer tech writer coming from a technical background. She loves to explore and research new Apple products & accessories and help readers easily decode the tech. Along with studying, her weekend plan includes binge-watching anime.

Update the detailed information about Pos Tagging With Nltk And Chunking In Nlp on the website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!