 Okay, so today is the topic is natural language processing and I'll be discussing what exactly this is, what is the use cases, what are the different things we can do with the natural language processing. So first thing, what exactly the natural language processing. This is something that we are doing right now. You can see I'm talking, you're listening, you can relate my words, you can understand my things, what I'm trying to say here. You can understand the meaning, whatever the sentence I'm reading, and you can interpret the meaning if I'm saying anything to you. So this is all about the natural language processing. It come to the computer or robots, if you talk about any computer and robots, how exactly they can understand as human behavior, how exactly they can interpret the meaning, what a human is saying as because human can understand different things. But as far as you can say about the computer or robots, they can only understand few things. So this is where we have the natural language processing that will allow us to understand human linguistic so they can provide more human like behavior. So I already provide my introduction, so I'll start with what exactly the inside this presentation. First thing we'll talk about the introduction, how exactly other people work, different phases of NLPs, capabilities, what exactly we can achieve inside Trooper. We will talk about the different models that are available already and what exactly we can do with those models. So first thing about the natural language processing as a definition. So if you talk about natural language processing, it referred to a branch of computer science and most especially the branch of artificial intelligence, the AI. It's more concerned with the giving computer the ability to understand text and spoken word in much the same very human being can. So, as you can say, by the definition, it's all about to understand the text and words that that how human can understand and this provide capability to computer or a robot so they can understand more like human. If you talk about the example, like, let's suppose you or everyone knows about the Alexa series, how exactly they are understanding our action like when we talk about a city do something like the action that is part of NLP how they are understanding the human behavior because we can say anything to like Alexa just turn on my lights or switch off the light. But in terms of natural language processing, this is how they interpret the action that they need to perform as human are saying. So the natural language processing is part of like consists to kind of a component. First thing is natural language generation, natural language understanding. So when we talk about the natural language processing what exactly this will do if we say anything any structure unstructured data and we need to provide something that computer can understand the first part is natural language understanding. So how computer can understand the data so we need to provide unstructured data and convert it to some structure data. So this is this is what we call natural language understanding. So again, in the reverse phase with the natural language understanding we have a structure data and by using those actual data computer can provide or can generate human like language a sentence that is called natural language generation. So this is all natural language processing scenario. So there is an unstructured data like let's suppose take an example about if we talk about let's add something to my shopping list or let's take an example like banana and apple just add to my shopping list. This is a structure understand what exactly I'm saying but in terms of a computer I need to describe like what exactly the shopping list element what are the different items that I need to add in a programming language. So that is called natural language understanding and using that structure data computer can also action or provide sentence that is called natural language generation. So why I'm talking about this natural language processing at this moment. This is because I got some figure from the very famous like status. There's a data provider they provide this these analytics. So you can see this is about the natural language market value of the natural language process. In 2020 this is all about only 16 million billion and in 2020 the expectation is around 127 billion. So that is the huge market that is available that we can do something in as part of the natural language processes. This is another figure in terms of revenue what you can generate if you are implementing in your business. So you can see this is the revenue growth you can see as part of a business. This is all in a millions of years dollars. So this is that again from the statistic 2017 to 2025 you can see the trend is always increasing and year by year you can see the huge differences there. Okay, so how exactly the NLP works. So in context of like you can see one item in my right. So this is like, let's suppose a person is a IT help desk and asking for something like where is the IT help desk. As human I can understand and I can provide it's on third floor or something somewhere off in this building or that building. But as a computer, if you don't know the context you don't know the exact definition he don't know NLP, then he might provide you the address in latitude and longitude. So that's why we need a NLP so we can provide more user like we can understand the human behavior and computer can answer in a more human way. So it as part of NLP NLP can process text can also part of audio video anything in the input tags NLP process the language language could be anything it's not about the English or something like that it can be any language anything we can do using that NLP algorithm we need to extract the entity extract the relationship between those things and we can classify the topics what what exactly the text or what exactly the speech is all about and we can also do the some sentiment analysis on top of that. So what kind of like if I'm talking about some topic and what sentiment is behind that particular topic. Next part is phases of NLP. This is very critical part and if you are implementing NLP you need to understand how NLP work. So there are few phases of NLP. This is lexical analysis, statistical analysis, semantic discourse and integration and program. Analysis. So these are the phases one by one and so every output of the one phase is input of another phase and somehow we will get the final output after the final stage. An analysis what exactly the lexical means this is more about how you understand the meaning of the word. So this analysis is kind of a process that convert words into sequence of tokens. So if I'm talking about like I'm presenting NLP today. So there is a sentence or there could be a paragraph like that you can see there are two paragraphs. So the first part of NLP process is that I will convert these paragraph or sentences in a lower level. So the tokenization is the first part where I can convert a sentence into a word. So, first thing we will do as a lexical analysis is a tokenization. So we just convert like a lexical analysis is the process of converting everything is a token. Then the second thing we will do as part of lexical analysis is a removal of stop words like is the off a because those are like words but not making any sense without a sentence. So only thing like if we talk about analysis converting sequence those these are the words that have some meaning. Next part that we need to do as a part of lexical analysis is stemming and limitation. Both are similar, but in a such a way that we need to identify the root word off a particular word like root word means like if you are talking about. Let's talk about running an example run running. So at the removing the prefix suffix from any word and get the root word off that particular word stamp that is called stemming limitation is similar but the actual meaning if you are converting getting a root word that should have some meaning a dictionary meaning. So that is part of limitation stemming and limitation only differences we will get after limitation we will get a word that have a dictionary meaning or a vocabulary that exists in a particular language. So this is the first thing that we will do as part of an entity lexical analysis. So after the lexical analysis we will understand that these are the words these are the token available and these are the words that available to process for them. So second phase of this particular nlp is synthetic analysis. So using the first lexical analysis we have some words. And there is a part of speech tagging that we need to do on those words like maybe a word cannot have some meaning but if you add two words that might have something some meanings to that. So with part of synthetic analysis and parsing is a process of analyzing a string of symbols. It's in the natural language computer language or that have some kind of a formal grammar rule. So all the grammar rules are applied to group of words not individual words. It's always about the group of words because grammar can apply if you have a particular sentence. So this is also called a part of speech tagging another phase this provided full sentence that could have some meaning that could not have some meaning like if I'm talking about a truck eating orange. Apple is eating banana. Those are sentences. You can say the syntax is correct grammar is correct but that doesn't make any sense because it cannot use oranges. So this is what as part of the synthetic analysis we will form the sentences from the words that we get from the initial phase lexical analysis. Now the semantic analysis. This is the part where we define the sentence in a way that have some meaningful sentence you can say. So synthetic analysis provide a sentence that have some meaning or does not have some meaning but with the semantic analysis we will get the sentence in a way that have something meaning. What we need to do as a synthetic semantic analysis is just capture the meaning of given type word. It's considered the context of the particular sentence structuring of the sentence and grammar rules. Everything comes together and we will build the relationship between the individual words. So core reference resolution, semantic role labeling, words and disambiguation, name, identity, cognition. These are the different things that we will do as part of a semantic analysis. Sorry, my screen still. You can see my screen? Yes, we can. Okay. So in terms of semantic analysis, if we talk about a particular word like will can be a name, will can be a work you can use. I will showcase this in my presentation or will is going to somewhere to attend some dinner or something like that. So the word it matters how exactly we are using in our language. So we need to understand how the computer can understand that ambiguity. As part of this analysis, semantic analysis, we recognize every reference of the word. We will levelize those words. What exactly this is verb, noun, article, et cetera, what are the different things in the particular sentence. The last thing that the name, this is like a word can be a name, can a location or anything could be like if I talk about I went to a bank. A bank can be a financial institution or could be a river or something like that. So it's name entity recognition. It's defined what kind of entity we are talking about. So if you're talking about a particular name, it provide you that it is a name, it is a location. So if we receive something like tracheating oranges from our previous phase, this will be ignored from the information something because it doesn't have any kind of meaning. After that, the next step is discourse analysis. This is where we uncover the motivation behind the text, means like what we are trying to say the meaning of a spoken or written text as it considers the social or historical context. Because let's take an example of my God, Radio 9 AM, later he took the train to Bristol. So like as a human, I can understand what he word is referring to, but as a computer, I cannot understand what exactly he is referring to. So as part of this analysis, we will this define the reference between the words, between the sentence that we can relate to each other and figure out like what exactly a person is trying to say and how a computer will behave as part of action. His action on that. So if you talk about the simple question answer, like if you are talking on a chat board, so and you ask something and you can ask anything, but a smart chat board using the NLP can provide more like human behavior and you will get a good answer in a human manner. The last phase of the NLP is pragmatic analysis. This is the part of the process of to get all the information from the given sentence to given text. So it it focus on taking a structure set of text, figure out the actual meaning of the text. It's like it's like take an example about few slangs or something like that. It's the piece of cake. It's like it couldn't be better. So these sentence can, human can understand easily because we do have some context, but to understand a computer how exactly can computer understand. So these, this is the part where it analyze those sentences, what exactly the meaning behind them, what exactly the context they are talking about. It is like something historical or it's what exactly based on. So this part of analysis will provide you. Maybe if I, if I'm saying just close the door, this is something it may be an order or if I'm saying please close the door, it could be a request. So in that particular context a computer can understand in this analysis we will provide computer to ability that he can understand what is the context behind the certain text that we are talking about. So this is the whole phases of programmatic analysis, the last phase of the NLP after that. So this six phases include whole processing of sentence to work, work to be first we do the tokenization we get the structure data. So using the structure data we are getting like information what what is the relation between those words, those token, then we also analyze the entity named entity like it's a location, it's a name or person, what exactly this then we analyze the final if the sentence have some meanings or not, then we can finally provide input to our ML or deep learning analysis. So here we can put our middle where it is possible that you can use a static algorithm to analyze all the steps, or you can also utilize an machine learning or deep learning algorithms, so they can understand time by time and they can learn whatever input we are providing to them. So this is like whatever the phase we were talking about a simple example you can see how exactly we perform the phases in NLP. So this is simple sentence a dog is chasing a boy on the playground. So lexical analysis part of speech tagging you can see it define what is known for pronoun everything, and then it categorize in a word war phase. And then we will introduce a sentence that is called a synthetic analysis. So using that sentence, we will. The next phase is about semantic analysis that will provide you the exact meaning that the particular sentence is meaningful or not. Then we will get the final. A person maybe this is the reference final output of a computer can understand what like if I'm saying a dog is changing a boy on the playground, a computer how exactly it can act a person saying this may be reminding another person to get the dog. So this is human can understand similar way a computer can understand after these NLP phases. These are the simple use cases that we can perform using the NLP. So the most good thing about the language translation. If you are talking about language translation a every language have some set of different kind of rules different work of different grammatical rules and different structure to make the sentences and all. So when we are trying to do language translation, this is the very good algorithm that we can use. Search engine result. We are talking about like Google introduced. This is in later 2008 or 2019. So after that Google provided a very good result because of the NLP it can understand the context what user are searching for like suppose if you are looking for a train or bus, you if you just write it will also pop up you. But you can book directly from there. So this how exactly that they are doing it using the NLP. Smart assistant. We already discussed about like see Alexa and universal assistant that we are doing they are learning from the human behavior and applying the NLP on that and and like performing action. This is customer service automation. This is all about the way you can say chat box is also categorized in customer service automation. But yeah, in terms of NLP, if you are receiving something some like if you are getting feedback from somewhere a platform or like a forum discussion or like you have a blog post where you can receive multiple information from there. You can apply NLP in email filters as well like in the spam detection you can analyze the words that human normally use and you can find the visit words using the NLP and you can get a smart email filters available. Like there are different use cases that you can think of as a human you can do and you can also do those kind of thing that. So these are the available resources available products that is based on NLP. So IBM Watson is a very good product that is available and you can easily utilize this and implement in your. It's a great person but yeah I think you can utilize this Google is also providing its cloud natural language APIs that you can utilize them and like implementing your project. Okay, let me show you the one good example of like how IBM Watson doing the national language understanding. This is a very simple example like let me show you. You can see my screen. My Chrome. Yeah. Okay. So this is the URL in my shape like this is API demo they are providing. You can use input text here or you can use a URL, whatever you can do. Let's talk about like I'm taking an example. I'm just taking a few words from here so I can understand what exactly talking about. If I put some text here and analyze this. So, this is the output of language natural language processing. So what you can get. These are the entities that we are talking about in this particular example. This is NASA draft space spacecraft. So you can say NASA is organization. This is entities all are the entities that they define in this particular text. There are different keywords that are attached to it. So you can see the relevancy score using that you can tag your blog or your content with those keywords that are meaningful or are relevant to you. If you talk about the linguistic. So you can see scientists and what kind of action they are performing. So different kind of classification on things are provided by the Watson API. You can integrate this Watson API and you can like perform analysis on your text on your blog post on your any kind of text. It doesn't matter if you're talking about blog or website it could be like if you are working on some different kind of scenario. If sentiment score if sentiment analysis is very good like if you are receiving multiple feedback of on your blog post on your polls or any forum. You can analyze the sentiments of those comments what exactly the user trying to say they are liking it not liking it. So what kind of sentiment that comments are providing. You can extract that information feed it to national language processing and it will provide you score according to your input text. So this is basic example that you can get these much information from the natural language processing similar way Google is also working in a similar way. In your case you're the Google API as well. I'm using the same text and I have this and I'm analyzing the Google now the same way you can see like this is the Watson this is Google API. It provide you like what is signed to the person name space log. Like. So whatever the entities are available in this particular text they will provide you as part of extraction. You can see the sentiments of the entire document. What kind of sentiment this particular text provide. So this is you can also utilize similar things in your project with the CMS as well. This is the phases that we discuss about how they are organizing how they are like providing the part of speech tagging like this is now. So this is how they are extracting the information from a sentence. So it's a paragraph paragraph to sentence sentence to word word then they get the reference between those words. Then they understand the meaning behind that behind sentiment behind that particular text and then they will action on the final natural language generation. So this is part like you can utilize. So, again, let's talk about more the triple. So, how exactly you can utilize in your CMS. So I will provide you some use cases that we can integrate triple to be a smart CMS, I would say, because it's a part of artificial intelligence. I'm not saying it's always a machine learning or artificial intelligence because NLP can be a static algorithm as well. It depends on you how exactly you are implementing it because NLP can combine with the machine learning or deep learning algorithms to provide more accurate output to learn day by day using the input text and all. But yeah, so so far NLP with Drupal, there are certain use cases that we can do this first thing that we can do with in a CMS is a content classification. This is a very simple thing that we are doing whenever we create some content we used to use some tags some categorization with the different vocabularies different different set of vocabularies we have for a particular article that we are talking about blog normally used to have tags that these are related to these tags and using those tags you will showcase the related content on the website. So first thing you can automate this content classification in Drupal or in any CMS using the NLP. So people take the input text input whatever you are providing in your article and then it will classify that document according to algorithm and this data can be stored again in your load or content. And then part is sentiment analysis, like as a content editor or like you are writing some article and it could be a big article and maybe you you want to understand what kind of sentiment that's a whole article will provide to end user. So sentiment analysis on those tags. And also, if you are receiving some input some comments on some feedback on your blog post, you can process those using the NLP and figure out that you are talking about this article, and but the user are saying negative things about this article or it's a NLP. So this is the again good use case where you, you are more user centered like if you talk about the government websites, government projects and they normally ask for a feedback. So, like, in most of the government site I saw in a bottom of the page was this useful or not. So, maybe using that particular form we are receiving input, but are we analyzing those input or not. You can automate that process using the NLP and you can analyze like, yeah definitely if user are talking about something, you can change your things maybe. So this is one other use case. Text summarization, like this is very basic when we are talking about a blog post or any content we are writing in our website. So normally we have a teaser available because we cannot have everything on the home base. So, most of the time we have a different set of blogs available where we are showing teaser of a particular node or particular content. So, in most cases, user normally do like split the first few sentence as part of summary, something like that we normally do, or we have a different summary field to provide summary text. And so this is the manual thing. Using the NLP, what you need to do, you can integrate NLP as part of the summary generation, and whatever the input you are providing, it will automatically expect some summary. You can define some words like how much or how many words should be there in the summary and it will provide you. So this can be useful if you are talking about the summary. This is also useful if you talk about the meta keywords, like SEO and meta keywords, if we are doing some SEO, so normally we need to provide the title, some keywords, some mind or summary text for a web page. So using the NLP, you can analyze the text and automatically fill up those data so you don't need to do manual things. This is another use case, like using the image. The NLP can also screen the image and get the different like attributes from a particular image. So this is again useful when you are adding images and you want to create some alternate text and title to that image, but normally we used to have a title of article we just put into the image. But what exactly the image are saying you can utilize the NLP to get those data. You can see, this is, I forgot where exactly I got this, but yeah, there is an API provided for the image screening. If you just upload the image, they will provide you what kind of image it is and what are the different information you can see. So this is another part, so you can do NLP to create alternate tags to tag in to extract the caption from the image itself, you can automate that part. So as I mentioned, like SEO meta generation already duplicate content. Yeah, this is also another good use case when you are publishing something on your website and NLP can also do, can also pass the data and check over the web somewhere like it's a implementation. I'm not sure you can do by yourself in your project but yeah overall NLP can do something like that it crawl the data look into different places different URLs and specify that you are using the duplicate content or not. And smart content editor. If you talk about like you normally use the Gmail. So when you start writing. Sorry about that. In Gmail, when you start typing it provide you some auto suggestion or like auto completion, like hello, if I'm replying to something and if I just write hi, it will automatically populate the name of the person that I'm replying to. And when you're saying thank you for the this or I'm attaching, if you are attaching something that it will also populate like I'm testing a document or the image. So the auto completion auto suggestion that can be populated by as an NLP. So Google is doing very good in NLP market right now they are providing very good stuff using the API as well. There are few modules available in Drupal. I'll show you a very basic demo using the NLP there's a module available to summarize text to generate the text somebody and the tags. There are the Drupal modules available that you can utilize to implement the NLP. You are easily available you can easily implement IBM Watson integration is also available. Google natural language API integration is available, but this is not stable, but I think you can utilize it somehow. Let me show you how this module the intelligent tools is working. I have installed a one normal triple side. It's a simple installation, and I have also enabled an updated model. So you can see my Chrome friend. Yes. This NLP tool intelligent. This module have three modules. Actually, this is one is a top model and those two are these are two submodels available in the auto tag and text sunrise. These two things available as part of an intelligent. So, how exactly we can configure. It's a simple step to configure is enable this and you have configuration to enable auto tag or text somebody. The first thing. Let me show you how auto tag can be configured. So this is auto tagging rule that you want to configure. So what you need to do is just provide the content tag for which content type you want to configure this on where the text should be extracted and in which field we need to insert the tags and how many tags you want to insert in the page. Let's suppose three or whatever. And this is all good. So now I have this tagging rule available. I can create content. I'm taking another. I'm not providing any tags right now. You can see these are the auto tags that this module extracted and added. So this module is using a text rank algorithm. This is not a machine learning or any deep learning analysis. This is the text rank algorithm. So this algorithm just like it tokenize the sentence or paragraph first and this algorithm assigned the rank to particular words one by one using a tree. So this is the structure to draw down the graph. So when we have a sentence and words and relationship, and then we identify the particular rank of a word and according to those ranks and all it automatically the tagging system of a particular text. Similarly, we also have a configuration for text summary. And this, the same thing you need to get the article that this is a content type that I want to enable the auto summary and from where the body filled an extract form, just save it. And if I go to the article, you can see my summary is automatically populate with the few words, not the whole word. This is the model. This is the basic model. And there are more module available. The text summarization like this. Like summarization. This is another model that you can utilize. This is also using the similar algorithm text summarization. You can say a graph based ranking algorithm for an LP. It's an exit to summarization technique that relies on selecting several parts such as phrases sentence from a piece of text and step them together to create a summary. So this is static algorithm that these module are using, but we can apply the machine learning on top of this and can have a good use cases that we can do. Okay, so I'm sharing my last things. Yeah, so yeah, this is all good. There are some sources and reference that I mentioned. You can look into that. This is text and the algorithm that I was talking about. There's a GitHub repo available for the PHP so you can implement by yourself as well.