Natural Language Processing Nlp English Language Essay

Natural Language means a linguistic communication used in every twenty-four hours communicating like English, Gallic etc. If we contrast this to unreal linguistic communication like programming linguistic communications, the Natural Language can non be pin down with expressed regulations unlike unreal linguistic communications which has a definite sentence structure and semantics. Hence Natural Language Processing ( NLP ) , is a measure frontward to affect computational devices to construe the natural linguistic communication and end product a response which is once more in the signifier of Natural Language.

The range of NLP covers any sort of computing machine use of natural Language which could be every bit simple as numbering word frequences to compare different composing manners while at the far terminal, it could be understanding complete human vocalizations at least to the extent of being able to give utile responses to them. ( Bird, Bird & A ; Loper 2009 )

Chatbots or colloquial agents, are the package plans that implements NLP and simulates an intelligent conversation with one or more human users which could be in the signifier of Audio or Textual format. Largely the chatbots interpret the human input and provides and intelligent end product by fiting the keywords or give voicing form from a textual database.

A web definition of Chatbots describes it as “ An unreal life entity designed to hold conversations with existent human existences. That can be a text conversation via computing machines, a spoken conversation or even a non-verbal conversation. ” ( Huang, Zhao & A ; Yang, 2007 )

( Webopedia ) defines the chatbots as “ Short for chat automaton, a computing machine plan that simulates human conversation, or confab, through unreal intelligence. Typically, a confab bot will pass on with a existent individual, but applications are being developed in which two chat bots can pass on with each other. Chat bots are used in applications such as e-commerce client service, call centres and Internet gambling. Chat bots used for these intents are typically limited to conversations sing a specialised intent and non for the full scope of human communication. “

The demand of colloquial agents has become acute with the widespread usage of personal machines with the want to pass on and the desire of their shapers to supply natural linguistic communication interfaces ( Wilks, 1999 ) . Normally a chatbot plant by the user inquiring a inquiry or doing a remark with chatbot reacting to the users question or doing a remark or originating a new subject. A simple and common illustration of the chatbot system is the Internet Messenger like Yahoo Messenger, where in an unfastened confab room one can hold an brush with one or more chatbots who frequently imitate themselves to be a echt user. When a user initiates a confab with the chatbot ( frequently the user does non cognize whether it is the alien is a echt human being or a chatbot ) a typical conversation would be:

User: Hello

CHATBOT: Hi There! ! !

User: How are you making?

CHATBOT: I ‘m all right, how about you?

User: What is you ASL?

CHATBOT: 22/f Bristol

The above illustration shows how a chatbot can react to the human questions in a manner that the user can understand the response. Hence chatbots are frequently classified to help the construct of Human Computer Interface ( HCI ) .

Most of the chatbots presently available and hosted on the cyberspace have been deployed for the intent of seeking information, site counsel, FAQ answering, and so on in a purely limited sphere. Most of the chatbots have two basic faculties:

A duologue direction Module which manages the conversation

Chatbot cognition database which shops the templets for reacting to the user based on the input provided by the user.

Therefore a typical chatbot shall incorporate a set of templets in the cognition database which shall be matched against the user input and a response would be generated. Hence one can state that a typical chatbot is frequently restricted to a peculiar sphere and updating its cognition database is a uninterrupted procedure and frequently clip devouring where it can act as coveted ( Huang, Zhao & A ; Yang, 2007 )

Development of ChatBot

The initial development of Chatbot applications were merely for merriment and worked on a simple technique of pattern fiting with the user input and bring forthing a response against the matched templet. ELIZA ( Weizenbaum, 1966, 1967 ) is a authoritative illustration of such a ChatBot. It was besides one of the first Chatbot applications available. During the 70s and 80s, before the reaching of GUIs, there was a rapid growing in text and natural-language interface research eg. Cliff & A ; Drakos ( 1987 ) , Wilensky et Al. ( 1988 ) . Since so, there has been all around development of new architectures for Chatbots such as MegaHAL ( Hutchens, 1996 ) , CONVERSE ( Batacharia

et al. , 1999 ) , ELIZABETH ( Shawar and Atwell, 2002 ) , HEXBOT ( 2004 ) and ALICE

( 2007 ) .

Further developments in the AI, Human Computer Interface ( HCI ) and information excavation, more enhanced and commercially available chatbots are now available.

Use of Chatbots

A Chatbot as a tool of amusement

This was one of the initial usage of the Chatbots application. Normally a chatbots shall mime human conversation and supply response to the user based on the form fiting mechanism. ELIZA was one such illustration of the chatbots application which worked on this mechanism. The followers is a sample conversation with ELIZA ( Jurafsky and Martin, 2000 )

Human: Work force are all likewise.

ELIZA: In what manner?

Human: They ‘re ever teasing us about something.

ELIZA: Can you believe of a particular illustration?

Homo: Well, my fellow made me come here.

ELIZA: Your fellow made you come here?

Human: He says I ‘m down much of the clip.

ELIZA: I ‘m regretful to hear that you are down much of the clip.

Human: It ‘s true. I ‘m unhappy.

ELIZA: Do you believe coming here will assist you non to be unhappy?

Human: I need some aid, that much seems certain.

Chatbots as a tool to larn and pattern a Language

Users have found chatbots as an interesting tool to patterns and larn new linguistic communication which may be unkown to the user.

Chatbots as information retrieval tool

Chatbots have now been widely used in Educational intents for recovering information such as FAQs ( FAQChat ) , assisting in work outing Mathematical jobs ( Sofia ) etc.

Chatbots in E-commerce, Business and other Spheres

Chatbots are now being widely used in e-commerce and other concern spheres where they act as the first agencies of communicating with the user and aid in cut downing the overall cost which would hold been otherwise spent in holding work force to make so.

