Every time I hear my kids ask the TV to play a movie, I can’t help but wonder, “Will all software end up as Siri someday?” Even if voice interactions won’t become so ubiquitous, Natural Language Processing (NLP) is already so immersed in our lives, we simply don’t notice it.
For example, we love how Google prompts the next word in our search query or when, once in a while, we get a helpful answer from a chatbot, right? That’s just the tip of the NLP iceberg, though.
If you want to build an NLP app and gain value from automatically processing text or speech, I welcome you to start your research here.
- The core of building any NLP app is creating effective ML models integrated with an intuitive user-facing app and an admin portal for managing the software rules.
- NLP app development requires a well-seasoned team of developers with Python expertise, familiar with tools like CoreNLP, Python NLTK, or PyTorch-NLP.
Table of Contents:
- NLP Overview
- Types of NLP Applications
- Most Interesting Applications of Natural Language Processing in Business
- Most Popular Natural Language Processing Tools
- How to Create a Natural Language Processing (NLP) Application?
- Should You Buy or Build a Natural Language Processing App?
Just a couple of words about NLP to make sure we’re on the same page. Natural language processing is about how software “understands” users’ input, whether speech and/or text messages. The output doesn’t really matter.
Think about that, our NLP software may parse some data from a document and then pass it on to another system, e.g., an EHR, without necessarily replying to the user. Or this same app can engage in a conversation with a user to elicit more info. What matters is how well the software interprets the user’s input; hence NL Processing.
The output matters less in the sense that our software uses the data it gathered from its NLP capabilities to produce it. However, this output (often invisible to the user) is not directly produced by the NLP (or NLU, Natural Language Understanding) functionality.
On a high level, we just need to understand that NLP apps use hard computer science to analyze either speech or texts or both.
Benefits of NLP
Like any software, NLP-using programs really start shining when we need to automate manual processes. In the case of NLP, these processes have to do with automatic speech or text parsing. As a result, businesses can provide:
- Immediate customer support, available 24/7
- Execution of various commands (e.g., one app we built starts recording a video of a physiotherapy exam with a voice command)
- Process large amounts of data faster to help with decision making
- Lower operational costs because of streamlined and automated processes
- Greater customer satisfaction and improved staff morale
Related: Artificial Intelligence in Healthcare
Types of NLP Applications
I’m pretty sure you already have some idea of what you want to build. So let’s quickly jump over some typical NLP software types.
Unsurprisingly, many NLP apps revolve around language usage:
- Grammar and spelling checkers of all sorts, like Grammarly
- Machine translation
- Document reading
Other notable types of NLP applications include:
- Virtual assistants, voice assistants
- Advanced data filtering (e.g., smart email folders in Gmail)
- Credit scoring
- Market intelligence analysis
Most Interesting Applications of Natural Language Processing in Business
From the business perspective, we may use NLP to automate communications with customers or employees and quicker process large amounts of data.
We’re currently working on a healthcare NLP-enabled app, using ML algorithms to process medical documentation, notes, etc. The software automatically assigns CPT codes to all provided services. Among other things, such as increased efficiency, this app helps providers get reimbursement faster.
Another exciting example is the MVP we built for assessing mental health and recommending appropriate content based on user input.
As for a chatbot, take a look at Babylon Health. The tool efficiently analyzes speech or text to interpret patients’ symptoms and provides relevant advice.
Related: Healthcare Chatbots
Also Read: How to Build a Chatbot
Most Popular Natural Language Processing Tool
I’m not sure if a list of NLP tools will help you make a sound choice, but let’s go over a few most prominent solutions. They exist so that your AI developers don’t have to start from scratch and waste months (or even years) on getting basic NLP tasks done.
Stanford’s CoreNLP — open-source Java-based library for human language processing with all required NLP arsenal, like sentiment analysis, part of speech tagging, named entity recognition, context evaluation, etc.
Python NLTK — the most popular Python-based natural language toolkit for developing NLP apps of any complexity. Supports unstructured data, text classification, text summarization, speech recognition, and virtually all other NLP features.
Apache’s OpenNLP — an ML toolkit for providing tokenizers, extraction of named entity, sentence segmentation, coreference, parsing, part-of-speech tagging, chunking, etc.
Other honorable mentions include TextBlob, Spacy, gensim, Boilerpipe, Streamlit, WordNet, BLLIP parser, nlpnet, spaCy, fastText, semaphore, practnlptools, syntaxNet, word2vec, Sempre, Mallet.
How to Create a Natural Language Processing (NLP) Application?
When building NLP applications, we need to realize one thing — we’re dealing with Machine Learning applications. Whatever the flashy interfaces or lack thereof we want to visualize, what really delivers value to our business will be ML algorithms.
“Ok, so what?” you might ask. Well, the thing is, NLP app development differs from how we create “regular” apps. And here’s how.
If you remember the drill from our previous blogs, we usually follow these steps:
- Rapid Prototyping + Design
- Development + QA
- Deployment + Maintenance
This usual flow looks a little different when we want to build apps with natural language processing. There will be an additional step:
- Functional PoC
- Rapid Prototyping + Design
- the rest of the steps from the usual routine (see above)
If you reflect on this change in the development process, you’d have to agree that it’s very natural. Why spend time and resources crafting an engaging user interface and everything else if our NLP idea doesn’t fly?
And the only reason it won’t fly has everything to do with the ML aspect of our app. Hence, we need to introduce a functional prototype (also known as a proof of concept).
So let’s review all the steps of developing NLP applications we’ve just identified a little closer. By the way, there’s another not-so-evident change to the process caused by the ML part, and we have to take that into account.
Also read: Building a loan calculator using machine learning
Step #1: Discovery
“Who, why, and how will use our NLP software?” — all the typical questions we’d need to answer as we go through the discovery step.
Only in this case, we also need to look at the AI capabilities of projected software:
- Will it parse audio/video recordings or live speech?
- Will it process texts?
- What is the desired output driving the value?
To make our NLP useful, we need to research available datasets:
- Will the business generate enough data?
- Can we use any open-source datasets?
- What is data quality?
During this strategic session, we will identify critical features and how they align with user needs and business ROI goals; plus, consider key ML aspects of the app. This also includes:
- designing data acquisition workflows
- assessing an initial dataset on size, quality, and information available
- defining the project scope and applicable ML models
- selecting an appropriate ML framework and other technologies
Eventually, all these activities lead us to the next logical step: building a functional prototype or a proof of concept.
Step #2: Functional PoC
What is a proof of concept, and why do we need it? PoC development was a mojo at every other start-up in the 2010s: slap something quickly together and throw it into the market to see if it swims.
And even though we know that products have zero chance to swim when introduced to the public in the PoC format, it still works to verify our NLP idea.
We don’t build a proof of concept to wow the public. We don’t even show it to end-users, for that matter. On the contrary, we just need to check that the app plays its AI part according to our vision. So how exactly do we do that?
In a nutshell, we build an ML model and feed it the data. Then look at the output and evaluate the model’s performance in relation to our business goals. If we zoom in a little, this step involves:
- data cleansing (removing formatting, errors, and other noise)
- data formatting according to commercial and/or regulation requirements
- implementing and training a model using different frameworks
- testing our model on a separate (brand-new to the model) dataset
- analyzing errors
The good news is we don’t need to think about the UI yet, right? All we need right now is to make sure that the ML algorithms get us the required output aligned with the business objectives.
Related: Machine Learning in Healthcare
Step #3: Rapid Prototyping and Design
Ok, so what’s the next step in building natural language processing (NLP) applications? It’s time to bring on some colors. What do you think? Yes, we ask our design team to craft the UI/UX that will make our end-users happy.
Here’s the first caveat: we might need zero or a basic UI. Usually, that happens when an NLP app is intended for internal use.
Let’s say we want to automate CPT coding by analyzing EHR records and other medical documentation. The parsed out codes sync to our internal CRM or ERP system or an insurance company.
Related: How to integrate a health app with EHR/EMR
In such cases, we need just bare-bones UI for employees to check on processed documents once in a while.
However, if we envision a customer-centric app with a front end, we need to go through rapid prototyping first. I won’t go into much detail here besides mentioning that we need a clickable prototype of the app to make sure it’s intuitive and meets users’ expectations. Doing the same by writing code is way too expensive. Here’s a place to read up on prototyping at Topflight.
Not a step, but we can’t miss it
Remember how I mentioned another not-so-evident change in development of NLP applications? Well, it takes place simultaneously with the design step.
While UX/UI engineers keep working on the interface, ML developers continue improving the models. The machine learning algorithms will be the engine powering the app’s logic. And since we’ve already proved their feasibility at the PoC step, the ML engineers can keep refining the models, building data pipelines, etc.
Related: UI/UX design tips for designing a successful app
At the same time, our app developers help the design team verify that the UI/UX conforms to the platform guidelines and is relatively easy to implement.
More importantly, though, agile cycles kick in at this stage. As you probably know, agile development implies relatively quick sprints and iterative delivery of artifacts.
So during the design phase, we have ML experts iterating on the ML model/s and designers (with little help from devs) refining the NLP app’s UX/UI.
Step #4: Development and QA
At this point, we have the machine learning model/s and design ready. Now we can finally dive deep into NLP application development per se.
As you already know, to create an NLP app, we need to work on machine learning algorithms that will become the brain of our application. Ideally, around this time, we already have a verified ML model (from the functional PoC) that can be built upon.
Related: Agile App Development Guide
At the same time, developers have the designs and specifications to build a natural language processing app’s front end and back end. They can also begin implementing the admin portal for managing our NLP software.
To sum it up, NLP application development involves creating:
- ML model/s
- Front end user application/s
- Back end system to support the user app/s
- Admin portal for managing the NLP app
Let’s briefly review each of these puzzle pieces.
ML models development
One of the critical questions you’ll need to answer is whether you want to host ML code in the cloud or embed it into mobile apps. You’ll need to decide this based on your goals and product vision.
The cloud variant seems like an easy decision when you’re sure that your app will need to work on as many platforms as possible, for example, mobile, desktop, and web software. Each platform will simply sync with the cloud ML engine to provide users with meaningful output.
However, if your product is mobile-only and needs to perform intensive calculations, you’re better off using native mobile AI capabilities and hosting ML code inside the mobile app. You can read more about that in our blog on how to build a machine learning application.
Of course, we’ll use one of the open-source NLP technologies while developing NLP applications to speed things up. There are many to choose from. Please refer to the section above for some examples.
Finally, the ML part of the app will need APIs to support the user-facing application and maybe pull in external data for analysis.
I already mentioned that the user app will comprise the front end and back end. No surprise here. All we need to do is follow software development best practices:
- use ready-made components to speed up the development process
- iterate fast, keeping at least a 2-week cadence for releases
- automate testing and integrate with issue/performance monitoring tools
- opt for an easily scalable architecture
- set up the rails for DevOps processes
- implement strong security (including HIPAA, PCI, etc., depending on the nature of your app)
Related: HIPAA Compliant App Development: Everything You Need to Know
All in all, this development step is not much different from the development of any other application except for integrating with ML code.
An admin portal is where we can cut corners: we only need a bare-bones interface and basic features to manage the parameters of the NLP app. However, we must follow security best practices because the admin app will be our mission control.
Other than that, we follow the same procedure as when we build NLP applications.
Also Read: Pose Estimation: The Complete Guide when building Apps
Step #5: Deployment and maintenance
If you’ve partnered with experts, they should be able to ship new app releases to the market seamlessly, with no interruptions to the customer experience. That’s what DevOps is all about: setting up and maintaining identical testing and production environments to quickly roll out verified features and fixes.
As for machine learning software development solutions, as in our NLP case, we will also need to prepare data pipelines for working with our ML models.
We should also prepare tools for monitoring issues, overall performance, and user behavior inside our app. With that infrastructure in place, we’re well-positioned to scale our solution as required and implement new features to increase the traction.
Should You Buy or Build a Natural Language Processing App?
I’m inclined to say that it’s a more viable approach to develop an NLP app. First, the software will provide a tailored experience. Second, you’ll have complete control over software and data. Of course, you won’t be coding from scratch, given all available open-source and commercial MLP libraries.
However, if you still find an NLP solution catering to your particular needs, ensure that you’ll have some flexibility:
- can you add custom add-ons?
- will the software scale at a whim?
- who owns the data?
- are there enough security checks in place?
- can you integrate the solution with other software/vendors?
If you’re ready to create an NLP application and would like to hear our take on your idea and its feasibility, call us here.
- Use Cases of ML in Healthcare
- A Guide to Pose Estimation
- How to Create a Machine Learning App
- How to Build a Chatbot
- Building a Loan Calculator Using ML
- Using AI to Build Healthcare Apps
Frequently Asked Questions
How long does it take to develop an NLP app?
From our experience, plan for at least 6 months to arrive at an MVP.
What is the difference between NLU and NLP?
NLU is part of NLP. In this blog, we use them interchangeably. I wouldn’t really spend time on that; just treat NLU like NLP — tech to understand human language.
Should I host ML code in the cloud or right inside the app?
Having an AI engine in the cloud gives you more flexibility, as you can build multiple front ends and connect them all to the same engine.
What are the most typical NLP applications?
Sales and customer support automation.
How to create an NLP application from scratch?
You will waste a lot of time. I suggest using available NLP tools to bootstrap your app development. The app itself will be “from scratch”, just not the whole ML piece, and that’s ok.