how to detect the mood of a person during chat?

256 views
Skip to first unread message

Sana Amanat

unread,
Aug 10, 2012, 6:14:19 AM8/10/12
to nltk-...@googlegroups.com
Hey !!
Can anyone help me out.... If a person is chatting with a chat bot, how can a chat bot detects the mood of that person and the response of chat bot should show the variation of mood.  Firstly detection of mood ,secondly chat bot should show its own mood in response. 

Victor Miclovich

unread,
Aug 10, 2012, 6:19:24 AM8/10/12
to nltk-...@googlegroups.com
On Fri, Aug 10, 2012 at 1:14 PM, Sana Amanat <sana.am...@gmail.com> wrote:
Hey !!
Can anyone help me out.... If a person is chatting with a chat bot, how can a chat bot detects the mood of that person and the response of chat bot should show the variation of mood.  Firstly detection of mood ,secondly chat bot should show its own mood in response. 

a basic P.O.S analysis could do... also, associating every phrase/greeting with Good and Bad mood. Have you thought of using a supervised algorithm by teaching your program Good/Bad mood associations and then inferring for any future chatters
 

--
You received this message because you are subscribed to the Google Groups "nltk-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nltk-users/-/n6N24hz9FxsJ.
To post to this group, send email to nltk-...@googlegroups.com.
To unsubscribe from this group, send email to nltk-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nltk-users?hl=en.

Sana Amanat

unread,
Aug 10, 2012, 6:28:11 AM8/10/12
to nltk-...@googlegroups.com
I have to start it from scratch , so kindly guide me step by step.Well , obviously, at start it will be supervised.by POS if I separate the mood by filtering the keywords like annoy, sad, happy etc. then how to develop an algorithm of mood for chat bot, should i used neural network then what will be the input?

Victor Miclovich

unread,
Aug 10, 2012, 6:33:35 AM8/10/12
to nltk-...@googlegroups.com
This depends on your application, if you are using a full-stack on top of python such as django, one choice is to have a background process

1) initial learning (or training of your application to discern known words related with good and bad; i.e. your application will need training data too)
2) continual learning (a mix of both supervised & unsupervised learning)

Application stack for your algorithm
-> django-celery can run as a background task processor (to help keep the algorithm up-to-date with new words and all that kind of stuff)

For the details, you'll probably want to use a naive-bayes classifier to classier chat streams as either positive/negative moods and respond appropriately.

Similar application frameworks can help you build that.

To view this discussion on the web visit https://groups.google.com/d/msg/nltk-users/-/vpQHLDvO2t8J.

Victor Miclovich

unread,
Aug 10, 2012, 6:34:34 AM8/10/12
to nltk-...@googlegroups.com

Sana Amanat

unread,
Aug 10, 2012, 6:40:48 AM8/10/12
to nltk-...@googlegroups.com
what do you think by doing all this, can i achieve the above mentioned goals, actually i am totally new to mood/emotion in NLP, IF I say bad words to you right now then off course you will curse me as well. can a chat bot and the user do the same in a particular context? As I am going to integrate this feature with my existing application(chat bot). 

Alexis Dimitriadis

unread,
Aug 10, 2012, 6:46:50 AM8/10/12
to nltk-...@googlegroups.com
Sana,

You're in luck, actually-- no need no tackle this from scratch. Google "sentiment analysis" and you'll find plenty of work on this topic.

Best,

Alexis
To view this discussion on the web visit https://groups.google.com/d/msg/nltk-users/-/vpQHLDvO2t8J.

Victor Miclovich

unread,
Aug 10, 2012, 6:45:23 AM8/10/12
to nltk-...@googlegroups.com
Lots of things are possible in computing... :-)
with lots of Machine learning, a key aspect in design of algorithms is failure; when we fail, we'll know what works. You should always start with the simplest algorithm, and keep refining it till it gives you perfect sense. 


To answer your question, a chat bot can do that when you implement that kind of algorithm.

--
You received this message because you are subscribed to the Google Groups "nltk-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nltk-users/-/QwaFAeLGfrEJ.

Sana Amanat

unread,
Aug 10, 2012, 6:48:11 AM8/10/12
to nltk-...@googlegroups.com, a.dimi...@uu.nl
Thanks a lot ...

Sana Amanat

unread,
Aug 10, 2012, 6:48:57 AM8/10/12
to nltk-...@googlegroups.com
thanks a lot...

Victor Miclovich

unread,
Aug 10, 2012, 6:50:25 AM8/10/12
to nltk-...@googlegroups.com
:-)

Sana Amanat

unread,
Aug 10, 2012, 6:53:18 AM8/10/12
to nltk-...@googlegroups.com
Surely, I 'll put some more question until and unless I achieve the desired work. :)

On Friday, 10 August 2012 15:50:25 UTC+5, Victor Miclovich wrote:
:-)

Steven Bird

unread,
Aug 10, 2012, 9:34:49 AM8/10/12
to nltk-...@googlegroups.com


On Friday, 10 August 2012, Victor Miclovich wrote:
To answer your question, a chat bot can do that when you implement that kind of algorithm.
Check out Eliza: http://en.wikipedia.org/wiki/ELIZA ...

See also:

Sana Amanat

unread,
Aug 11, 2012, 4:09:55 AM8/11/12
to nltk-...@googlegroups.com
as we already have discussed the actual problem.To detect the mood should we implement the mood?

Finn Årup Nielsen

unread,
Aug 13, 2012, 6:06:26 AM8/13/12
to nltk-...@googlegroups.com
If you do not want to go into machine learning where you need a training
set, you can use a word list approach which in many cases works ok.

I have got one labeled list available from here:

http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6010

I got one small Python program showing the application of the word list
in Python:

http://fnielsen.posterous.com/simplest-sentiment-analysis-in-python-with-af



There are some more pointers here:

http://neuro.imm.dtu.dk/wiki/A_new_ANEW:_evaluation_of_a_word_list_for_sentiment_analysis_in_microblogs


cheers
Finn �rup Nielsen

Reply all
Reply to author
Forward
0 new messages