# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.shortcuts import render
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
import nltk
import os
import math
import string
import sentence
import re

from nltk.corpus import wordnet 




# Create your views here.
@csrf_exempt

def homepage(request):
	return render(request,'project128.html')
@csrf_exempt
def index(request):
	#print "Hello"

	
	
	
	
	word = request.POST.get('message').encode('ascii','ignore')	
	mood = request.POST.get('mood').encode('ascii','ignore')	


	print word+" "+mood
	
	sad = [
	'aggrieve',
	'attrit',
	'attrition',
	'bad',
	'bereav',
	'bereaved',
	'bereft',
	'blue',
	'blue_devil',
	'blue_devils',
	'bore',
	'bored',
	'brokenhearted',
	'brokenheartedness',
	'cast_down',
	'cheerless',
	'cheerlessly',
	'cheerlessness',
	'compunct',
	'compunction',
	'contrit',
	'contrite',
	'contritely',
	'contriteness',
	'contrition',
	'dark',
	'deject',
	'demor',
	'demoralis',
	'demoralising',
	'demoralization',
	'demoralize',
	'demoralized',
	'demoralizing',
	'deplor',
	'deplorable',
	'deplorably',
	'depress',
	'depressed',
	'depressing',
	'depression',
	'depressive',
	'desol',
	'desolate',
	'desolation',
	'despair',
	'despairingly',
	'despond',
	'despondence',
	'despondency',
	'despondent',
	'despondently',
	'dingi',
	'dingy',
	'disconsol',
	'disconsolate',
	'disconsolateness',
	'discourag',
	'discouraged',
	'dishearten',
	'disheartened',
	'disheartening',
	'dismal',
	'dismay',
	'dispirit',
	'dispirited',
	'dispiritedness',
	'dispiriting',
	'distress',
	'distressed',
	'dole',
	'doleful',
	'dolefully',
	'dolefulness',
	'dolor',
	'dolorous',
	'dolour',
	'dolourous',
	'down',
	'downcast',
	'downheart',
	'downhearted',
	'downheartedness',
	'downtrodden',
	'drab',
	'drear',
	'dreari',
	'dreary',
	'dysphor',
	'dysphoria',
	'dysphoric',
	'execr',
	'execrable',
	'forlorn',
	'forlornly',
	'forlornness',
	'get_down',
	'gloom',				
	'gloomful',
	'gloomi',
	'gloomili',
	'gloomily',
	'gloominess',
	'glooming',
	'gloomy',
	'glum',
	'godforsaken',
	'grief',
	'grief-stricken',
	'griev',
	'grieve',
	'grieving',
	'grievous',
	'grievously',
	'grim',
	'guilt',
	'guilt_feel',
	'guilt_feelings',
	'guilt_trip',
	'guilti',
	'guilty',
	'guilty_consci',
	'guilty_conscience',
	'hangdog',
	'hapless',
	'harass',
	'heartach',
	'heartache',
	'heartbreak',
	'heartbreaking',
	'heartrend',
	'heartrending',
	'heartsick',
	'heartsickness',
	'heavyheart',
	'heavyhearted',
	'heavyheartedness',
	'helpless',
	'helplessness',
	'joyless',
	'joylessly',
	'joylessness',
	'lachrymos',
	'lachrymose',
	'laden',
	'lament',
	'lamentably',
	'loneli',
	'loneliness',
	'long-fac',
	'long-faced',
	'lorn',
	'low',
	'low-spirit',
	'low-spirited',
	'low-spiritedness',
	'melanchol',
	'melancholi',
	'melancholic',
	'melancholy',
	'miser',
	'miserable',
	'miserably',
	'miseri',
	'misery',
	'misfortun',
	'misfortunate',
	'mourn',
	'mournful',
	'mournfully',
	'mournfulness',
	'mourning',
	'oppress',
	'oppressed',
	'oppression',
	'oppressive',
	'oppressively',
	'oppressiveness',
	'pathet',
	'pathetic',
	'penanc',
	'penance',
	'penit',
	'penitence',
	'penitent',
	'penitenti',
	'penitentially',
	'penitently',
	'persecut',
	'persecute',
	'persecuted',
	'piteous',
	'piti',
	'pitiabl',
	'pitiable',
	'pitiful',
	'pitying',
	'plaintiv',
	'plaintive',
	'plaintively',
	'plaintiveness',
	'poor',
	'regret',
	'regretful',
	'remors',
	'remorse',
	'remorseful',
	'remorsefully',
	'repent',
	'repentance',
	'repentant',
	'repentantly',
	'rue',
	'rueful',
	'ruefulli',
	'ruefully',
	'ruefulness',
	'ruth',
	'ruthfulness',
	'sad',
	'sadden',
	'saddening',
	'sadly',
	'sadness',
	'self-piti',
	'self-pity',
	'self-reproach',
	'shame',
	'shamed',
	'shamefac',
	'shamefaced',
	'somber',
	'somberness',
	'sorri',
	'sorrow',
	'sorrowful',
	'sorrowfully',
	'sorrowfulness',
	'sorrowing',
	'sorry',
	'sorry_for',
	'suffer',
	'suffering',
	'tear',
	'tearful',
	'tearfulness',
	'tyrann',
	'tyrannical',
	'tyrannous',
	'uncheer',
	'uncheerful',
	'uncheerfulness',
	'unhappi',
	'unhappiness',
	'unhappy',
	'weep',
	'weepi',
	'weepiness',
	'weeping',
	'weight',
	'woe',
	'woebegon',
	'woebegone',
	'woeful',
	'woefulli',
	'woefully',
	'woefulness',
	'world-weari',
	'world-weariness',
	'world-weary',
	'wretch',
	'wretched',
	'Weltschmerz',

	]

	
	

	disgust = [
	'abhorr',
	'abhorrent',
	'abomin,'
	'abominably',
	'churn_up',
	'detest',
	'detestable',
	'detestably',
	'disgust',
	'disgusted',
	'disgustedly',
	'disgustful',
	'disgusting',
	'disgustingly',
	'distast',
	'distasteful',
	'distastefully',
	'fed_up',
	'foul',
	'hideous',
	'horror',
	'loath',
	'loathly',
	'loathsom',
	'loathsome',
	'nausea',
	'nauseat',
	'nauseate',
	'nauseated',
	'nauseating',
	'nauseous',
	'noisom',
	'noisome',
	'obscen',
	'obscene',
	'odious',
	'odiously',
	'offens',
	'offensive',
	'queasi',
	'queasy',
	'repel',
	'repellant',
	'repellent',
	'repugn',
	'repugnance',
	'repugnant',
	'repuls',
	'repulse',
	'repulsion',
	'repulsive',
	'repulsively',
	'revolt',
	'revolting',
	'revoltingly',
	'revuls',
	'revulsion',
	'sick',
	'sick_of',
	'sicken',
	'sickening',
	'sickeningly',
	'sickish',
	'tired_of',
	'turn_off',
	'vile',
	'wick',
	'wicked',
	'yucki',
	'yucky'
	]

	anger = [
	'abhor',
	'abhorr',
	'abhorrence',
	'abomin',
	'abominate',
	'abomination',
	'aggrav',
	'aggravate',
	'aggravated',
	'aggravation',
	'aggress',
	'aggression',
	'aggressive',
	'aggressiveness',
	'amok',
	'amuck',
	'anger',
	'angered',
	'angri',
	'angrili',
	'angrily',
	'angry',
	'animos',
	'animosity',
	'animus',
	'annoy',
	'annoyance',
	'annoyed',
	'annoying',
	'antagon',
	'antagonism',
	'avarici',
	'avaricious',
	'bad_blood',
	'bad_temp',
	'bad_temper',
	'baffl',
	'baffled',
	'balk',
	'balked',
	'bedevil',
	'begrudg',
	'begrudge',
	'begrudging',
	'belliger',
	'belligerence',
	'belligerency',
	'belligerent',
	'belligerently',
	'bitter',
	'bitterness',
	'bother',
	'bothersom',
	'bothersome',
	'brood',
	'chafe',
	'choler',
	'choleric',
	'class_feel',
	'class_feeling',
	'contemn',
	'covet',
	'covetous',
	'covetously',
	'covetousness',
	'crucifi',
	'crucify',
	'dander',
	'despis',
	'despisal',
	'despise',
	'despising',
	'despit',
	'despiteful',
	'detest',
	'detestation',
	'devil',
	'discourag',
	'discouraged',
	'disdain',
	'displeas',
	'displease',
	'displeased',
	'displeasing',
	'displeasingly',
	'displeasur',
	'displeasure',
	'dudgeon',
	'dun',
	'enfuri',
	'enfuriate',
	'enmiti',
	'enmity',
	'enrag',
	'enraged',
	'enragement',
	'envi',
	'enviabl',
	'enviable',
	'enviably',
	'envious',
	'enviously',
	'enviousness',
	'envy',
	'evil',
	'exacerb',
	'exacerbate',
	'exasper',
	'exasperate',
	'exasperating',
	'exasperation',
	'execr',
	'execrate',
	'execration',
	'fit',
	'frustrat',
	'frustrate',
	'frustrated',
	'frustrating',
	'frustration',
	'furi',
	'furious',
	'furiously',
	'fury',
	'gall',
	'galling',
	'get_at',
	'get_to',
	'grabbi',
	'grabby',
	'grasp',
	'grasping',
	'gravel',
	'greedi',
	'greedy',
	'green-ey',
	'green-eyed',
	'green-eyed_monst',
	'green-eyed_monster',
	'grievanc',
	'grievance',
	'grizzl',
	'grizzle',
	'grudg',
	'grudge',
	'grudging',
	'hackl',
	'hackles',
	'harass',
	'harassed',
	'harassment',
	'harri',
	'harried',
	'hate',
	'hateful',
	'hatefully',
	'hatr',
	'hatred',
	'heartburn',
	'heartburning',
	'high_dudgeon',
	'hostil',
	'hostile',
	'hostilely',
	'hostility',
	'huffi',
	'huffili',
	'huffily',
	'huffiness',
	'huffish',
	'huffishness',
	'huffy',
	'ill_temp',
	'ill_temper',
	'ill_wil',
	'ill_will',
	'incens',
	'incense',
	'incensed',
	'indign',
	'indignant',
	'indignantly',
	'indignation',
	'infuri',
	'infuriate',
	'infuriated',
	'infuriating',
	'infuriation',
	'irasc',
	'irascibility',
	'irascible',
	'ire',
	'irrit',
	'irritate',
	'irritated',
	'irritating',
	'irritation',
	'jealous',
	'jealousi',
	'jealously',
	'jealousy',
	'livid',
	'lividity',
	'lividly',
	'loath',
	'loathe',
	'loathing',
	'mad',
	'madden',
	'maddened',
	'maddening',
	'madness',
	'malef',
	'malefic',
	'maleficence',
	'malevol',
	'malevolence',
	'malevolent',
	'malevolently',
	'malic',
	'malice',
	'malici',
	'malicious',
	'maliciously',
	'maliciousness',
	'malign',
	'malignity',
	'misanthrop',
	'misanthropi',
	'misanthropic',
	'misanthropical',
	'misanthropy',
	'misocainea',
	'misogami',
	'misogamy',
	'misogyn',
	'misogyni',
	'misogynic',
	'misogynism',
	'misogyny',
	'misolog',
	'misology',
	'mison',
	'isoneism',
	'misopedia',
	'murder',
	'murderously',
	'murderousness',
	'nark',
	'nettl',
	'nettle',
	'nettled',
	'nettlesom',
	'nettlesome',
	'odium',
	'offend',
	'offens',
	'offense',
	'oppress',
	'outrag',
	'outrage',
	'outraged',
	'overjeal',
	'overjealous',
	'peev',
	'peeved',
	'persecut',
	'persecute',
	'peski',
	'pesky',
	'pester',
	'pestered',
	'pestering',
	'pestifer',
	'pestiferous',
	'piqu',
	'pique',
	'piss',
	'pissed',
	'plaguey',
	'plaguy',
	'pout',
	'prehensil',
	'provok',
	'provoked',
	'quick_temp',
	'quick_temper',
	'rag',
	'rage',
	'rancor',
	'rancour',
	'resent',
	'resentful',
	'resentfully',
	'resentment',
	'reveng',
	'revengefully',
	'rile',
	'riled',
	'roil',
	'roiled',
	'scene',
	'score',
	'scorn',
	'see_r',
	'see_red',
	'short_temp',
	'short_temper',
	'sore',
	'spite',
	'spiteful',
	'spitefulness',
	'spleen',
	'stew',
	'stung',
	'sulk',
	'sulki',
	'sulkiness',
	'sulky',
	'tantal',
	'tantalize',
	'tantrum',
	'teas',
	'teasing',
	'temper',
	'the_green-eyed_monst',
	'the_green-eyed_monster',
	'torment',
	'umbrag',
	'umbrage',
	'umbrageous',
	'veng',
	'vengefully',
	'vengefulness',
	'venom',
	'vex',
	'vexat',
	'vexati',
	'vexation',
	'vexatious',
	'vexed',
	'vexing',
	'vindict',
	'vindictive',
	'vindictively',
	'vindictiveness',
	'warpath',
	'with_hostil',
	'with_hostility',
	'wrath',
	'wrathful',
	'wrathfully',
	'wroth',
	'wrothful',
	'Ordeal',
	'Outrageousness',
	'Provoke',
	'Repulsive',
	'Scandal',
	'Severe',
	'Shameful',
	'Shocking',
	'Terrible',
	'Tragic',
	'Unreliable',
	'Unstable',
	'Wicked',
	'Aggravate',
	'Agony',
	'Appalled',
	'Atrocious',
	'Corrupting',
	'Damaging',
	'Deplorable',
	'Disadvantages',
	'Disastrous',
	'Disgusted',
	'Dreadful',
	'Eliminate',
	'Harmful',
	'Harsh',
	'Inconsiderate',
	'enraged',
	'offensive',
	'aggressive',
	'frustrated',
	'controlling',
	'resentful',
	'malicious',
	'infuriated',
	'critical',
	'violent',
	'vindictive',
	'sadistic',
	'spiteful',
	'furious',
	'agitated',
	'antagonistic',
	'repulsed',
	'quarrelsome',
	'venomous',
	'rebellious',
	'exasperated',
	'impatient',
	'contrary',
	'condemning',
	'seething',
	'scornful',
	'sarcastic',
	'poisonous',
	'jealous',
	'ticked off',
	'revengeful',
	'retaliating',
	'reprimanding',
	'powerless',
	'despicable',
	'self-hating',
	'desperate',
	'alienated',
	'pessimistic',
	'dejected',
	'vilified',
	'unjustified',
	'violated'
	]


	joy = ['admire',
	'admirable',
	'admirably',
	'admiration',
	'admire',
	'ador',
	'adorably',
	'adoration',
	'adoring',
	'affect',
	'affection',
	'affectional',
	'affectionate',
	'affectionateness',
	'affective',
	'amat',
	'amative',
	'amatori',
	'amatory',
	'amor',
	'amorous',
	'amorousness',
	'anticip',
	'anticipate',
	'anticipation',
	'appreci',
	'appreciated',
	'approb',
	'approbative',
	'approbator',
	'approval',
	'approve',
	'approved',
	'approving',
	'ardor',
	'ardour',
	'attach',
	'attachment',
	'avid',
	'avidity',
	'avidness',
	'bang',
	'banter',
	'barrack',
	'be_on_',
	'cloud_nin',
	'beam',
	'beaming',
	'becharm',
	'beguil',
	'beguile',
	'beguiled',
	'belong',
	'belonging',
	'benef',
	'benefic',
	'beneficed',
	'beneficence',
	'beneficent',
	'benefici',
	'beneficially',
	'benevol',
	'benevolence',
	'benevolent',
	'benevolently',
	'bewitch',
	'bewitching',
	'blith',
	'blithely',
	'blitheness',
	'bonheur',
	'brother',
	'brotherhood',
	'brotherlik',
	'brotherlike',
	'brotherly',
	'buoyanc',
	'buoyancy',
	'calf_lov',
	'calf_love',
	'captiv',
	'captivate',
	'captivated',
	'captivating',
	'captivation',
	'captured',
	'capture',
	'care',
	'carefree',
	'carefree',
	'carefreeness',
	'caring',
	'catch',
	'chaff',
	'charg',
	'charge',
	'charit',
	'charitable',
	'charm',
	'charmed',
	'cheer',
	'cheer_up',
	'cheerful',
	'cheerfully',
	'cheerfulness',
	'cheering',
	'cheery',
	'chirk_up',
	'cliffhang',
	'cliff-hanging',
	'close',
	'closeness',
	'comfort',
	'comfortable',
	'comfortablenes',
	'comfortably',
	'comforting',
	'commend',
	'commendable',
	'compat',
	'compatibility',
	'compatible',
	'compatibly',
	'complac',
	'complacence',
	'complacency',
	'complacent',
	'concern',
	'congratul',
	'congratulate',
	'consol',
	'console',
	'content',
	'contented',
	'contentment',
	'crush',
	'delight',
	'delighted',
	'devoted',
	'devotedness',
	'devotion',
	'eager',
	'eagerly',
	'eagerness',
	'ebulli',
	'ebullient',
	'ebulliently',
	'elan',
	'elat',
	'elate',
	'elatd',
	'elating',
	'elation',
	'embolden',
	'emot',
	'emotive',
	'empath',
	'empathet',
	'empathetic',
	'empathetically',
	'empathi',
	'empathic',
	'empathy',
	'enamor',
	'enamored',
	'enamoredness',
	'enamour',
	'enchant',
	'enchanting',
	'enchantment',
	'endear',
	'endearingly',
	'enjoy',
	'enthral',
	'enthralled',
	'enthralling',
	'enthrallment',
	'enthusiasm',
	'enthusiast',
	'enthusiastic',
	'enthusiastically',
	'entranc',
	'entrance',
	'entranced',
	'entrancing',
	'esteem',
	'euphor',
	'euphori',
	'euphoria',
	'euphoriant',
	'euphoric',
	'exalt',
	'excit',
	'excitement',
	'exciting',
	'exhilar',
	'exhilarate',
	'exhilarated',
	'exhilarating',
	'exhilaration',
	'exhort',
	'expans',
	'expansively',
	'expect',
	'expectancy',
	'exuber',
	'exuberance',
	'exuberant',
	'exuberantly',
	'exult',
	'exultant',
	'exultantly',
	'exultation',
	'exulting',
	'exultingly',
	'fanci',
	'fancy',
	'fascin',
	'fascinate',
	'fascinating',
	'fascination',
	'favor',
	'favorable',
	'favorably',
	'favour',
	'favourable',
	'favourably',
	'feeling_of_ident',
	'feeling_of_identity',
	'fellow_feel',
	'fellow_feeling',
	'festal',
	'festiv',
	'festive',
	'flush',
	'fond',
	'fond_regard',
	'fondly',
	'fondness',
	'fratern',
	'fraternal',
	'friend',
	'friendli',
	'friendliness',
	'friendly',
	'fulfil',
	'fulfill',
	'fulfillment',
	'fulfilment',
	'gaieti',
	'gaiety',
	'gala',
	'gay',
	'gayli',
	'gayly',
	'giving_protect',
	'giving_protection',
	'glad',
	'gladden',
	'gladdened',
	'gladfulness',
	'gladness',
	'gladsom',
	'gladsome',
	'gladsomeness',
	'glee',
	'gleeful',
	'gleefulli',
	'gleefully',
	'gleefulness',
	'gloat',
	'gloating',
	'gloatingly',
	'good',
	'good_wil',
	'good_will',
	'goodwil',
	'goodwill',
	'gratifi',
	'gratify',
	'gratifying',
	'gratifyingly',
	'great',
	'gusto',
	'happi',
	'happili',
	'happily',
	'happiness',
	'happy',
	'heart',
	'hearten',
	'hero_worship',
	'high-spirit',
	'high-spirited',
	'high_spirit',
	'high_spirits',
	'hilar',
	'hilari',
	'hilarious',
	'hilariously',
	'hilarity',
	'identif',
	'identifi',
	'identification',
	'identify',
	'impress',
	'infatu',
	'infatuation',
	'insouci',
	'insouciance',
	'inspir',
	'inspire',
	'interest',
	'intimaci',
	'intimacy',
	'intox',
	'intoxicate',
	'jocular',
	'jocularity',
	'jocund',
	'jocundity',
	'jolli',
	'jolliti',
	'jollity',
	'jolly',
	'jolly_along',
	'jolly_up',
	'jovial',
	'joviality',
	'joy',
	'joyful',
	'joyfully',
	'joyfulness',
	'joyous',
	'joyously',
	'joyousness',
	'jubil',
	'jubilance',
	'jubilancy',
	'jubilant',
	'jubilantly',
	'jubilate',
	'jubilation',
	'jump_for_joy',
	'keen',
	'keenness',
	'kick',
	'kid',
	'kind',
	'kindheart',
	'kindhearted',
	'kindheartedness',
	'kindly',
	'laudabl',
	'laudably',
	'lift_up',
	'lighthearted',
	'lightheartedness',
	'lightsom',
	'lightsomeness',
	'likabl',
	'likable',
	'like',
	'likeabl',
	'likeable',
	'liking',
	'live_up_to',
	'look_for',
	'look_to',
	'look_up_to',
	'love',
	'lovesom',
	'lovesome',
	'loving',
	'lovingly',
	'lovingness',
	'loyalti',
	'loyalty',
	'merri',
	'merrili',
	'merrily',
	'merriment',
	'merry',
	'mirth',
	'mirthful',
	'mirthfully',
	'mirthfulness',
	'move',
	'near',
	'nigh',
	'occupi',
	'occupy',
	'offering_protect',
	'offering_protection',
	'partial',
	'partiality',
	'penchant',
	'pep_up',
	'perki',
	'perkiness',
	'pick_up',
	'pleas',
	'pleased',
	'pleasing',
	'praiseworthili',
	'praiseworthily',
	'predilect',
	'predilection',
	'preen',
	'prefer',
	'preference',
	'pride',
	'prideful',
	'protect',
	'protective',
	'protectively',
	'protectiveness',
	'proud',
	'proudly',
	'puppy_lov',
	'puppy_love',
	'rapport',
	'recreat',
	'recreate',
	'regard',
	'rejoic',
	'rejoice',
	'rejoicing',
	'relish',
	'respect',
	'revel',
	'riotous',
	'riotously',
	'romant',
	'romantic',
	'rush',
	'satiabl',
	'satiable',
	'satisfact',
	'satisfaction',
	'satisfactori',
	'satisfactorili',
	'satisfactorily',
	'satisfactory',
	'satisfi',
	'satisfiable',
	'satisfied',
	'satisfy',
	'satisfying',
	'satisfyingly',
	'schadenfreud',
	'schadenfreude',
	'scream',
	'screaming',
	'self-complac',
	'self-complacency',
	'self-satisfact',
	'self-satisfaction',
	'self-satisfi',
	'self-satisfied',
	'smug',
	'smugness',
	'soft-boil',
	'soft-boiled',
	'soft_spot',
	'softheart',
	'softhearted',
	'softheartedness',
	'solac',
	'solace',
	'sooth',
	'soothe',
	'stimul',
	'stimulating',
	'strike',
	'sunni',
	'sunny',
	'suspens',
	'suspense',
	'suspenseful',
	'suspensive',
	'sympathet',
	'sympathetic',
	'sympathetically',
	'sympathi',
	'sympathy',
	'tast',
	'taste',
	'teas',
	'teased',
	'tender',
	'tenderness',
	'thirstili',
	'thirstily',
	'thrill',
	'tickl',
	'tickle',
	'titil',
	'titillate',
	'titillated',
	'titillating',
	'titillation',
	'togeth',
	'togetherness',
	'tranc',
	'trance',
	'triumph',
	'triumphal',
	'triumphant',
	'triumphantly',
	'unworri',
	'unworried',
	'uplift',
	'uproari',
	'uproarious',
	'uproariously',
	'urg',
	'urge',
	'urge_on',
	'walk_on_air',
	'wallow',
	'warm',
	'warmheart',
	'warmhearted',
	'warmheartedness',
	'warmth',
	'weak',
	'weakness',
	'with_empathi',
	'with_empathy',
	'with_happi',
	'with_happiness',
	'with_prid',
	'with_pride',
	'with_sympathi',
	'with_sympathy',
	'worri',
	'worry',
	'worship',
	'worshipful',
	'zeal',
	'zealous',
	'zest',
	'zestfulness',
	'blissful',
	'joyous',
	'delighted',
	'overjoyed',
	'gleeful',
	'thankful',
	'festive',
	'ecstatic',
	'satisfied',
	'cheerful',
	'sunny',
	'elated',
	'jubilant',
	'jovial',
	'fun-loving',
	'lighthearted',
	'glorious',
	'innocent',
	'child-like',
	'gratified',
	'euphoric',
	'playful',
	'courageous',
	'energetic',
	'liberated',
	'optimistic',
	'frisky',
	'animated',
	'spirited',
	'thrilled',
	'wonderful',
	'funny',
	'intelligent',
	'exhilarated',
	'spunky',
	'youthful',
	'vigorous',
	'tickled',
	'creative',
	'constructive',
	'helpful',
	'resourceful',
	'at',
	'ease',
	'comfortable',
	'pleased',
	'encouraged',
	'surprised',
	'content',
	'serene',
	'bright',
	'blessed',
	'Vibrant',
	'Bountiful',
	'Glowing'

	]


	fear  = [
	'affright',
	'afraid',
	'alarm',
	'alarmed',
	'alert',
	'anxious',
	'anxiously',
	'appal',
	'appall',
	'apprehens',
	'apprehension',
	'apprehensive',
	'apprehensively',
	'apprehensiveness',
	'atroci',
	'atrocious',
	'aw',
	'awful',
	'awfully',
	'bash',
	'bashfully',
	'bode',
	'boding',
	'browbeaten',
	'bulli',
	'bullied',
	'chill',
	'chilling',
	'cliff-hang',
	'cliff-hanging',
	'coldhearted',
	'coldheartedness',
	'constern',
	'consternation',
	'cow',
	'cowed',
	'cower',
	'crawl',
	'creep',
	'creeps',
	'cring',
	'cringe',
	'cruel',
	'cruelli',
	'cruelly'
	'cruelti',
	'cruelty',
	'dash',
	'daunt',
	'diffid',
	'diffidence',
	'diffident'
	'diffidently',
	'dir',
	'direful',
	'dismay',
	'dread',
	'dreaded'
	'dreadful',
	'dreadfully',
	'fawn',
	'fear',
	'fearful',
	'fearfully',
	'fearfulness',
	'fearsom',
	'fearsome',
	'forebod',
	'foreboding',
	'fright',
	'frighten',
	'frighten_away',
	'frighten_off',
	'frightened',
	'frightening',
	'frighteningly',
	'frightful',
	'grovel',
	'hangdog',
	'hardheart',
	'hardhearted',
	'hardheartedness',
	'heartless',
	'heartlessly',
	'heartlessness',
	'hesit',
	'hesitance',
	'hesitancy',
	'hesitantly',
	'hesitatingly',
	'hideous',
	'hideously',
	'horrend',
	'horrendous',
	'horribl',
	'horrible',
	'horribly',
	'horrid',
	'horridly',
	'horrif',
	'horrifi',
	'horrific',
	'horrified',
	'horrify',
	'horrifying',
	'horrifyingly',
	'horror',
	'horror-stricken',
	'horror-struck',
	'hyster',
	'hysteria',
	'hysterical',
	'hysterically',
	'intimid',
	'intimidate',
	'intimidated',
	'intimidation',
	'merciless',
	'mercilessness',
	'monstrous',
	'monstrously',
	'outrag',
	'outrageous',
	'pall',
	'panic',
	'panic-stricken',
	'panic-struck',
	'panic_attack',
	'panick',
	'panicked',
	'panicki',
	'panicky',
	'pitiless',
	'pitilessness',
	'premonit',
	'premonition',
	'presag',
	'presage',
	'presenti',
	'presentiment',
	'ruthless',
	'ruthlessness',
	'scare',
	'scare_away',
	'scare_off',
	'scared',
	'scarey',
	'scari',
	'scarili',
	'scarily',
	'scary',
	'self-distrust',
	'self-doubt',
	'shadow',
	'shi',
	'shiveri',
	'shivery',
	'shudderi',
	'shuddery',
	'shy',
	'shyli',
	'shyly',
	'shyness',
	'stage_fright',
	'suspens',
	'suspense',
	'suspenseful',
	'suspensive',
	'terribl',
	'terrible',
	'terrifi',
	'terrified',
	'terror',
	'timid',
	'timidity',
	'timidly',
	'timidness',
	'timor',
	'timorous',
	'timorously',
	'timorousness',
	'trepid',
	'trepidation',
	'trepidly',
	'ugli',
	'ugly',
	'unassert',
	'unassertive',
	'unassertively',
	'unassertiveness',
	'uneasili',
	'uneasily',
	'unkind',
	'unsur',
	'unsure'
	]


	def get_word_synonyms_from_sent(word, sent):
	    word_synonyms = []
	    
	    for synset in wordnet.synsets(word):
	        
	        for lemma in synset.lemma_names():
	            
	            if lemma in sent and lemma != word:
	                word_synonyms.append(lemma)
	    return word_synonyms

	suggestion = []
	
	if mood == 'joy':
	    suggestion = get_word_synonyms_from_sent(word, joy)
	elif mood == 'disgust':
	    suggestion = get_word_synonyms_from_sent(word, disgust)
	elif mood == 'anger':
	    suggestion = get_word_synonyms_from_sent(word, anger)
	elif mood == 'fear':
	    suggestion = get_word_synonyms_from_sent(word, fear)
	elif mood == 'sad':
	    suggestion = get_word_synonyms_from_sent(word, sad)
	
	print "".join(suggestion)
                     
    
##
	return HttpResponse(",".join(suggestion))
