Commit e2663fec authored by Vijayakumar Sajeevan's avatar Vijayakumar Sajeevan

finish commit by sajee_IT19180212

parent 783020b3
{
"cells": [
{
"cell_type": "markdown",
"id": "19fa6849",
"metadata": {},
"source": [
"## Team 2022-180's research project front-end with back-end"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e4bb694e",
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" * Serving Flask app \"__main__\" (lazy loading)\n",
" * Environment: production\n",
" WARNING: This is a development server. Do not use it in a production deployment.\n",
" Use a production WSGI server instead.\n",
" * Debug mode: off\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
" * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n",
"127.0.0.1 - - [06/Oct/2022 20:39:49] \"\u001b[37mGET / HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [06/Oct/2022 20:39:50] \"\u001b[37mGET /favicon.ico HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [06/Oct/2022 20:39:53] \"\u001b[37mGET /process_02 HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [06/Oct/2022 20:39:53] \"\u001b[37mGET /favicon.ico HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [06/Oct/2022 20:39:56] \"\u001b[37mPOST /uploadTanglish HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [06/Oct/2022 20:39:56] \"\u001b[37mGET /favicon.ico HTTP/1.1\u001b[0m\" 200 -\n",
"[2022-10-06 20:40:10,905] ERROR in app: Exception on /uploadTanglish [POST]\n",
"Traceback (most recent call last):\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 2447, in wsgi_app\n",
" response = self.full_dispatch_request()\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1952, in full_dispatch_request\n",
" rv = self.handle_user_exception(e)\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1821, in handle_user_exception\n",
" reraise(exc_type, exc_value, tb)\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\_compat.py\", line 39, in reraise\n",
" raise value\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1950, in full_dispatch_request\n",
" rv = self.dispatch_request()\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1936, in dispatch_request\n",
" return self.view_functions[rule.endpoint](**req.view_args)\n",
" File \"<ipython-input-1-a8b14ec70ff3>\", line 410, in tanglish_import\n",
" tanglish_comments = pd.read_excel(get_file)\n",
"NameError: name 'get_file' is not defined\n",
"127.0.0.1 - - [06/Oct/2022 20:40:10] \"\u001b[35m\u001b[1mPOST /uploadTanglish HTTP/1.1\u001b[0m\" 500 -\n",
"127.0.0.1 - - [06/Oct/2022 20:40:10] \"\u001b[37mGET /favicon.ico HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [06/Oct/2022 20:40:15] \"\u001b[37mGET /favicon.ico HTTP/1.1\u001b[0m\" 200 -\n",
"[2022-10-06 20:40:17,182] ERROR in app: Exception on /uploadTanglish [POST]\n",
"Traceback (most recent call last):\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 2447, in wsgi_app\n",
" response = self.full_dispatch_request()\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1952, in full_dispatch_request\n",
" rv = self.handle_user_exception(e)\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1821, in handle_user_exception\n",
" reraise(exc_type, exc_value, tb)\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\_compat.py\", line 39, in reraise\n",
" raise value\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1950, in full_dispatch_request\n",
" rv = self.dispatch_request()\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1936, in dispatch_request\n",
" return self.view_functions[rule.endpoint](**req.view_args)\n",
" File \"<ipython-input-1-a8b14ec70ff3>\", line 410, in tanglish_import\n",
" tanglish_comments = pd.read_excel(get_file)\n",
"NameError: name 'get_file' is not defined\n",
"127.0.0.1 - - [06/Oct/2022 20:40:17] \"\u001b[35m\u001b[1mPOST /uploadTanglish HTTP/1.1\u001b[0m\" 500 -\n",
"127.0.0.1 - - [06/Oct/2022 20:40:17] \"\u001b[37mGET /favicon.ico HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [06/Oct/2022 20:40:23] \"\u001b[37mGET /favicon.ico HTTP/1.1\u001b[0m\" 200 -\n",
"[2022-10-06 20:40:54,540] ERROR in app: Exception on /uploadTanglish [POST]\n",
"Traceback (most recent call last):\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 2447, in wsgi_app\n",
" response = self.full_dispatch_request()\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1952, in full_dispatch_request\n",
" rv = self.handle_user_exception(e)\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1821, in handle_user_exception\n",
" reraise(exc_type, exc_value, tb)\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\_compat.py\", line 39, in reraise\n",
" raise value\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1950, in full_dispatch_request\n",
" rv = self.dispatch_request()\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1936, in dispatch_request\n",
" return self.view_functions[rule.endpoint](**req.view_args)\n",
" File \"<ipython-input-1-a8b14ec70ff3>\", line 410, in tanglish_import\n",
" tanglish_comments = pd.read_excel(get_file)\n",
"NameError: name 'get_file' is not defined\n",
"127.0.0.1 - - [06/Oct/2022 20:40:54] \"\u001b[35m\u001b[1mPOST /uploadTanglish HTTP/1.1\u001b[0m\" 500 -\n",
"127.0.0.1 - - [06/Oct/2022 20:40:54] \"\u001b[37mGET /favicon.ico HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [06/Oct/2022 20:40:56] \"\u001b[37mGET /favicon.ico HTTP/1.1\u001b[0m\" 200 -\n",
"[2022-10-06 20:41:06,204] ERROR in app: Exception on /uploadTanglish [POST]\n",
"Traceback (most recent call last):\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 2447, in wsgi_app\n",
" response = self.full_dispatch_request()\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1952, in full_dispatch_request\n",
" rv = self.handle_user_exception(e)\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1821, in handle_user_exception\n",
" reraise(exc_type, exc_value, tb)\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\_compat.py\", line 39, in reraise\n",
" raise value\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1950, in full_dispatch_request\n",
" rv = self.dispatch_request()\n",
" File \"C:\\Users\\Sajee\\anaconda3\\lib\\site-packages\\flask\\app.py\", line 1936, in dispatch_request\n",
" return self.view_functions[rule.endpoint](**req.view_args)\n",
" File \"<ipython-input-1-a8b14ec70ff3>\", line 410, in tanglish_import\n",
" tanglish_comments = pd.read_excel(get_file)\n",
"NameError: name 'get_file' is not defined\n",
"127.0.0.1 - - [06/Oct/2022 20:41:06] \"\u001b[35m\u001b[1mPOST /uploadTanglish HTTP/1.1\u001b[0m\" 500 -\n",
"127.0.0.1 - - [06/Oct/2022 20:41:06] \"\u001b[37mGET /favicon.ico HTTP/1.1\u001b[0m\" 200 -\n",
"127.0.0.1 - - [06/Oct/2022 20:41:08] \"\u001b[37mGET /favicon.ico HTTP/1.1\u001b[0m\" 200 -\n"
]
}
],
"source": [
"# import libraries\n",
"import pandas as pd\n",
"import numpy as np\n",
"import string\n",
"import re\n",
"import googletrans\n",
"from googletrans import Translator\n",
"from googletrans import LANGUAGES\n",
"translator = Translator()\n",
"\n",
"from flask import Flask, render_template, redirect, url_for, request \n",
"\n",
"app = Flask(__name__)\n",
"\n",
"@app.route(\"/\")\n",
"@app.route(\"/home\")\n",
"def home():\n",
" return render_template(\"index.html\")\n",
" \n",
"@app.route(\"/process_01\")\n",
"def process_01():\n",
" return render_template(\"process_01.html\")\n",
"\n",
"@app.route(\"/process_02\")\n",
"def process_02():\n",
" return render_template(\"process_02.html\")\n",
"\n",
"@app.route(\"/process_03\")\n",
"def process_03():\n",
" return render_template(\"process_03.html\")\n",
"\n",
"@app.route(\"/about\")\n",
"def about():\n",
" return render_template(\"about.html\")\n",
"\n",
"#---------------------functions of IT19180212_Sajeevan.V-----------------------------------(start)\n",
"translated_words = []\n",
"src_language = []\n",
"dest_language = []\n",
"translated_tamil_words = []\n",
"get_Letters = []\n",
"encode = []\n",
"encode_list = []\n",
"\n",
"# dictionaries for encoding & encoding\n",
"dict_tamil = {\"அ\":\"0\", \"ஆ\":\"1\", \"இ\":\"2\", \"ஈ\":\"3\", \"உ\":\"4\", \"ஊ\":\"5\", \"எ\":\"6\", \"ஏ\":\"7\", \"ஐ\":\"8\", \"ஒ\":\"9\", \"ஓ\":\"!\", \"ஔ\":\"@\",\n",
" \"க\":\"#\", \"ங\":\"$\", \"ச\":\"%\", \"ஜ\":\"^\", \"ஞ\":\"&\", \"ட\":\"*\", \"ண\":\"-\", \"த\":\"+\", \"ந\":\"=\", \"ன\":\"a\", \"ப\":\"b\", \"ம\":\"c\",\"ய\":\"d\", \"ர\":\"e\", \"ற\":\"f\", \"ல\":\"g\", \"ள\":\"h\", \"ழ\":\"i\", \"வ\":\"j\", \"ஷ\":\"k\", \"ஸ\":\"l\", \"ஹ\":\"m\",\n",
" \"்\":\"n\", \"ா\":\"o\", \"ி\":\"p\", \"ீ\":\"q\", \"ு\":\"r\", \"ூ\":\"s\", \"ெ\":\"t\", \"ே\":\"u\", \"ை\":\"v\", \"ொ\":\"w\", \"ோ\":\"x\", \"ௌ\":\"y\", \"ௗ\":\"~\", \"ஃ\":\"z\"\n",
" }\n",
"\n",
"dict_english = {\"0\":\"A\", \"1\":\"A\", \"2\":\"I\", \"3\":\"I\", \"4\":\"U\", \"5\":\"U\", \"6\":\"E\", \"7\":\"E\", \"8\":\"AI\", \"9\":\"O\", \"!\":\"O\", \"@\":\"AU\",\n",
" \"#\":\"K\", \"$\":\"N\", \"%\":\"S\", \"^\":\"J\", \"&\":\"N\", \"*\":\"D\", \"-\":\"N\", \"+\":\"TH\", \"=\":\"N\", \"a\":\"N\", \"b\":\"P\", \"c\":\"M\", \"d\":\"Y\", \"e\":\"r\", \"f\":\"r\", \"g\":\"L\", \"h\":\"L\", \"i\":\"L\", \"j\":\"V\", \"k\":\"S\", \"l\":\"S\", \"m\":\"H\",\n",
" \"n\":\"\", \"o\":\"a\", \"p\":\"i\", \"q\":\"i\", \"r\":\"u\", \"s\":\"u\", \"t\":\"e\", \"u\":\"e\", \"v\":\"ai\", \"w\":\"o\", \"x\":\"o\", \"y\":\"au\", \"~\":\"\", \"z\":\"H\" \n",
" }\n",
"\n",
"\n",
"punctuation = '''!()@#&:;🤜🤛🎂😎💚...❤/%?\\{}$,-😂🙏*👇🔥😢👹💘😊👍👎👊😣🤕😈😄☠😭1234567890😀💗🥰😍💯🤩♥️🤘👈✌️🙂💪✊🏿😘🥳🤟😫😊💖️🌹👌🥳🤗🤮🤢🎬🥳🤯😇🤣🏽😃💥🤔'''\n",
"def remove_punctuation(cmt):\n",
" cmt_nonpunct = \"\".join([ char for char in cmt if char not in punctuation]) \n",
" return cmt_nonpunct\n",
"\n",
"def tokenize(cmt):\n",
" tokens = re.split('\\W+', cmt)\n",
" return tokens\n",
"\n",
"remove_words = []\n",
"remove_words.append('httpswwwyoutubecomwatchv')\n",
"remove_words.append('yjlRWSiampt')\n",
"remove_words.append('href')\n",
"remove_words.append('br')\n",
"remove_words.append('Bar')\n",
"remove_words.append('Kahatiti')\n",
"remove_words.append('ms')\n",
"remove_words.append('a')\n",
"remove_words.append('the')\n",
"remove_words.append('tha')\n",
"\n",
"def remove_stop_words(cmt_tokenize):\n",
" clean_cmt = [word for word in cmt_tokenize if word not in remove_words]\n",
" return clean_cmt\n",
"\n",
"def merge_tokens(cmt):\n",
" merge_token = \" \".join(cmt) \n",
" return merge_token\n",
"\n",
"\n",
"# import data-set\n",
"@app.route('/uploader', methods=['GET', 'POST'])\n",
"def file_import():\n",
" if request.method == 'POST':\n",
" global get_file\n",
" get_file = request.form['upload-excel']\n",
" if get_file != '':\n",
" movie_comments = pd.read_excel(get_file)\n",
" return render_template(\"process_01.html\", data=movie_comments.to_html(index=False).replace('<th>', '<th style=\"text-align:center; color:#a8031f; font-size:20px \">'))\n",
" \n",
" return render_template(\"process_01.html\", error=\"Please Import the File!\") # else...\n",
" \n",
"\n",
"# remove punctuation\n",
"@app.route(\"/cleaningComments\")\n",
"def cleaning_process():\n",
"# print(get_file)\n",
" if get_file != '':\n",
" data1 = pd.read_excel(get_file)\n",
" data1['Cleaned_Comments'] = data1['Original_Comments'].apply(lambda x: remove_punctuation(x)) # remove punctuation marks\n",
" global Cleaned_Comments\n",
" Cleaned_Comments = data1['Cleaned_Comments'] \n",
" return render_template(\"process_01.html\", cleanedComments=data1.to_html(index=False).replace('<th>', '<th style=\"text-align:center; color:#a8031f; font-size:20px \">'))\n",
" return render_template(\"process_01.html\", error1=\"There are no dataset files!\")\n",
"\n",
"\n",
"# predict language & translate to English language\n",
"@app.route(\"/predictLanguage\")\n",
"def predict_language():\n",
" if get_file != '':\n",
" data2 = pd.read_excel(get_file)\n",
" for element in Cleaned_Comments:\n",
" translated_words.append(translator.translate(element).text) # translate to English language\n",
" src_language.append(LANGUAGES[ translator.translate(element).src] ) # predict source language\n",
" dest_language.append(LANGUAGES[ translator.translate(element).dest] ) # predict destination language\n",
" data2['Cleaned_Comments'] = Cleaned_Comments # add with data2\n",
" data2['Source_Language'] = src_language\n",
" data2['destination_Language'] = dest_language\n",
" data2['English_Comments'] = translated_words\n",
" \n",
" # store as global variable\n",
" global english_comments\n",
" english_comments = data2['English_Comments']\n",
" global Source_Language\n",
" Source_Language = data2['Source_Language']\n",
" global destination_Language\n",
" destination_Language = data2['destination_Language']\n",
" \n",
" return render_template(\"process_01.html\", translation=data2.to_html(index=False).replace('<th>', '<th style=\"text-align:center; color:#a8031f; font-size:20px \">'))\n",
" \n",
" return render_template(\"process_01.html\", error2=\"There are no dataset files!\")\n",
"\n",
"\n",
"# basic NLTK process\n",
"@app.route(\"/basicNLTK\")\n",
"def basic_Process():\n",
" if get_file != '':\n",
" data3 = pd.read_excel(get_file)\n",
" \n",
" data3['Cleaned_Comments'] = Cleaned_Comments # add with data3\n",
" data3['Source_Language'] = Source_Language # add with data3\n",
" data3['destination_Language'] = destination_Language # add with data3 \n",
" data3['English_Comments'] = english_comments # add with data3\n",
" \n",
" data3['tokens'] = english_comments.apply(lambda x: tokenize(x)) # tokenization\n",
" data3['cleaned_tokens'] = data3['tokens'].apply(lambda x: remove_stop_words(x)) # remove unwanted token\n",
" data3['merge_tokens'] = data3['cleaned_tokens'].apply(lambda x: merge_tokens(x)) # merge token\n",
" \n",
" global tokens, cleaned_tokens, merge_tokens\n",
" tokens = data3['tokens']\n",
" cleaned_tokens = data3['cleaned_tokens']\n",
" merge_tokens = data3['merge_tokens'] \n",
" \n",
" return render_template(\"process_01.html\", basicNLTK=data3.to_html(index=False).replace('<th>', '<th style=\"text-align:center; color:#a8031f; font-size:20px \">'))\n",
" \n",
" return render_template(\"process_01.html\", error3=\"There are no dataset files!\")\n",
"\n",
"\n",
"# translate to Tamil language\n",
"@app.route(\"/translateToTamil\")\n",
"def translate_tamil():\n",
" if get_file != '':\n",
" data4 = pd.read_excel(get_file)\n",
" for element in merge_tokens:\n",
" translated_tamil_words.append(translator.translate(element, dest=\"ta\").text) # translate to Tamil language\n",
" \n",
" data4['Cleaned_Comments'] = Cleaned_Comments # add with data4\n",
" data4['Source_Language'] = Source_Language # add with data4\n",
" data4['destination_Language'] = destination_Language # add with data4 \n",
" data4['English_Comments'] = english_comments # add with data4\n",
" data4['tokens'] = tokens # add with data4\n",
" data4['cleaned_tokens'] = cleaned_tokens # add with data4\n",
" data4['merge_tokens'] = merge_tokens # add with data4\n",
" data4['Tamil_Comments'] = translated_tamil_words # result of translate to tamil language\n",
" \n",
" global tamil_comments\n",
" tamil_comments = data4['Tamil_Comments']\n",
" \n",
" return render_template(\"process_01.html\", traslateToTamil=data4.to_html(index=False).replace('<th>', '<th style=\"text-align:center; color:#a8031f; font-size:20px \">'))\n",
" \n",
" return render_template(\"process_01.html\", error4=\"There are no dataset files!\")\n",
"\n",
"\n",
"# encoding & decoding process & get Tanglish as output \n",
"@app.route(\"/tanglish\")\n",
"def get_tanglish():\n",
" if get_file != '':\n",
" data5 = pd.read_excel(get_file)\n",
" \n",
" data5['Cleaned_Comments'] = Cleaned_Comments # add with data5\n",
" data5['Source_Language'] = Source_Language # add with data5\n",
" data5['destination_Language'] = destination_Language # add with data5 \n",
" data5['English_Comments'] = english_comments # add with data5\n",
" data5['tokens'] = tokens # add with data5\n",
" data5['cleaned_tokens'] = cleaned_tokens # add with data5\n",
" data5['merge_tokens'] = merge_tokens # add with data5\n",
" data5['Tamil_Comments'] = tamil_comments # add with data5\n",
" \n",
" # encoding & decoding process\n",
" for tamil_cmt in tamil_comments:\n",
" # print(tamil_cmt)\n",
" for char in tamil_cmt:\n",
" get_Letters.append(char) \n",
" get_Letters.append(\"\\n \")\n",
" TL = ''.join(get_Letters)\n",
" encode = re.sub('({})'.format( '|'.join(map(re.escape, dict_tamil.keys() ))), lambda m: dict_tamil[m.group()], TL)\n",
" # print(encode)\n",
" for c in encode:\n",
" encode_list.append(c)\n",
" # print(encode_list)\n",
"\n",
" get_result = \"\"\n",
" for index, val in enumerate(encode): #----Validation for tamil-letters----\n",
" if val=='#' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='$' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='%' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='^' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='&' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='*' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='-' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='+' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='=' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='a' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='b' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='c' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='d' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='e' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='f' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='g' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='h' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='i' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='j' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='k' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='l' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" elif val=='m' and encode[index+1]!='n' and encode[index+1]!='o' and encode[index+1]!='p' and encode[index+1]!='q' and encode[index+1]!='r' and encode[index+1]!='s' and encode[index+1]!='t' and encode[index+1]!='u' and encode[index+1]!='v' and encode[index+1]!='w' and encode[index+1]!='x' and encode[index+1]!='y':\n",
" set_value = (val+dict_tamil[\"ா\"])\n",
" encode_list[index] = set_value\n",
" get_result = encode_list\n",
"\n",
" # print(get_result)\n",
" encode = ''.join(get_result)\n",
" # print(\"========= En-Code =========\", \"\\n\", \"\\n\", encode) \n",
"\n",
" step_2 = re.sub('({})'.format('|'.join(map(re.escape, dict_english.keys() ))), lambda m: dict_english[m.group()], encode)\n",
" decode = step_2.capitalize()\n",
" # print(\"========= De-Code(Tamil-English Code-mix Data) =========\", \"\\n\", \"\\n\", decode) \n",
"\n",
" store1 = []\n",
" store2 = []\n",
" store1.append( encode.title().rstrip().split('\\n'))\n",
" store2.append( decode.title().rstrip().split('\\n'))\n",
" # print(store1)\n",
" # print(store2)\n",
"\n",
" temp1 = []\n",
" temp2 = []\n",
" for front_index in store1:\n",
" for second_index in front_index:\n",
" temp1.append(second_index) \n",
" # print(temp1)\n",
"\n",
" for front_index in store2:\n",
" for second_index in front_index:\n",
" temp2.append(second_index) \n",
" # print(temp2)\n",
"\n",
" # store into the data-set\n",
" data5['encode'] = temp1 \n",
" data5['decode(Tanglish_Comment)'] = temp2 \n",
" \n",
" global encodes, decodes\n",
" encodes = data5['encode']\n",
" decodes = data5['decode(Tanglish_Comment)']\n",
" \n",
" return render_template(\"process_01.html\", tanglishComments=data5.to_html(index=False).replace('<th>', '<th style=\"text-align:center; color:#a8031f; font-size:20px \">'))\n",
" \n",
" return render_template(\"process_01.html\", error5=\"There are no dataset files!\")\n",
"\n",
"# Save Tanglish-comments file as an Excel.\n",
"@app.route(\"/save\") \n",
"def save_file():\n",
" if get_file != '':\n",
" data6 = pd.read_excel(get_file)\n",
" \n",
" data6['Cleaned_Comments'] = Cleaned_Comments # add with data6\n",
" data6['Source_Language'] = Source_Language # add with data6\n",
" data6['destination_Language'] = destination_Language # add with data6 \n",
" data6['English_Comments'] = english_comments # add with data6\n",
" data6['tokens'] = tokens # add with data6\n",
" data6['cleaned_tokens'] = cleaned_tokens # add with data6\n",
" data6['merge_tokens'] = merge_tokens # add with data6\n",
" data6['Tamil_Comments'] = tamil_comments # add with data6\n",
" data6['encode'] = encodes # add with data6\n",
" data6['decode(Tanglish_Comment)'] = decodes # add with data6\n",
" \n",
" df = pd.DataFrame(data6)\n",
"\n",
" writer = pd.ExcelWriter('process_01 output - Tanglish_Comments.xlsx', engine='xlsxwriter')\n",
" df.to_excel(writer, sheet_name=\"tanglish_translator\")\n",
" writer.save()\n",
" \n",
" return render_template(\"process_01.html\", msg_01=\"File Successfully Saved.\")\n",
" \n",
" return render_template(\"process_01.html\", msg_02=\"Error!!!\")\n",
"\n",
"#---------------------functions of IT19180212_Sajeevan.V-----------------------------------(end)\n",
"\n",
"\n",
"\n",
"\n",
"#---------------------functions of IT19233536_Jaseenthiran.S-----------------------------------(start)\n",
"\n",
" # write your function here...\n",
"\n",
"#---------------------functions of IT19233536_Jaseenthiran.S-----------------------------------(end)\n",
"\n",
"\n",
"\n",
"\n",
"#---------------------functions of IT19233468_Gobinath.M-----------------------------------(start)\n",
"\n",
" # write your function here...\n",
" \n",
"#---------------------functions of IT19233468_Gobinath.M-----------------------------------(end)\n",
"\n",
"\n",
"\n",
"@app.route(\"/<name>\")\n",
"def greeting(name):\n",
" return f\" Hello {name}, How are You? \" \n",
"\n",
"if __name__=='__main__':\n",
" app.run()\n",
" \n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "738002d1",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "54f4a333",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500&family=Roboto:wght@300;400;500&display=swap');
*{
margin: 0;
padding: 0;
font-family: 'Roboto', sans-serif;
}
.main_one{
width: 100%;
min-height: 100vh;
background-image: linear-gradient( rgba(43,67,114 ,0.4), rgba(43,67,114, 0.4) ), url('/static/back_04.jpg');
background-position: center;
background-size: cover;
position: relative;
}
.main_two{
width: 100%;
min-height: 100vh;
background-image: linear-gradient( rgba(43,67,114 ,0.3), rgba(43,67,114, 0.3) ), url('/static/back_01.jpg');
background-position: center;
background-size: cover;
position: relative;
}
.process1{
width: 100%;
min-height: 100vh;
background-image: linear-gradient( rgba(43,67,114 ,0.5), rgba(43,67,114, 0.5) ), url('/static/background_2.jpg');
background-position: center;
background-size: cover;
position: relative;
}
.process2{
width: 100%;
height: 100vh;
background-image: linear-gradient( rgba(43,67,114 ,0.5), rgba(43,67,114, 0.5) ), url('/static/background_3.jpg');
background-position: center;
background-size: cover;
position: relative;
}
.process3{
width: 100%;
height: 100vh;
background-image: linear-gradient( rgba(43,67,114 ,0.5), rgba(43,67,114, 0.5) ), url('/static/background_4.jpg');
background-position: center;
background-size: cover;
position: relative;
}
.aboutBody{
width: 100%;
height: 100vh;
background-image: linear-gradient( rgba(43,67,114 ,0.5), rgba(43,67,114, 0.5) ), url('/static/background_2.jpg');
background-position: center;
background-size: cover;
position: relative;
}
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>about of 2022-180</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<!--Bootstrap-Css -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!--FontAwesome-Css -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous"/>
<!--custom style-Css -->
<link rel='stylesheet' type='text/css' media='screen' href="{{ url_for('static', filename='customStyle.css') }}">
</head>
<body class="aboutBody">
<section class="container-fluid">
<br>
<a href="/home" class="btn btn-outline-warning fs-5 fw-bold"><b> &laquo; Back </b></a><br><br>
<div class="container">
<table class="table table-striped table-light">
<thead>
<tr class="table-warning text-danger">
<th colspan="3">Project Details</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Module</th>
<td colspan="3">Final Year Research Project</td>
</tr>
<tr>
<th scope="row">Group Id</th>
<td colspan="3" class="text-primary"><b>2022-180</b></td>
</tr>
<tr>
<th scope="row">Project Heading</th>
<td colspan="3" class="text-primary"><b>Recommendation system based on Tamil-English code-mixed text analysis</b></td>
</tr>
</tbody>
<thead>
<tr class="table-warning text-danger">
<th scope="col">Members</th>
<th scope="col">Name</th>
<th scope="col">E-mail</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">External-Supervisor</th>
<td>Ms. Aarchana Kugathasan</td>
<td>archchanakugathasan@gmail.com</td>
</tr>
<tr>
<th scope="row">Supervisor</th>
<td>Ms. Wishalya Tissera</td>
<td>wishalya.t@sliit.lk</td>
</tr>
<tr>
<th scope="row">Co-Supervisor</th>
<td>Samitha Vidhanaarachchi</td>
<td>samitha.v@sliit.lk</td>
</tr>
</tbody>
<thead>
<tr class="table-warning text-danger">
<th scope="col">Members</th>
<th scope="col">Name</th>
<th scope="col">Registration Number</th>
</tr>
</thead>
<tr>
<th scope="row">Member-01</th>
<td>Sajeevan.V</td>
<td>IT19180212</td>
</tr>
<tr>
<th scope="row">Member-02</th>
<td>M.Gobinath</td>
<td>IT19233468</td>
</tr>
<tr>
<th scope="row">Member-03</th>
<td>Jaseenthiran.S</td>
<td>IT19233536</td>
</tr>
</tbody>
</table>
</div>
</section>
<footer>
<div class="container-fluid text-center text-light">
<div class="row">
<div class="col-md-12">
<h5 class="foot_link"> &copy All right Reversed. <a class="footerlinks text-light text-unstyled" href="/about" target="_blank">2022-180</a> Team</h5>
</div>
<div class="col-md-12">
<h6 class="foot_link"> sajeevan0541@gmail.com</h6>
</div>
<div class="col-md-12">
<h6 class="foot_link"> +94 767930541</h6>
</div>
</div>
</div>
</footer>
</body>
</html>
\ No newline at end of file
{% extends "layout.html" %}
{% block content %}
<section class="main_one">
<div>
<marquee direction="left" scrollamount="6" style="padding-top:10px ;">
<h2 class="text-light">Movie Recommendation System based on Tamil-English code-mixed(<i>Tanglish</i>) text analysis</h2>
</marquee>
<div id="mainSlide" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100" src="/static/cinema_05.jpg" alt="First slide" height="710px">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="/static/cinema_04.jpg" alt="Second slide" height="710px">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="/static/cinema_03.jpg" alt="Third slide" height="710px">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="/static/cinema_06.jpg" alt="fourth slide" height="710px">
</div>
</div>
<a class="carousel-control-prev" href="#mainSlide" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#mainSlide" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div style="margin-top: 35px; margin-bottom: 30px;">
<center><a href="#btnPage" class="badge badge-pill badge-light" style="font-size:18px;" >View Process</a></center>
</div>
</section>
<section id="btnPage" class="main_two container-fluid">
<div>
<div class="row">
<div class="col-md-3 mx-auto">
<!-- Button-1 trigger modal -->
<button type="button" class="btn btn-warning btn-block btn-lg text-secondary" data-toggle="modal" data-target="#processStep1">
<b>Step - 01</b>
</button><br>
</div>
<div class="col-md-3 mx-auto">
<!-- Button-2 trigger modal -->
<button type="button" class="btn btn-warning btn-block btn-lg text-secondary" data-toggle="modal" data-target="#processStep2">
<b>Step - 02</b>
</button><br>
</div>
<div class="col-md-3 mx-auto">
<!-- Button-3 trigger modal -->
<button type="button" class="btn btn-warning btn-block btn-lg text-secondary" data-toggle="modal" data-target="#processStep3">
<b>Step - 03</b>
</button>
</div>
</div>
<!-- Modal-btn-01 -->
<div class="row">
<div class="col-md- mx-auto">
<div class="modal fade" id="processStep1" tabindex="-1" role="dialog" aria-labelledby="processStep1Title" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="processStep1Title">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
Process-01, Process-01, Process-01, Process-01, Process-01,Process-01, Process-01,
Process-01, Process-01, Process-01, Process-01, Process-01,Process-01, Process-01,
Process-01, Process-01, Process-01, Process-01, Process-01,Process-01, Process-01,
Process-01, Process-01, Process-01, Process-01, Process-01,Process-01, Process-01.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal-btn-02 -->
<div class="modal fade" id="processStep2" tabindex="-1" role="dialog" aria-labelledby="processStep2Title" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="processStep2Title">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
Process-02, Process-01, Process-01, Process-01, Process-01,
Process-01, Process-01, Process-01, Process-01, Process-01,
Process-01, Process-01, Process-01, Process-01, Process-01,
Process-01, Process-01, Process-01, Process-01, Process-01
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal-btn-03 -->
<div class="modal fade" id="processStep3" tabindex="-1" role="dialog" aria-labelledby="processStep3Title" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="processStep3Title">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
Process-03, Process-01, Process-01, Process-01, Process-01,
Process-01, Process-01, Process-01, Process-01, Process-01,
Process-01, Process-01, Process-01, Process-01, Process-01,
Process-01, Process-01, Process-01, Process-01, Process-01
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br><br>
</section>
{% endblock %}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>MovieREC - 2022-180</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<!--Bootstrap-Css -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!--FontAwesome-Css -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous"/>
<!--custom style-Css -->
<link rel='stylesheet' type='text/css' media='screen' href="{{ url_for('static', filename='customStyle.css') }}">
</head>
<body>
<header>
<div>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand text-danger mr-5" href="/home">
<h3>MovieREC</h3>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link mr-3" aria-current="page" href="/home">Home</a>
</li>
<li class="nav-item">
<a class="nav-link mr-3" href="/process_01">Process-01</a>
</li>
<li class="nav-item">
<a class="nav-link mr-3" href="/process_02">Process-02</a>
</li>
<li class="nav-item">
<a class="nav-link mr-3" href="/process_03">Process-03</a>
</li>
<li class="nav-item">
<a class="nav-link mr-3" href="/result">Result</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About Us</a>
</li>
</ul>
</div>
</nav>
</div>
</header>
<section>
{% block content %}
{% endblock %}
</section>
<footer>
<div class="container-fluid bg-secondary text-center text-light">
<div class="row">
<div class="col-md-12">
<h5 class="foot_link"> &copy All right Reversed. <a class="footerlinks text-light text-unstyled" href="/about" target="_blank">2022-180</a> Team</h5>
</div>
<div class="col-md-12">
<h6 class="foot_link"> sajeevan0541@gmail.com</h6>
</div>
<div class="col-md-12">
<h6 class="foot_link"> +94 767930541</h6>
</div>
</div>
</div>
</footer>
<!--Bootstrap-jQuery-js -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<!--Bootstrap-popper-js -->
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<!--Bootstrap-js -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<!--FontAwesome-js -->
<script defer src="https://use.fontawesome.com/releases/v5.15.4/js/all.js" integrity="sha384-rOA1PnstxnOBLzCLMcre8ybwbTmemjzdNlILg8O7z1lUkLXozs4DHonlDtnE7fpc" crossorigin="anonymous"></script>
</body>
</html>
\ No newline at end of file
{% extends "layout.html" %}
{% block content %}
<div class="process1">
<br>
<form action = "uploader" method="post">
<h4 class="text-warning font-weight-bold ml-3">Import comments file (<i>.xlsx</i> ) </h4>
<div class="form-group ml-3">
<input class="form-control" type="file" name="upload-excel" value="" style="width: 500px; cursor: pointer;" ><br>
<input class="form-control btn-outline-light font-weight-bold" type="submit" name="btnSubmit" value="Import file" style="width: 300px; cursor: pointer;">
</div>
<br><br>
</form>
<div class="container-fluid text-dark font-weight-bold mx-auto" style="width: 90%;">
<div class="table-responsive" style="opacity: 0.8;">
<div class="table table-light"> {{data | safe}}</div>
<center><h2 class="text-danger"><i> {{ error }} </i></h2></center>
</div>
</div>
<br>
<center><a class="badge badge-pill badge-warning" href="/cleaningComments" style="padding: 15px; font-size: 18px;">Cleaning comments</a></center>
<br>
<br>
<div class="container-fluid text-dark font-weight-bold mx-auto" style="width: 90%;">
<div class="table-responsive" style="opacity: 0.8;">
<div class="table table-light table-responsive"> {{cleanedComments | safe}}</div>
<center><h2 class="text-danger"><i> {{ error1 }} </i></h2></center>
</div>
</div>
<br>
<center><a class="badge badge-pill badge-warning" href="/predictLanguage" style="padding: 15px; font-size: 18px;">Language prediction</a></center>
<br>
<br>
<div class="container-fluid text-dark font-weight-bold mx-auto" style="width: 90%;">
<div class="table-responsive" style="opacity: 0.8;">
<div class="table table-light table-responsive"> {{translation | safe}}</div>
<center><h2 class="text-danger"><i> {{ error2 }} </i></h2></center>
</div>
</div>
<br>
<center><a class="badge badge-pill badge-warning" href="/basicNLTK" style="padding: 15px; font-size: 18px;">Basic nltk process</a></center>
<br>
<br>
<div class="container-fluid text-dark font-weight-bold mx-auto" style="width: 90%;">
<div class="table-responsive" style="opacity: 0.8;">
<div class="table table-light table-responsive"> {{basicNLTK | safe}}</div>
<center><h2 class="text-danger"><i> {{ error3 }} </i></h2></center>
</div>
</div>
<br>
<center><a class="badge badge-pill badge-warning" href="/translateToTamil" style="padding: 15px; font-size: 18px;">Translate to tamil language</a></center>
<br>
<br>
<div class="container-fluid text-dark font-weight-bold mx-auto" style="width: 90%;">
<div class="table-responsive" style="opacity: 0.8;">
<div class="table table-light table-responsive"> {{traslateToTamil | safe}}</div>
<center><h2 class="text-danger"><i> {{ error4 }} </i></h2></center>
</div>
</div>
<br>
<center><a class="badge badge-pill badge-warning" href="/tanglish" style="padding: 15px; font-size: 18px;">Tanglish comments</a></center>
<br>
<br>
<div class="container-fluid text-dark font-weight-bold mx-auto" style="width: 90%;">
<div class="table-responsive" style="opacity: 0.8;">
<div class="table table-light table-responsive"> {{tanglishComments | safe}}</div>
<center><h2 class="text-danger"><i> {{ error5 }} </i></h2></center>
</div>
</div>
<br>
<center><a class="badge badge-pill badge-warning" href="/save" style="padding: 15px; font-size: 18px;">Save</a></center>
<br>
<br>
<div class="container-fluid text-dark font-weight-bold mx-auto" style="width: 90%;">
<div class="table-responsive" style="opacity: 0.8;">
<center><h2 class="text-danger"><i> {{ msg_02 }} </i></h2></center>
<center><h2 class="text-success"><i> {{ msg_01 }} </i></h2></center>
</div>
</div>
<br>
</div>
{% endblock %}
{% extends "layout.html" %}
{% block content %}
<div class="process2">
<form action = "uploadTanglish" method="post">
<h4 class="text-warning font-weight-bold ml-3">Import comments file (<i>.xlsx</i> ) </h4>
<div class="form-group ml-3">
<input class="form-control" type="file" name="upload-tanglish" value="" style="width: 500px; cursor: pointer;" ><br>
<input class="form-control btn-outline-light font-weight-bold" type="submit" name="btnSubmit" value="Import file" style="width: 300px; cursor: pointer;">
</div>
<br><br>
</form>
<div class="container-fluid text-dark font-weight-bold mx-auto" style="width: 90%;">
<div class="" style="opacity: 0.8;">
<div class="table table-light table-responsive"> {{tanglish_dataset | safe}}</div>
<center><h2 class="text-danger"><i> {{ error }} </i></h2></center>
</div>
</div>
<br>
<center><a class="badge badge-pill badge-warning" href="/tokenization" style="padding: 15px; font-size: 18px;">Tokenization</a></center>
<br>
<br>
<div class="container-fluid text-dark font-weight-bold mx-auto" style="width: 90%;">
<div class="table-responsive" style="opacity: 0.8;">
<div class="table table-light table-responsive"> {{tang_data | safe}}</div>
<center><h2 class="text-danger"><i> {{ error1 }} </i></h2></center>
</div>
</div>
</div>
{% endblock %}
{% extends "layout.html" %}
{% block content %}
<div class="process3">
<h1>belong to process-03</h1>
<h2>for Gobinath.M</h2>
</div>
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment