Commit 9d35589f authored by Dhananjaya Jayashanka's avatar Dhananjaya Jayashanka

UI changers done

parent 4b07e220
#Import useful libraries
import string import string
from collections import Counter
from nltk.corpus import stopwords from nltk.corpus import stopwords
from nltk.sentiment.vader import SentimentIntensityAnalyzer from nltk.sentiment.vader import SentimentIntensityAnalyzer
from nltk.stem import WordNetLemmatizer from nltk.stem import WordNetLemmatizer
...@@ -7,7 +7,7 @@ from nltk.tokenize import word_tokenize ...@@ -7,7 +7,7 @@ from nltk.tokenize import word_tokenize
def textAnalyze(speech): def textAnalyze(speech):
text = speech text = speech
#convert text to lower case
lower_case = text.lower() lower_case = text.lower()
cleaned_text = lower_case.translate(str.maketrans('', '', string.punctuation)) cleaned_text = lower_case.translate(str.maketrans('', '', string.punctuation))
...@@ -20,22 +20,25 @@ def textAnalyze(speech): ...@@ -20,22 +20,25 @@ def textAnalyze(speech):
if word not in stopwords.words('english'): if word not in stopwords.words('english'):
final_words.append(word) final_words.append(word)
# Lemmatization # Lemmatization (convert base or dictionary form of a word)
lemma_words = [] lemma_words = []
for word in final_words: for word in final_words:
word = WordNetLemmatizer().lemmatize(word) word = WordNetLemmatizer().lemmatize(word)
lemma_words.append(word) lemma_words.append(word)
#Defind emotion list
emotion_list = [] emotion_list = []
#Looping final words and identify emotional words
for i in final_words: for i in final_words:
with open('Emotion/emotions.txt', 'r') as file: with open('Emotion/emotions.txt', 'r') as file: #Emotion dectionary
for line in file: for line in file:
#Remove dictionary punctuations
clear_line = line.replace("\n", '').replace(",", '').replace("'", '').strip() clear_line = line.replace("\n", '').replace(",", '').replace("'", '').strip()
word, emotion = clear_line.split(':') word, emotion = clear_line.split(':')
if i in word: if i in word:
final_emotion = emotion.replace("", '').strip() final_emotion = emotion.replace("", '').strip()
def sentiment_analyse(sentiment_text): def sentiment_analyse(sentiment_text): #Measure sentiment and verify the emotions
score = SentimentIntensityAnalyzer().polarity_scores(sentiment_text) score = SentimentIntensityAnalyzer().polarity_scores(sentiment_text)
if score['neg'] > score['pos']: if score['neg'] > score['pos']:
emotion_list.append(final_emotion) emotion_list.append(final_emotion)
...@@ -45,9 +48,7 @@ def textAnalyze(speech): ...@@ -45,9 +48,7 @@ def textAnalyze(speech):
emotion_list.append(final_emotion) emotion_list.append(final_emotion)
sentiment_analyse(word) sentiment_analyse(word)
print(emotion_list) #Return the final emotions
w = emotion_list
print(w)
return { return {
"message": w "message": emotion_list
} }
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i"
rel="stylesheet"> rel="stylesheet">
<!-- Vendor CSS Files --> <!--CSS Files -->
<link href="assets/vendor/aos/aos.css" rel="stylesheet"> <link href="assets/vendor/aos/aos.css" rel="stylesheet">
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet"> <link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet"> <link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet">
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet"> <link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
<!-- Template Main CSS File --> <!--Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet"> <link href="assets/css/style.css" rel="stylesheet">
<title>Media Recorder in Javascript</title> <title>Media Recorder in Javascript</title>
...@@ -41,41 +41,21 @@ ...@@ -41,41 +41,21 @@
<body> <body>
<!-- ======= Header ======= --> <header id="header" class="fixed-top">
<header id="header" class="fixed-top">
<div class="container d-flex align-items-center justify-content-between"> <div class="container d-flex align-items-center justify-content-between">
<h1 class="logo"><a href="index.html">OnePage</a></h1> <h1 class="logo"><a href="index.html">SPEECH MASTER</a></h1>
<nav id="navbar" class="navbar"> <nav id="navbar" class="navbar">
<ul> <ul>
<li><a class="nav-link scrollto " href="#hero">Home</a></li> <li><a class="nav-link scrollto " href="Live Recorder.html">Record Live</a></li>
<li><a class="nav-link scrollto" href="#about">About</a></li> <li><a class="nav-link scrollto" href="reportFinal.html">Score</a></li>
<li><a class="nav-link scrollto" href="#services">Services</a></li> <li><a class="nav-link scrollto" href="#">Feedbacks</a></li>
<li><a class="nav-link scrollto o" href="#portfolio">Portfolio</a></li> <li><a class="nav-link scrollto" href="#">Contribute</a></li>
<li><a class="nav-link scrollto" href="#team">Team</a></li>
<li><a class="nav-link scrollto" href="#pricing">Pricing</a></li>
<li class="dropdown"><a href="#"><span>Drop Down</span> <i class="bi bi-chevron-down"></i></a>
<ul>
<li><a href="#">Drop Down 1</a></li>
<li class="dropdown"><a href="#"><span>Deep Drop Down</span> <i
class="bi bi-chevron-right"></i></a>
<ul>
<li><a href="#">Deep Drop Down 1</a></li>
<li><a href="#">Deep Drop Down 2</a></li>
<li><a href="#">Deep Drop Down 3</a></li>
<li><a href="#">Deep Drop Down 4</a></li>
<li><a href="#">Deep Drop Down 5</a></li>
</ul>
</li>
<li><a href="#">Drop Down 2</a></li>
<li><a href="#">Drop Down 3</a></li>
<li><a href="#">Drop Down 4</a></li>
</ul>
</li>
<li><a class="nav-link scrollto" href="#contact">Contact</a></li> <li><a class="nav-link scrollto" href="#contact">Contact</a></li>
<li><a class="getstarted scrollto" href="#about">Get Started</a></li>
</ul>
</ul> </ul>
<i class="bi bi-list mobile-nav-toggle"></i> <i class="bi bi-list mobile-nav-toggle"></i>
</nav><!-- .navbar --> </nav><!-- .navbar -->
...@@ -83,6 +63,7 @@ ...@@ -83,6 +63,7 @@
</div> </div>
</header><!-- End Header --> </header><!-- End Header -->
<main id="main"> <main id="main">
<br><br><br><br> <br><br><br><br>
...@@ -144,66 +125,85 @@ ...@@ -144,66 +125,85 @@
</main><!-- End #main --> </main><!-- End #main -->
<!-- ======= Footer ======= --> <!-- ======= Footer ======= -->
<footer id="footer"> <footer id="footer">
<div class="footer-top"> <div class="footer-top">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-3 col-md-6 footer-contact"> <div class="col-lg-3 col-md-6 footer-contact">
<h3>OnePage</h3> <h3>SPEECH MASTER</h3>
<p> <p>
A108 Adam Street <br> SLIIT Mabalbe<br />
New York, NY 535022<br> <br /><br />
United States <br><br> <strong>Phone:</strong> +94 11 55488 55<br />
<strong>Phone:</strong> +1 5589 55488 55<br> <strong>Email:</strong> Speechmaster@info.com<br />
<strong>Email:</strong> info@example.com<br>
</p> </p>
</div> </div>
<div class="col-lg-2 col-md-6 footer-links"> <div class="col-lg-2 col-md-6 footer-links">
<h4>Useful Links</h4> <h4>Useful Links</h4>
<ul> <ul>
<li><i class="bx bx-chevron-right"></i> <a href="#">Home</a></li> <li>
<li><i class="bx bx-chevron-right"></i> <a href="#">About us</a></li> <i class="bx bx-chevron-right"></i> <a href="#">Home</a>
<li><i class="bx bx-chevron-right"></i> <a href="#">Services</a></li> </li>
<li><i class="bx bx-chevron-right"></i> <a href="#">Terms of service</a></li> <li>
<li><i class="bx bx-chevron-right"></i> <a href="#">Privacy policy</a></li> <i class="bx bx-chevron-right"></i> <a href="#">About us</a>
</li>
<li>
<i class="bx bx-chevron-right"></i> <a href="#">Services</a>
</li>
<li>
<i class="bx bx-chevron-right"></i>
<a href="#">Terms of service</a>
</li>
<li>
<i class="bx bx-chevron-right"></i>
<a href="#">Privacy policy</a>
</li>
</ul> </ul>
</div> </div>
<div class="col-lg-3 col-md-6 footer-links"> <div class="col-lg-3 col-md-6 footer-links">
<h4>Our Services</h4> <h4>Our Services</h4>
<ul> <ul>
<li><i class="bx bx-chevron-right"></i> <a href="#">Web Design</a></li> <li>
<li><i class="bx bx-chevron-right"></i> <a href="#">Web Development</a></li> <i class="bx bx-chevron-right"></i> <a href="#">Content Analyzing</a>
<li><i class="bx bx-chevron-right"></i> <a href="#">Product Management</a></li> </li>
<li><i class="bx bx-chevron-right"></i> <a href="#">Marketing</a></li> <li>
<li><i class="bx bx-chevron-right"></i> <a href="#">Graphic Design</a></li> <i class="bx bx-chevron-right"></i>
<a href="#">Facial Expressions Analyzing</a>
</li>
<li>
<i class="bx bx-chevron-right"></i>
<a href="#">Grammer Checking</a>
</li>
<li>
<i class="bx bx-chevron-right"></i> <a href="#">Filler Words Tracking</a>
</li>
<li>
<i class="bx bx-chevron-right"></i>
<a href="#">Customized Report</a>
</li>
</ul> </ul>
</div> </div>
<div class="col-lg-4 col-md-6 footer-newsletter"> <div class="col-lg-4 col-md-6 footer-newsletter">
<h4>Join Our Newsletter</h4> <h4>Join Our Community</h4>
<p>Tamen quem nulla quae legam multos aute sint culpa legam noster magna</p>
<form action="" method="post"> <form action="" method="post">
<input type="email" name="email"><input type="submit" value="Subscribe"> <input type="email" name="email" /><input type="submit" value="Subscribe" />
</form> </form>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="container d-md-flex py-4"> <div class="container d-md-flex py-4">
<div class="me-md-auto text-center text-md-start"> <div class="me-md-auto text-center text-md-start">
<div class="copyright"> <div class="copyright">
&copy; Copyright <strong><span>OnePage</span></strong>. All Rights Reserved &copy; Copyright <strong><span>SPEECH MASTER</span></strong>. All Rights Reserved
</div> </div>
<div class="credits"> <div class="credits">
Designed by <a href="https://bootstrapmade.com/">BootstrapMade</a> Designed by <a href="https://www.sliit.lk/">SLIIT 2017 Batch</a>
</div> </div>
</div> </div>
<div class="social-links text-center text-md-right pt-3 pt-md-0"> <div class="social-links text-center text-md-right pt-3 pt-md-0">
...@@ -214,7 +214,8 @@ ...@@ -214,7 +214,8 @@
<a href="#" class="linkedin"><i class="bx bxl-linkedin"></i></a> <a href="#" class="linkedin"><i class="bx bxl-linkedin"></i></a>
</div> </div>
</div> </div>
</footer><!-- End Footer --> </footer>
<!-- End Footer -->
<div id="preloader"></div> <div id="preloader"></div>
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i
......
This diff is collapsed.
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i"
rel="stylesheet" /> rel="stylesheet" />
<!-- Vendor CSS Files --> <!--CSS Files -->
<link href="assets/vendor/aos/aos.css" rel="stylesheet" /> <link href="assets/vendor/aos/aos.css" rel="stylesheet" />
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" /> <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet" /> <link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet" />
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet" /> <link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet" />
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet" /> <link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet" />
<!-- Template Main CSS File --> <!--Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet" /> <link href="assets/css/style.css" rel="stylesheet" />
<script src="js/angular/angular.js"></script> <script src="js/angular/angular.js"></script>
...@@ -48,16 +48,11 @@ background-size: 100% 100vh; ...@@ -48,16 +48,11 @@ background-size: 100% 100vh;
<a href="index.html"><b>SPEECH MASTER</b></a> <a href="index.html"><b>SPEECH MASTER</b></a>
</h1> </h1>
<nav id="navbar" class="navbar"> <nav id="navbar" class="navbar">
<ul> <ul>
<li><a class="nav-link scrollto active" href="#hero">Home</a></li> <li><a class="nav-link scrollto active" href="#hero">Home</a></li>
<li><a class="nav-link scrollto" href="#about">About</a></li> <li><a class="nav-link scrollto" href="#about">About</a></li>
<li><a class="nav-link scrollto" href="#services">Services</a></li> <li><a class="nav-link scrollto" href="#services">Services</a></li>
<!-- <li>
<a class="nav-link scrollto o" href="#portfolio">Portfolio</a>
</li>
<li><a class="nav-link scrollto" href="#team">Team</a></li> -->
<li><a class="nav-link scrollto" href="#pricing">Pricing</a></li> <li><a class="nav-link scrollto" href="#pricing">Pricing</a></li>
<li><a class="nav-link scrollto" href="#contact">Contact</a></li> <li><a class="nav-link scrollto" href="#contact">Contact</a></li>
<li> <li>
...@@ -71,7 +66,7 @@ background-size: 100% 100vh; ...@@ -71,7 +66,7 @@ background-size: 100% 100vh;
</header> </header>
<!-- End Header --> <!-- End Header -->
<!-- ======= Hero Section ======= --> <!-- ======= Home Section ======= -->
<section id="hero" class="d-flex align-items-center"> <section id="hero" class="d-flex align-items-center">
<div class="container position-relative" data-aos="fade-up" data-aos-delay="100"> <div class="container position-relative" data-aos="fade-up" data-aos-delay="100">
<div class="row justify-content-center"> <div class="row justify-content-center">
...@@ -131,7 +126,7 @@ background-size: 100% 100vh; ...@@ -131,7 +126,7 @@ background-size: 100% 100vh;
</div> </div>
</div> </div>
</section> </section>
<!-- End Hero --> <!-- End home section -->
<main id="main"> <main id="main">
<!-- ======= About Section ======= --> <!-- ======= About Section ======= -->
...@@ -275,7 +270,7 @@ background-size: 100% 100vh; ...@@ -275,7 +270,7 @@ background-size: 100% 100vh;
</section> </section>
<!-- End About Video Section --> <!-- End About Video Section -->
<!-- ======= Testimonials Section ======= --> <!-- ======= quotes Section ======= -->
<section id="testimonials" class="testimonials"> <section id="testimonials" class="testimonials">
<div class="container" data-aos="fade-up"> <div class="container" data-aos="fade-up">
<div class="section-title"> <div class="section-title">
...@@ -300,7 +295,7 @@ background-size: 100% 100vh; ...@@ -300,7 +295,7 @@ background-size: 100% 100vh;
</div> </div>
</div> </div>
<!-- End testimonial item --> <!-- End quote item -->
<div class="swiper-slide"> <div class="swiper-slide">
<div class="testimonial-item"> <div class="testimonial-item">
...@@ -316,7 +311,7 @@ background-size: 100% 100vh; ...@@ -316,7 +311,7 @@ background-size: 100% 100vh;
</div> </div>
</div> </div>
<!-- end testimonial item --> <!-- end quote item -->
<div class="swiper-slide"> <div class="swiper-slide">
<div class="testimonial-item"> <div class="testimonial-item">
...@@ -333,7 +328,7 @@ background-size: 100% 100vh; ...@@ -333,7 +328,7 @@ background-size: 100% 100vh;
<h3>Alexander Gregg</h3> <h3>Alexander Gregg</h3>
</div> </div>
</div> </div>
<!-- End testimonial item --> <!-- End quote item -->
<div class="swiper-slide"> <div class="swiper-slide">
<div class="testimonial-item"> <div class="testimonial-item">
...@@ -349,7 +344,7 @@ background-size: 100% 100vh; ...@@ -349,7 +344,7 @@ background-size: 100% 100vh;
</div> </div>
</div> </div>
<!-- End testimonial item --> <!-- End quote item -->
<div class="swiper-slide"> <div class="swiper-slide">
<div class="testimonial-item"> <div class="testimonial-item">
...@@ -364,13 +359,13 @@ background-size: 100% 100vh; ...@@ -364,13 +359,13 @@ background-size: 100% 100vh;
<h3> Jim Rohn</h3> <h3> Jim Rohn</h3>
</div> </div>
</div> </div>
<!-- End testimonial item --> <!-- End quote item -->
</div> </div>
<div class="swiper-pagination"></div> <div class="swiper-pagination"></div>
</div> </div>
</div> </div>
</section> </section>
<!-- End Testimonials Section --> <!-- End quotes Section -->
<!-- ======= Services Section ======= --> <!-- ======= Services Section ======= -->
<section id="services" class="services section-bg"> <section id="services" class="services section-bg">
...@@ -642,7 +637,7 @@ background-size: 100% 100vh; ...@@ -642,7 +637,7 @@ background-size: 100% 100vh;
<div> <div>
<iframe style="border: 0; width: 100%; height: 270px" <iframe style="border: 0; width: 100%; height: 270px"
src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d12097.433213460943!2d-74.0062269!3d40.7101282!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0xb89d1fe6bc499443!2sDowntown+Conference+Center!5e0!3m2!1smk!2sbg!4v1539943755621" src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3960.798467112134!2d79.97075581367277!3d6.914682820413049!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3ae256db1a6771c5%3A0x2c63e344ab9a7536!2sSri%20Lanka%20Institute%20of%20Information%20Technology!5e0!3m2!1sen!2slk!4v1637600752063!5m2!1sen!2slk"
frameborder="0" allowfullscreen></iframe> frameborder="0" allowfullscreen></iframe>
</div> </div>
...@@ -652,7 +647,7 @@ background-size: 100% 100vh; ...@@ -652,7 +647,7 @@ background-size: 100% 100vh;
<div class="address"> <div class="address">
<i class="bi bi-geo-alt"></i> <i class="bi bi-geo-alt"></i>
<h4>Location:</h4> <h4>Location:</h4>
<p>No 2021/A, Forest drive, Malambe</p> <p>SLIIT Malabe Campus, New Kandy Rd, Malabe</p>
</div> </div>
<div class="email"> <div class="email">
...@@ -771,7 +766,7 @@ background-size: 100% 100vh; ...@@ -771,7 +766,7 @@ background-size: 100% 100vh;
</div> </div>
<div class="col-lg-4 col-md-6 footer-newsletter"> <div class="col-lg-4 col-md-6 footer-newsletter">
<h4>Join Our Newsletter</h4> <h4>Join Our Community</h4>
<form action="" method="post"> <form action="" method="post">
<input type="email" name="email" /><input type="submit" value="Subscribe" /> <input type="email" name="email" /><input type="submit" value="Subscribe" />
</form> </form>
...@@ -786,10 +781,6 @@ background-size: 100% 100vh; ...@@ -786,10 +781,6 @@ background-size: 100% 100vh;
&copy; Copyright <strong><span>SPEECH MASTER</span></strong>. All Rights Reserved &copy; Copyright <strong><span>SPEECH MASTER</span></strong>. All Rights Reserved
</div> </div>
<div class="credits"> <div class="credits">
<!-- All the links in the footer should remain intact. -->
<!-- You can delete the links only if you purchased the pro version. -->
<!-- Licensing information: https://bootstrapmade.com/license/ -->
<!-- Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/onepage-multipurpose-bootstrap-template/ -->
Designed by <a href="https://www.sliit.lk/">SLIIT 2017 Batch</a> Designed by <a href="https://www.sliit.lk/">SLIIT 2017 Batch</a>
</div> </div>
</div> </div>
......
This diff is collapsed.
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