top of page

Learn through our Blogs, Get Expert Help & Innovate with Colabcodes

Welcome to Colabcodes, where technology meets innovation. Our articles are designed to provide you with the latest news and information about the world of tech. From software development to artificial intelligence, we cover it all. Stay up-to-date with the latest trends and technological advancements. If you need help with any of the mentioned technologies or any of its variants, feel free to contact us and connect with our freelancers and mentors for any assistance and guidance. 

blog cover_edited.jpg

ColabCodes

Writer's picturesamuel black

Natural Language Processing (NLP) - An Overview

Updated: Jan 16

In this post we're going to talk about how to give computers the ability to understand language.

NLP

Natural Language Processing is a field closely related to Machine Learning, in which we give the machine the ability to understand language in its natural form. One might argue they've always had this capability as in machine language instructions as well as higher level programming languages, while these certainly meet the definition of a language they also tend to have small vocabularies and follow highly structured conventions. For example code will only compile and run if it's a hundred percent free of spelling and syntactic errors in obvious sense programming is quite different from human languages. Natural languages contain large diverse vocabulary words with several different meanings, speakers with different accents and all sorts of interesting wordplay. People also make linguistic flaws when writing and speaking like slurring words together, leaving out key details so things are ambiguous and mispronouncing things. But for the most part humans can roll right through these challenges. The skillful use of languages is a major part of what makes us human and for this reason the desire for computers to understand and speak our language has been around since they were first conceived. This led to the creation of natural language processing or nlp an interdisciplinary field combining computer science and linguistics. There are an essentially infinite number of ways to arrange words in a sentence. We can't give computers a dictionary of all possible sentences to help them understand what humans are blabbing about so an early and fundamental NLP problem was deconstructing sentences into bite sized pieces which could be more easily processed.


What is NLP(Natural Language Processing)

Natural language processing (NLP) could be defined as a  branch of machine learning that gives computers the ability to interpret, manipulate, and comprehend human language. Different organizations collect huge volumes of audio and textual data from different communication channels like emails, text messages, social media, newsfeeds, video, voice, and more. Natural Language Processing  helps these organizations to extract information from these huge sets of datasets. Different NLP software and toolkits provide these companies with the ability to automatically process this data and further analyze it, in order to derive meaningful information. Different NLP based softwares combines computational linguistics—rule-based modeling of human language—with statistical, machine learning, and deep learning models. Together, these technologies enable computers to process human language in the form of text or voice data and to understand its full meaning, complete with the speaker or writer’s intent and sentiment.


Natural Language Processing(NLP) Industry uses

Human language is filled with ambiguities that make it incredibly difficult to write software that accurately determines the intended meaning of text or voice data. Homonyms, homophones, sarcasm, idioms, metaphors, grammar and usage exceptions, variations in sentence structure—these just a few of the irregularities of human language that take humans years to learn, but that programmers must teach natural language-driven applications to recognise and understand accurately from the start, if those applications are going to be useful. Several NLP tasks break down human text and voice data in ways that help the computer make sense of what it's ingesting. Some of these tasks include the following:


Speech recognition, also called speech-to-text, is the task of reliably converting voice data into text data. Speech recognition is required for any application that follows voice commands or answers spoken questions. What makes speech recognition especially challenging is the way people talk—quickly, slurring words together, with varying emphasis and intonation, in different accents, and often using incorrect grammar.


This NLP technique is also known as grammatical tagging, is the process of determining the part of speech of a particular word or piece of text based on its use and context. An example of this would be that a Part of speech tagger would identify ‘make’ as a verb in ‘I can make a paper plane’.


WSD is the selection of the meaning of a word with multiple meanings usually  through a process of semantic analysis that determine the word that makes the most sense in the given context. For example, word sense disambiguation helps distinguish the meaning of the verb 'make' in ‘make the grade’ (achieve) vs. ‘make a bet’ (place).


NEM, short for Named Entity Recognition identifies words or phrases as useful entities. NEM identifies ‘Kentucky’ as a location or ‘Fred’ as a man's name. This process identifies unique names for people, places, events, companies, and more. NLP software uses named-entity recognition to determine the relationship between different entities in a sentence.


