Natural language processing and robotic process automation

Listen to this lesson

Episode 11 · 60:17

Every episode of this course is also a podcast: listen on Spotify.

This episode is a study companion for CompTIA Data+ DA0-002 and is not produced by or endorsed by CompTIA.

Objective 1.5 · Data concepts and environments · 20% of the exam

Why this matters

A large share of an organisation's data is text: survey comments, support tickets, emails, reviews, contracts. It does not fit in a table until something turns it into one. And a large share of routine data work is repetitive clicking: copying figures from one system into another, downloading the same report every morning. Natural language processing and robotic process automation are the two technologies aimed at those two problems.

The exam asks you to recognise both and to know what each is suited to. This lesson covers how text becomes data, what common text tasks produce, what robotic process automation is, where it belongs in a data pipeline, and why automated output still needs checking.

The lesson

Turning text into data: tokens, frequencies and sentiment

Natural language processing (NLP) is the field of AI concerned with understanding and producing human language. For an analyst, its first job is turning text into something that can be counted.

The starting step is tokenisation: splitting text into units, usually words, called tokens. Around it sit some common preparation steps: converting to lower case, removing punctuation, removing stop words such as "the" and "and" that carry little meaning, and reducing words to a base form so that "delivered", "delivering" and "delivery" can be counted together, through stemming (cutting to a crude root) or lemmatisation (reducing to a dictionary form).

Once text is tokenised, the simplest analysis is frequency: which words or phrases appear most often. Counting two-word phrases, called bigrams, is often more informative than single words, because "not good" and "good" mean opposite things.

Sentiment analysis classifies text as positive, negative or neutral, or gives it a score. It is widely used on reviews and survey comments. It works reasonably well on plain statements and struggles with sarcasm, negation, mixed feelings and domain-specific language: "sick" is praise in one context and a complaint in another. The course's survey data lets you compare comment sentiment with the numeric satisfaction score, which is a good test of whether a sentiment method agrees with what respondents actually said.

Named entities, classification and summarisation of text

Beyond counting words, NLP performs tasks that extract structure.

Named entity recognition (NER) finds and labels names of things in text: people, organisations, places, dates, amounts, products. It can turn a support ticket into structured fields such as the product mentioned and the date of the problem.

Text classification assigns a document to a category: routing a ticket to billing or technical support, or tagging a comment by topic. It is supervised learning applied to text, trained on examples already labelled.

Topic modelling is the unsupervised counterpart, grouping documents by the themes they share without predefined categories.

Summarisation condenses long text into a short version, and translation converts between languages. Modern large language models perform many of these tasks well, with the same caveat as any generative model: output must be checked, especially where it will be counted, reported or acted on.

For an analyst, the value of all these tasks is the same: they convert unstructured text into structured columns that can then be filtered, grouped and joined like any other data.

Robotic process automation: software that repeats clicks

Robotic process automation (RPA) uses software "bots" to perform repetitive tasks by interacting with applications the way a person would: opening screens, clicking buttons, copying values, filling in forms, downloading files. It records or is configured with a sequence of steps and repeats it reliably.

RPA suits tasks that are rule-based, high-volume and repetitive, with stable, structured inputs: copying invoice details from emails into a finance system, downloading a report from a portal every morning, moving data between two systems that have no integration. Its advantage is that it works with existing applications through their user interfaces, without needing an API or changes to the systems themselves.

Its weakness follows from the same fact. Because a bot depends on screens looking the way they did when it was built, a changed layout, a renamed button or an unexpected pop-up can break it, sometimes silently. RPA is therefore best seen as a practical bridge where no better integration exists, not as a substitute for one.

Automation against analysis: where RPA fits in a data pipeline

It helps to separate three kinds of automation that are often confused.

RPA automates actions in user interfaces. Workflow and pipeline automation, such as scheduled ETL jobs, moves and transforms data between systems through their data interfaces: databases, files and APIs. Machine learning makes predictions or judgements from data.

In a data pipeline, RPA usually appears at the edges: collecting data from a system that offers no export or API, or entering results into a system that accepts nothing else. Where a proper interface exists, a pipeline should use it, because a database query or API call is faster, more reliable and easier to monitor than a bot clicking through screens.

The combination of the three is sometimes called intelligent automation: for example, a bot collects scanned forms, NLP extracts the fields, a rule or model decides how to route each one, and a pipeline loads the result into the warehouse.

Checking automated output before anyone relies on it

Automation repeats mistakes as reliably as it repeats correct work. A bot that copies the wrong column does so every day. A text classifier that mislabels a category mislabels it thousands of times. A sentiment model that misreads negation skews every summary built on it.

The protection is the same checking applied to any data source, built into the process:

  • Reconcile counts: the number of records processed should match the number received, and differences should be logged.
  • Validate outputs: fields should have expected types and allowed values, and totals should be checked against a source.
  • Sample manually: review a random sample of automated results regularly, especially for NLP, where a human can see errors a count cannot.
  • Monitor for failure: a bot or pipeline should report when it fails or processes nothing, rather than silently producing an empty output.
  • Keep a human in the loop for decisions that matter, with the automation preparing rather than making them.

Practise what you just read

1. A sentiment model scores the comment not good at all as positive. What is the most likely reason?

Select one

  1. It counted good as positive and missed the negation
  2. It lemmatised good into better, which is positive
  3. It removed good as a stop word before the scoring
  4. It treated the comment as spam and scored it blank
Show answer

A. Sentiment analysis struggles with negation, sarcasm and mixed feelings. A method that scores single words sees good and misses not; counting bigrams such as not good is one way to capture the reversal.

2. A bot copies figures from a supplier portal into the finance system every morning. The portal is redesigned. What is the main risk?

Select one

  1. The bot stops the portal redesign from ever being released
  2. The finance system flags the bot's entries as copies
  3. The bot switches to the portal's API automatically
  4. The bot fails or copies wrong values, possibly silently
Show answer

D. RPA bots work through user interfaces and depend on screens looking as they did when the bot was built. A changed layout, renamed button or pop-up can break a bot, sometimes without any error, so monitoring matters.

3. A support team wants each ticket's product name and problem date extracted into columns. Which NLP task does this?

Select one

  1. Text sentiment analysis
  2. Topic modelling of text
  3. Named entity recognition
  4. Tokenisation of words
Show answer

C. Named entity recognition finds and labels things such as products, organisations, places and dates in text, turning unstructured tickets into structured fields that can be filtered and counted.

7 more questions on this objective are part of the full course.

Practise the full question bank in the exam simulator

Hands-on labs

All hands-on labs

This is an independent study companion for CompTIA Data+ DA0-002 and is not produced by or endorsed by CompTIA.