top of page
Search

Quick Natural Language Processing (NLP) For Your Application

Writer's picture: Sachin TahSachin Tah



An old article from Linkedin published on November 24, 2017


Nowadays everyone is talking about NLP, AI, BOTs and these are hot buzzwords around the industry, almost all major tech firms are investing and trying to get something big out of these technologies.

Back during my graduation days, I remember opting for AI as one of my specialization subjects and believe me I still don't know how I managed to clear it :). So what I am trying to tell is that AI was available back then as well, nothing new here. If you remember, Yahoo implemented an automated bot almost 15 years back.


So what changed suddenly that AI, NLP, BOTs are back in action and everyone wants a share?


A very simple reason is the availability and easy accessibility of FREE resources around these technologies along with the involvement of communities around the world providing expertise round the clock in making these systems better.


As of today if you want to be an AI professional, there is no upfront investment as far as the purchase of tools and technologies are concerned, what you need to cater is some working brains and you are ready for your research. Of course, these technologies are still in a premature state and will take some more time to get matured.


Natural Language Processing (NLP) is a section of Artificial Intelligence (AI) that gives machines (computers) the ability to understand human languages and perform necessary tasks. Siri is one such example. I don't need to introduce Siri here, a 5-year-old kid who often acts as a mobile load tester will be able to tell you the capabilities of Siri in a much better way.


I came across a handful of technologies and platforms supporting NLP as a service. My perspective of research was from a developer or architect point of view where I was not interested in directly consuming the packaged product, but was keen on some kind of underlying service which will help me build my own application over top of it.

Microsoft, Facebook, Google, IBM are some of the tech giants working towards NLP for a decent amount of time now. Instead of reinventing the wheel, these guys did acquisitions and are almost on the same track. Microsoft has LUIS www.luis.ai, Facebook has WIT www.wit.ai and Google has DialogFlow www.dialogflow.ai formerly api.ai. You can integrate your application with these systems to get NLP-related tasks done.

Interaction is something humans like the most, for example, instead of looking for links, faqs, site navigations over a big website, users would like to ask someone about it. Even today if a friend of mine has already done it and if he is next to me, I would like to ask him instead of looking around on a website.

Let's take a simple yet powerful example, your organization has Leave Management system which helps employees to apply and manage leaves. Now you can take the entire system on a channel like Skype for business and ask your users to add LeaveManager as your Skype contact.


Your employee can easily ask his Skype contact, questions like


"What is my leave balance?"


"When is next long weekend?


Or he can ask him to perform tasks like


"Please apply leaves from 1-Jan-18 to 9-Jan-18"


Not only a boring leave management system is now interactive but also now you have provided a mobile channel for this application, your employee can use Skype on mobile to manage his/her leaves.


Similarly, your applications can take inputs from your user on a web portal, this input can be text or voice input.


There is a free voice to text converters available which easily convert voice to text.

The HTML 5 speech recognition API has built-in support for speech to text conversion


<input type="text" x-webkit-speech />

By writing 5-10 lines of code your application is ready to accept voice inputs.

Analyzing inputs and getting user intent is something NLP services should be able to do efficiently for you. Almost all service providers provide a set of REST APIs that map user inputs to user intents or directly provide the output. Obviously, you need to train your NLP engine to do the desired task.

For example, you can prepare your NLP engine to answer a question like

"What is your mailing address?"

In response, the NLP engine can either decode this or similar statements and provide you the intent which can be "getmailaddress" or can directly output mailing address to the user. You can ask the engine to perform so many other tasks as well like calling external API etc.

Another example is, "I want to book a ticket from Mumbai to LA"


These NLP engines can be configured not only to return user intents(here it is ticket booking) but also can provide you parameter details like from-Mumbai and to-LA and that too in a decent JSON format. Always remember, the more the training better the results.


So instead of trying to reinvent a wheel or break your head in understanding low-level NLP algorithms and their library implementations, go ahead and try out something which is ready to use and free of cost. I would recommend www.DialogFlow.com which is little simple to start with and has a great user interface as well.

37 views0 comments

Recent Posts

See All

Comments


bottom of page