The undermentioned sample presents a conversation with the Happy Assistant system taken from Chai and Lin ( 2001 )

Uracil: I am looking for a notebook for my consulting concern

Second: Please depict your fiscal restraints.

In this phase a list of most popular 1s is displayed

Uracils: non of import thing public presentation is indispensable

Second: are you looking for something that is top of the line?

Uracil: Yes, perfectly

Second: I have found something for you.

The mark notebook is displayed for the user. And beneath it a drumhead

of the users request displayed to explicate why this merchandise is displayed.

Description of the Starting Code

To Show the capableness of the ChatBot, I shall be utilizing the Eliza4 and shall heighten the codification to show the intelligence of the chatbot. The codification to get down with shall be the file Eliza.cpp which includes the chief map to parse the user response and bring forth a response. The chief map initializes an infinite cringle to acquire into the conversation which can stop if the user types in “ Bye ” or the user does non give any response and merely imperativeness enters for some figure of times. In the remainder of the instances, the chatbot shall come in into the usual conversation, parsing the input and so bring forthing the end product based on the predefined forms in the the file pattern.txt

Following is the snapshot of the codification which gets into the infinite cringle to come in into the conversation. This codification is defined in the file eliza.cpp in the chief map.

while ( required )


cout & lt ; & lt ; “ You: “ ;

readLine ( cin, inputLine ) ;

if ( inputLine.length ( ) == 0 )

{ // so they have n’t written anything so give them some kind of prompt

/****** If the user does non give any response boulder clay MAXBLANKS figure of efforts ( presently MAXBLANKS is defined to be 82 so the chatbot shall give a warning message ******/

if ( you.youBlank ( ) & gt ; = you.MAXBLANKS )

{ // give up on them and stop the plan

cout & lt ; & lt ; “ Azile: you are an unresponsive homo ” & lt ; & lt ; endl ;

required = false ;

continue ;


if ( blankPrompts.size ( ) & gt ; 0 )

{ // end product a relevant response

cout & lt ; & lt ; “ Azile: “ & lt ; & lt ; blankPrompts [ rand ( ) % blankPrompts.size ( ) ] & lt ; & lt ; endl ;


you.noteYouBlank ( ) ; // number the space responses


/****** A proper response was given so lets process them ******/


{ // treat their input

// count it

you.noteYouSpoke ( ) ;

// what else would you wish to make with their input?

// acquire the single words as an array ( vector ) of word

inputLineCopy = removePunctuation ( inputLine, “ ‘ ” ) ; // take punctuation apart from ‘

tokenize ( inputLineCopy, items, “ ” ) ; // interrupt up into wbyords

replaceSynonyms ( items, equivalent word ) ; // replace equivalent word

// Process them

if ( didRespond = canRespond ( items, forms, myResponse ) )

{ // so it matches one of the forms precisely

cout & lt ; & lt ; myResponse & lt ; & lt ; endl ;


// particular instances

if ( capital ( tokens [ 0 ] ) == “ BYE ” )

{ // they are desiring to halt

required = false ;

continue ;


if ( didRespond==false )

{ // I ca n’t get by with it

// This is truly bad. There must be something you can make with it! ! !

// cout & lt ; & lt ; “ Azile could state… . ” & lt ; & lt ; endl ;

cout & lt ; & lt ; myResponse & lt ; & lt ; endl ;

// cout & lt ; & lt ; “ Does that do sense? ? ? ? ” & lt ; & lt ; endl & lt ; & lt ; endl ;

// cout & lt ; & lt ; “ Azile: I ‘m sorry I do n’t understand that ” & lt ; & lt ; endl ;

you.noteTooDifficult ( ) ;

if ( you.youTooDifficult ( ) & gt ; you.MAXDONTKNOWS )


if ( dontKnowPrompts.size ( ) & gt ; 0 )

{ // so utilize them

cout & lt ; & lt ; “ Azile: “ & lt ; & lt ; dontKnowPrompts [ rand ( ) % dontKnowPrompts.size ( ) ] & lt ; & lt ; endl ;


you.clearTooDifficult ( ) ;




As described in the codification above, if there is a valid response apart from BYE, so the chatbot shall parse the input twine, tokenize it after taking punctuations, and so shall treat the twine. Harmonizing to the parsed threading the chatbot shall fix the response and shall so end product the value. The chatbot shall take attention of assorted equivalent word which have been described in the file synonyms.txt so that if the user for illustration type “ Hello ” or “ Hi ” so the chatbot interprets them to be the same as they both intend to be the same and hence generates same response for the same.

Similarly the Eliza chatbot describes assorted switchables like if the user response with “ I ” so the chatbot shall react with “ You ” or if the user response with “ We are ” so the chatbot shall react with “ you are ” etc. These swithcables are described in the file switchables.txt


The proposed NLP sweetening is to do the chatbot work like a chatbot in the chatting room something like what one encounters in Yahoo courier etc. Here the chatbot shall be enhanced to be capable adequate to manage the synergistic confab session intelligently and bring forth a response so that the user believes that he is engaged in some conversation with the existent human being. The conversation would be used to pull a user profile which can be used by the concern and selling house to pull up a client profile and grade out some specific clients.

Some sweetenings which the chatbot shall show are as follows:

The chatbot shall be able to do a history.txt file in which it shall hive away the conversation with the specific user and can utilize the earlier response to transport the conversation intelligently.

The chatbot shall be able enhanced to deduce a specific information about the user without inquiring any specific inquiries like Name? Age? Etc.

This manner the chatbot can be used to bring forth a profile of the user it is interacting with which can be used by many selling houses to place the possible clients.

Leave a Reply

Your email address will not be published. Required fields are marked *