This technique can be defined as the task of identifying if and when two words refer to the same entity. The most common example is determining the person or object to which a certain pronoun refers (e.g., ‘she’ = ‘Mary’),  but it can also involve identifying a metaphor or an idiom in the text  (e.g., an instance in which 'bear' isn't an animal but a large hairy person).


Sentiment analysis attempts to extract subjective qualities—attitudes, emotions, sarcasm, confusion, suspicion—from text. Sentiment analysis is an artificial intelligence-based approach to interpreting the emotion conveyed by textual data. NLP software analyses the text for words or phrases that show dissatisfaction, happiness, doubt, regret, and other hidden emotions. Sentiment analysis has also proven to be quite efficient in Social Media Monitoring where analysing sentiments expressed in social media posts or reviews can be used to gauge public opinion about products, services, or events. Another use case of sentiment analysis is Customer Feedback Analysis where assessing customer sentiments is used to understand satisfaction levels and improve products/services accordingly.


NLG, Short for Natural Language Generation is sometimes described as the opposite of speech recognition or speech-to-text; it's the task of putting structured information into human language.

Now a days NLG can be found in almost all new NLP based innovations especially in chatbots where generating responses in natural language is a must. Further this technology is used for generating manuscripts, song lyrics, storytelling and so on.


Chatbots are computer programs that simulate and processes human conversation (either written or spoken), allowing humans to interact with digital devices as if they were communicating with a real person. Chatbots can be as simple as rudimentary programs that answer a simple query with a single-line response, or as sophisticated as digital assistants that learn and evolve to deliver increasing levels of personalization as they gather and process information.


Also known as machine translation is the process by which conversational spoken phrases are instantly translated and spoken aloud in a second language. This differs from phrase translation, which is where the system only translates a fixed and finite set of phrases that have been manually entered into the system. Speech translation technology enables speakers of different languages to communicate.


Speech summarisation techniques take human speech as input and then output an abridged version as text or speech. Speech summarisation has applications in many domains from information technology to health care, for example improving speech archives or reducing clinical documentation burden etc.


Topic modeling is a technique used in natural language processing (NLP) to uncover the hidden thematic structure in a collection of documents. It's a form of unsupervised learning aimed at discovering topics or themes present in a corpus of textual data without requiring prior labeling or annotation.


Early Rule Based NLP Systems

In school we learned about nine fundamental types of English words: nouns, pronouns, articles, verbs, adjectives, adverbs, prepositions, conjunctions and interjections. These are all called parts of speech. There are all sorts of subcategories too like singular versus plural nouns and superlative vs comparative adverbs but we're not going to get into that. A word type is definitely useful but unfortunately there are a lot of words that have multiple meanings like rose and leaves which can be used as nouns or verbs. A digital dictionary alone isn't enough to resolve this ambiguity so computers also need to know some grammar for this phrase Structure rules were developed which encapsulate the grammar of a language for example in english there's a rule that says a sentence can be comprised of a noun phrase followed by a verb phrase, noun phrases can be an article like the followed by a noun or they can be an adjective followed by a noun and you can make rules like this for an entire language. Using these rules it is fairly easy to construct what's called a parse tree which not only tags every word with a likely part of speech but also reveals how the sentence is constructed. These smaller chunks of data allow computers to more easily access, process and respond to information. equivalent processes are happening every time you do a voice search like where is the nearest pizza? The computer can recognize this as the where question, knows do you want the noun pizza and the dimension you care about is nearest. The same process applies to what is the biggest giraffe? or who sang thriller? By treating language almost like lego computers can be quite adept at natural language tasks they can answer questions and also process commands like set an alarm for two-twenty or play ta swizzle on spotify. But as you've probably experienced they fail when you start getting too fancy and they can no longer pass the sentence correctly or capture your intent. We should also know that phrase structure rules and similar methods that codify language can be used by computers to generate natural language text this works particularly well when data is stored in a web of semantic information where entities are linked to one another in meaningful relationships providing all the ingredients you need to craft informational sentences. Google's version of this is called knowledge graph at the end of twenty sixteen it contained roughly seventy billion facts about and relationships between different entities. These two processes parsing and generating text are fundamental components of natural language chatbots(computer programs that chat with you). Early chatbots were primarily rule based where experts would encode hundreds of rules mapping what a user might say to how a program should reply. Obviously this was unwieldy to maintain and limited the possible sophistication. A famous early example was eliza created in the mid nineteen sixties at MIT. This was a chatbot that took on the role of a therapist and used basic syntactic rules to identify content in written exchanges which it would turn around and ask the user about. Sometimes it felt very much like human - human communication but other times it would make simple and even comical mistakes. Chatbots and more advanced dialogue systems have come a long way in the last fifty years and can be quite convincing today. 


Evolution of NLP

Modern approaches are based on machine learning where gigabytes of real human to human chats are used to train chatbots. Today the technology is finding use in customer service applications where there's already heaps of example conversations to learn from. People have also been getting chatbots to talk with one another and in a facebook experiment chatbots even started to evolve their own language. This experiment got a bunch of scary sounding press but it was just the computers crafting a simplified protocol to negotiate with one another. It wasn't evil, it was efficient. But what about if something is spoken, how does a computer get words from the sound that's a domain of speech recognition, which has been the focus of research for many decades. Bell Labs debuted the first speech recognition system in 1952, The Automatic Digit Recognizer; it could recognize all ten numerical digits if he said them slowly enough. The project didn't go anywhere because it was much faster to enter telephone numbers with a finger. Ten years later at the 1962 world's fair IBM demonstrated a shoe box size machine capable of recognizing sixteen words. To boost research in the area DARPA kicked off an ambitious five year funding initiative in nineteen seventy one which led to the development of harpy. Harpy was the first system to recognize over a thousand words but on computers of the era transcription was often ten or more times slower than the rate of natural speech. Fortunately thanks to huge advances in computing performance in the eighties and nineties continuous real time speech recognition became practical. There was simultaneous innovation in the algorithms for processing natural language moving from handcrafted rules to machine learning techniques that could learn automatically from existing datasets of human language. Today the speech recognition systems with the best accuracy are using deep neural networks.


Comments


Get in touch for customized mentorship and freelance solutions tailored to your needs.

bottom of page