Commit 171c1a65 authored by Chalika Mihiran's avatar Chalika Mihiran

changes done

parent 7d1c4d81
......@@ -35,7 +35,7 @@ firebase.initializeApp(firebaseConfig);
var password = document.getElementById("password");
const promise = auth.signInWithEmailAndPassword(email.value,password.value);
promise.catch(e=>alert(e.message));
alert("SignUp In Successfully");
// alert("SignUp In Successfully");
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
'I would like to conclude': 'summary',
'According to an analysis': 'summary',
'conclude by saying': 'summary',
'final note': 'summary',
'I close by saying': 'summary',
'i should like to conclude by saying': 'summary',
'I should like to finish by saying': 'summary',
'I shall conclude by saying': 'summary',
'I want to conclude by saying': 'summary',
'I will close by saying': 'summary',
'i will conclude': 'summary',
'i will conclude by saying': 'summary',
'i will end by saying': 'summary',
'i will finish by saying': 'summary',
'i would end by saying': 'summary',
'i would like to conclude by stating': 'summary',
'i would like to end by saying': 'summary',
'in closing': 'summary',
'in conclusion': 'summary',
'let me close by saying': 'summary',
'let me conclude by saying': 'summary',
'let me finish by saying': 'summary',
'may i conclude by saying': 'summary',
'i would like briefly': 'summary',
'i would like to refer briefly': 'summary',
'i would like to return briefly': 'summary',
'let me briefly present': 'summary',
'let me briefly say': 'summary',
'let me briefly touch': 'summary',
'let me comment briefly': 'summary',
'let me quickly': 'summary',
'let me turn briefly': 'summary',
'allow me to say a few': 'summary',
'allow me to touch briefly': 'summary',
'i shall refer briefly': 'summary',
'i should like to refer briefly': 'summary',
'i want to say a couple': 'summary',
'i want to say a few': 'summary',
'i will briefly mention': 'summary',
'i will briefly summarize': 'summary',
'i will comment briefly': 'summary',
'i will refer briefly': 'summary',
'i will touch briefly': 'summary',
'i wish to say a few': 'summary',
'i would like to say a few': 'summary',
'i would like to say a word': 'summary',
'i would like to speak briefly': 'summary',
'let me briefly turn': 'summary',
'let me say a few': 'summary',
'let me touch briefly': 'summary',
'Let me briefly': 'summary',
'tell you a little story': 'story',
'told a story': 'story',
'let me tell you a story': 'story',
'thanks': 'thanking',
'ta muchly': 'thanking',
'thanks a bunch': 'thanking',
'thank you very much': 'thanking',
'many thanks': 'thanking',
'i thank you': 'thanking',
'thanks a million': 'thanking',
'it is hard to find words to express my gratitude': 'thanking',
'merci': 'thanking',
'with gratitude': 'thanking',
'i thank you from the bottom of my heart': 'thanking',
'accept my endless gratitude': 'thanking',
'thank you so much': 'thanking',
'i am all gratitude': 'thanking',
'i am grateful': 'thanking',
'i will never forget what you have done': 'thanking',
'thank you kindly': 'thanking',
'cheers': 'thanking',
'i appreciate that': 'thanking',
'respectfully yours with sincere gratitude': 'thanking',
'accord a thank': 'thanking',
'gracias': 'thanking',
'i thank you most warmly': 'thanking',
'i wish to thank everyone who pitched in': 'thanking',
'give thanks': 'thanking',
'much thanks': 'thanking',
'show appreciation': 'thanking',
'thanks very much': 'thanking',
'with kindest personal regards': 'thanking',
'appreciate it': 'thanking',
'thank you for helping me': 'thanking',
'you are a lifesaver': 'thanking',
'you have my gratitude': 'thanking',
'your generosity overwhelms me': 'thanking',
'i humbly thank you': 'thanking',
'it was so awesome of you': 'thanking',
'thanks so much': 'thanking',
'by all means': 'thanking',
'i wanted to thank you as soon as possible': 'thanking',
'i wanted to thank you as soon as possible': 'thanking',
'nice one': 'thanking',
'of course': 'thanking',
'what would i do without you': 'thanking',
'i will forever be beholden to you': 'thanking',
'i will forever be beholden to you': 'thanking',
'much appreciated': 'thanking',
'my gratitude to you for all you have done': 'thanking',
'thank you for never letting me down': 'thanking',
'thanks for everything': 'thanking',
'please accept my best thanks': 'thanking',
'bless you': 'thanking',
'delighted': 'thanking',
'how can i show you how grateful i am': 'thanking',
'i appreciate your time': 'thanking',
'thanks for taking the time to think of me': 'thanking',
'accept my deepest thanks': 'thanking',
'certainly': 'thanking',
'charmed': 'thanking',
'consider yourself heartily thanked': 'thanking',
'excellent': 'thanking',
'how can i ever possibly thank you': 'thanking',
'i cannot express my appreciation': 'thanking',
'splendid': 'thanking',
'thanks a ton': 'thanking',
'you are the best': 'thanking',
'all i can say is thanks': 'thanking',
'all my love and thanks to you': 'thanking',
'appreciate your feedback': 'thanking',
'appreciate your help': 'thanking',
'appreciate your input': 'thanking',
'blessings': 'thanking',
'expressing thanks': 'thanking',
'how can i repay you': 'thanking',
'i cannot thank you enough': 'thanking',
'i owe you one': 'thanking',
'i really appreciate it': 'thanking',
'i really appreciate that': 'thanking',
'i'm really grateful': 'thanking',
'if anyone deserves thanks it is you': 'thanking',
'sincerely': 'thanking',
'thank you for your thoughtfulness': 'thanking',
'thanks for your consideration': 'thanking',
'thanks heaps': 'thanking',
'that's so kind of you': 'thanking',
'warmest greetings to all': 'thanking',
'warmly': 'thanking',
'with appreciation': 'thanking',
'with sincere appreciation': 'thanking',
'with sincere thanks': 'thanking',
'don't know what to say': 'thanking',
'words are powerless to express my gratitude': 'thanking',
'words cannot describe how thankful i am': 'thanking',
'can't describe how thankful i am': 'thanking',
'don't know what to say': 'thanking',
'how thoughtful of you': 'thanking',
'i can't thank you enough': 'thanking',
'i owe you big time': 'thanking',
'i really appreciate': 'thanking',
'i really appreciate your help': 'thanking',
'i would like to thank you': 'thanking',
'i'll forever be grateful': 'thanking',
'i'm grateful for your assistance': 'thanking',
'i'm really grateful for your help': 'thanking',
'i'm really grateful for your help': 'thanking',
'i'm so grateful': 'thanking',
'if anyone deserve thanks it's you': 'thanking',
'it would be greatly appreciated': 'thanking',
'it's very kind of you': 'thanking',
'mercy bucket': 'thanking',
'mercy buckets': 'thanking',
'million thanks to you': 'thanking',
'my gratitude knows no bounds': 'thanking',
'oh you shouldn't have': 'thanking',
'please accept my deepest thanks': 'thanking',
'thank you for everything': 'thanking',
'thank you for your assistance': 'thanking',
'thanks a heap': 'thanking',
'thanks for that': 'thanking',
'you made my day': 'thanking',
'you saved my day': 'thanking',
'you're a dear': 'thanking',
'you're a life saver': 'thanking',
'you're awesome': 'thanking',
'you're great': 'thanking',
'you've saved my life': 'thanking',
'by dint': 'thanking',
'i thank you in advance': 'thanking',
'i want to thank': 'thanking',
'i wanted to thank': 'thanking',
'i would like to thank': 'thanking',
'letter of thanks': 'thanking',
'say thank': 'thanking',
'thanks ever so much': 'thanking',
'thanks just the same': 'thanking',
'very grateful': 'thanking',
'word of thanks': 'thanking',
\ No newline at end of file
'i am honored': 'summary',
'it is an honour': 'summary',
'feel honoured': 'summary',
'great honor': 'summary',
'great honour': 'summary',
'honor me': 'summary',
'honors me': 'summary',
'i am deeply honoured': 'summary',
'i am flattered': 'summary',
'i am humbled': 'summary',
'i am pleased': 'summary',
'i am privileged': 'summary',
'i am very honoured': 'summary',
'i have had the honour': 'summary',
'i have had the privilege': 'summary',
'i now have the honour': 'summary',
'it has been an honor': 'summary',
'it is a great honor': 'summary',
'it is a privilege': 'summary',
'it is indeed an honour': 'summary',
'it was an honour': 'summary',
'it would be an honor': 'summary',
'so honored': 'summary',
'such an honor': 'summary',
'we are honoured': 'summary',
'what a pleasure': 'summary',
'what an honor': 'summary',
'what honor': 'summary',
'what honour': 'summary',
'you honor': 'summary',
'you honor me': 'summary',
'you honour me': 'summary',
'once upon a time': 'summary',
'long ago': 'summary',
'once': 'summary',
'formerly': 'summary',
'in the past': 'summary',
'at one time': 'summary',
'long time ago': 'summary',
'away back': 'summary',
'in former times': 'summary',
'in times gone by': 'summary',
'many years ago': 'summary',
'very long time ago': 'summary',
'in times past': 'summary',
'back in the day': 'summary',
'in the olden days': 'summary',
'some time ago': 'summary',
'many moons ago': 'summary',
'ages ago': 'summary',
'in days gone by': 'summary',
'in earlier times': 'summary',
'in olden times': 'summary',
'good while ago': 'summary',
'in days of old': 'summary',
'in days of yore': 'summary',
'one time previously': 'summary',
'at an earlier time': 'summary',
'back in the old days': 'summary',
'in bygone days': 'summary',
'way back in the past': 'summary',
'down memory lane': 'summary',
'in the good old days': 'summary',
'in years gone by': 'summary',
'long time before': 'summary',
'long while ago': 'summary',
'much further back': 'summary',
'one of these days': 'summary',
'there once was': 'summary',
'there was a time': 'summary',
'there was a time when': 'summary',
'there was once': 'summary',
'time was when': 'summary',
'well before': 'summary',
'ahead of time': 'summary',
'all those years ago': 'summary',
'as long ago': 'summary',
'at the past': 'summary',
'awhile ago': 'summary',
'awhile back': 'summary',
'been a very long time': 'summary',
'donkey's years ago': 'summary',
'during the past few': 'summary',
'during the previous': 'summary',
'earlier on': 'summary',
'far earlier': 'summary',
'far sooner': 'summary',
'have for a long time been': 'summary',
'in an era': 'summary',
'in ancient times': 'summary',
'in days past': 'summary',
......@@ -2,23 +2,22 @@ import spacy
from scipy.io.wavfile import read
scoreForClearness = 50/100
#Identify ocer complex words
nlp = spacy.load("en_core_web_sm")
def clearnerssWords(text):
doc = nlp(text)
returnVal = ""
for token in doc:
count = len(token)
if count > 12:
# print(f"{token.text} - {count} letters: This is a too complicated word. It is better to use more simpler word.")
returnVal += f"{token.text} - {count} letters: This is a too complicated word. It is better to use more simpler word."
return {
"message": returnVal,
"score": scoreForClearness
}
#Identify over complex sentences
def clearnerssSentence(text):
doc = nlp(text)
returnVal = ""
......@@ -37,10 +36,7 @@ def clearnerssSentence(text):
"score": scoreForClearness
}
print(clearnerssWords("Apple is looking at buying U.K. startup for $1 billion accumulativeness. This ia a dog. name is Chalika Mihiran"))
print(clearnerssSentence("Apple is looking at buying U.K. startup for $1 billion accumulativeness. This ia a dog. name is Chalika Mihiran"))
#Calculate the rate of the speed
def clearnessReadAudioFile(filePath):
# Read the Audiofile
samplerate, data = read(filePath)
......
......@@ -5,19 +5,11 @@ scoreForConclusion = 60/100
nlp = spacy.load("en_core_web_sm")
speech = """According to a research Global warming is an international phenomenon where the earth’s mean surface temperature is increasing rapidly due to the accumulation of greenhouse gases in the atmosphere. The source of these greenhouse gases is various, both natural and manmade, such as forest fires, industrialisation, burning of agricultural crops, burning of fossil fuels etc. Global warming has proved to be a huge force created by man that can have the potential to destroy the natural cycle of our planet.
Global warming is not a recent phenomenon but it has surely improved and increased because of rapid industrialisation, population explosion, agricultural explosion and the ever-increasing greed for economic growth for countries at the cos of of exploiting our environment. Global warming did exist hundreds of years before when civilizations begin to occur. There are examples of burning fossil fuels and causing pollution even during early civilizations like the Indus valley civilisation or Harappan civilization, but the magnitude of global warming today is thousand times more than what it was a few centuries back.
Some of the main greenhouse gases that are causing global warming are carbon dioxide, methane, nitrous oxide, sulphur hexafluoride, hydrofluorocarbons and perfluorocarbons. Most of the greenhouse gases are produced due to the consumption of fossil fuels.
The effects of global warming are plenty and one of the most catastrophic effects of global warming is the deterioration of the ozone layer. Due to the accumulation of chlorofluorocarbons in the stratosphere, scientists have predicted that an area above the continent of Antarctica has a huge ozone hole. The ozone layer is a layer in the atmosphere which protects the Earth’s surface from the harmful ultraviolet radiations coming from the sun. When this ozone layer gets depleted, the living beings on the planet earth is easily exposed to UV rays. This can cause catastrophic effects on human health, agricultural cycle, climatic cycle and on the very existence of our planet.
Let me mention a few of the impacts of global warming that we are already seeing in the year 2020. It is due to global warming that there is a rise in sea levels which is causing flooding off patches of lands, the low lying setters and islands countries of Indonesia and Japan. Global warming is causing changes in the rainfall patterns. When the change in rainfall patterns and climatic changes occurs abruptly, it becomes difficult for the Meteorological Departments to predict natural calamities and this increases the damage caused to life and property.
Draughts, forest fires floods and earthquakes are some of the indications for changing in climatic patterns caused due to global warming. Melting of glaciers and polar ice caps has caused almost extinction of habitat near the north pole and the south pole. The polar bears, which are considered to be greatly endangered species, are decreasing in their population by the day because of the melting of glaciers. Melting of glaciers can also lead to an increase in floods and famine in the nearby regions.
Certain diseases like Malaria are caused due to global warming since there is the migration of species from one place to another. Many scientists also predict that the COVID-19 pandemic that we are witnessing in the year 2020 can also be traced back to the impact of global warming when seen from the bird’s point of you
I would like to conclude my global warming speech by saying that the international community, where does they governments and citizens has to come forward to reduce your carbon footprint to save the planet for our future generation. All of us living here are the stakeholders of nature and we are responsible for how we take care of our environment. As the saying goes, charity begins at home, we have to start using biodegradable materials at our houses, reduce plastic waste and other such changes in our lifestyle so that we can make an impact to reduce global warming globally."""
#Count the total number of characters in the speech
def conclisions(speech):
totalCharacterCount = len(speech)
#Extract the conclusion of the speech
conclusionCharacterCount = (85/100)*totalCharacterCount
conclusion = (speech[int(conclusionCharacterCount):int(totalCharacterCount)])
# print(">>>Conclusion<<<")
......@@ -27,46 +19,29 @@ def conclisions(speech):
"score": scoreForConclusion
}
#....Analyze the introduction.....
#identify best uses for introduction
def comments(speech):
conclusion = conclisions(speech)["message"]
final_words = []
endingPhrases = ["I would like to conclude", "conclude by saying", "final note", "I close by saying",
"According to an analysis", "I shall conclude by saying", "i should like to conclude by saying",
"I should like to finish by saying", "I want to conclude by saying", "I will close by saying",
"i will conclude", "i will conclude by saying", "i will end by saying", "i will finish by saying",
"i would end by saying", "i would like to conclude", "i would end by saying",
"i would like to conclude by stating", "i would like to end by saying", "in closing",
"in conclusion", "let me close by saying", "let me conclude by saying", "let me finish by saying",
"may i conclude by saying"
, "i would like briefly", "i would like to briefly", "i would like to refer briefly",
"i would like to return briefly", "let me briefly present", "let me briefly say",
"let me briefly touch", "let me comment briefly", "let me quickly", "let me turn briefly",
"allow me to say a few", "allow me to touch briefly", "i shall refer briefly",
"i should like to refer briefly", "i should like to refer briefly", "i want to say a couple",
"i want to say a few", "i will briefly mention", "i will briefly summarize",
"i will comment briefly", "i will refer briefly", "i will touch briefly", "i wish to say a few",
"i would like to say a few", "i would like to say a word", "i would like to speak briefly",
"let me briefly turn", "let me say a few", "let me touch briefly", "Let me briefly"]
for wordPharse in endingPhrases:
if wordPharse in conclusion:
final_words.append(wordPharse)
# print(">>>Comments<<<")
# print("You used some ending phrases in your conclusion. It is a good practice to use ending phrases in your introduction")
# print(final_words)
with open('content analyzing/bestPracticesForConclusion.txt', 'r') as file:
for line in file:
clear_line = line.replace("\n", '').replace(",", '').replace("'", '').strip()
word, emotion = clear_line.split(':')
if word in conclusion:
final_words.append(word)
return {
"message": final_words,
"score": scoreForConclusion
}
#Identify questions that user used in introduction
def questions(speech):
retVal = []
doc = nlp(conclisions(speech)["message"])
#Declare the patterns of questions
patterns = [[{"POS": "ADV"}, {"POS": "AUX"}, {"POS": "PRON"}], [{"POS": "ADV"}, {"POS": "AUX"}, {"POS": "NOUN"}]]
verb_phrases = textacy.extract.token_matches(doc, patterns)
......
......@@ -2,25 +2,12 @@ import spacy
import textacy
scoreForIntroduction = 40/100
#Identify words that are in a introduction
nlp = spacy.load("en_core_web_sm")
speech = """According to a research Global warming is an where does he international phenomenon where the earth’s mean surface temperature is increasing rapidly due to the accumulation of greenhouse gases in the atmosphere. where does they The source of these greenhouse gases is various, both natural and manmade, such as forest fires, industrialisation, burning of agricultural crops, burning of fossil fuels etc. Global warming has proved to be a huge force created by man that can have the potential to destroy the natural cycle of our planet.
Global warming is not a recent phenomenon but it has surely improved and increased because of rapid industrialisation, population explosion, agricultural explosion and the ever-increasing greed for economic growth for countries at the cos of of exploiting our environment. Global warming did exist hundreds of years before when civilizations begin to occur. There are examples of burning fossil fuels and causing pollution even during early civilizations like the Indus valley civilisation or Harappan civilization, but the magnitude of global warming today is thousand times more than what it was a few centuries back.
Some of the main greenhouse gases that are causing global warming are carbon dioxide, methane, nitrous oxide, sulphur hexafluoride, hydrofluorocarbons and perfluorocarbons. Most of the greenhouse gases are produced due to the consumption of fossil fuels.
The effects of global warming are plenty and one of the most catastrophic effects of global warming is the deterioration of the ozone layer. Due to the accumulation of chlorofluorocarbons in the stratosphere, scientists have predicted that an area above the continent of Antarctica has a huge ozone hole. The ozone layer is a layer in the atmosphere which protects the Earth’s surface from the harmful ultraviolet radiations coming from the sun. When this ozone layer gets depleted, the living beings on the planet earth is easily exposed to UV rays. This can cause catastrophic effects on human health, agricultural cycle, climatic cycle and on the very existence of our planet.
Let me mention a few of the impacts of global warming that we are already seeing in the year 2020. It is due to global warming that there is a rise in sea levels which is causing flooding off patches of lands, the low lying setters and islands countries of Indonesia and Japan. Global warming is causing changes in the rainfall patterns. When the change in rainfall patterns and climatic changes occurs abruptly, it becomes difficult for the Meteorological Departments to predict natural calamities and this increases the damage caused to life and property.
Draughts, forest fires floods and earthquakes are some of the indications for changing in climatic patterns caused due to global warming. Melting of glaciers and polar ice caps has caused almost extinction of habitat near the north pole and the south pole. The polar bears, which are considered to be greatly endangered species, are decreasing in their population by the day because of the melting of glaciers. Melting of glaciers can also lead to an increase in floods and famine in the nearby regions.
Certain diseases like Malaria are caused due to global warming since there is the migration of species from one place to another. Many scientists also predict that the COVID-19 pandemic that we are witnessing in the year 2020 can also be traced back to the impact of global warming when seen from the bird’s point of you
I would like to conclude my global warming speech by saying that the international community, governments and citizens has to come forward to reduce your carbon footprint to save the planet for our future generation. where does they All of us living here are the stakeholders of nature and we are responsible for how we take care of our environment. As the saying goes, charity begins at home, we have to start using biodegradable materials at our houses, reduce plastic waste and other such changes in our lifestyle so that we can make an impact to reduce global warming globally."""
#Count the total number of characters in the speech
def introductionFunc(speech):
totalCharacterCount = len(speech)
#Extract the introduction of the speech
introductionCharacterCount = (15 / 100) * totalCharacterCount
introduction = (speech[0:int(introductionCharacterCount)])
# print(">>>Introduction<<<")
......@@ -30,26 +17,25 @@ def introductionFunc(speech):
"score": scoreForIntroduction
}
#....Analyze the introduction.....
#identify best uses for introduction
def introductionBestUsesFunc(speech):
introduction = nlp(introductionFunc(speech)["message"])
final_words = []
referStudies = ["According to a study", "According to a research","According to a review","According to a survey","According to an analysis","according to one study","According to research","According to an investigation","According to research conducted","According to the study"
,"according to the survey","according to this study","after an investigation","for a study","in a studio","in a survey","in one study","results of a study","study finds","study says","survey conducted","survey found"]
for wordPharse in referStudies:
if wordPharse in introductionFunc(speech):
final_words.append(wordPharse)
print(">>>Comments<<<")
print(f"You refer some other's works in your introduction. It is a good practice to refer some one's work in your introduction")
print(final_words)
with open('content analyzing/bestPracticesForIntroduction.txt', 'r') as file:
for line in file:
clear_line = line.replace("\n", '').replace(",", '').replace("'", '').strip()
word, emotion = clear_line.split(':')
if word in introduction:
final_words.append(word)
return {
"message": final_words,
"score": scoreForIntroduction
}
#Identify questions that user used in introduction
def introductionQuestions(speech):
doc = nlp(introductionFunc(speech)["message"])
......
......@@ -11,8 +11,6 @@ def keywordExrtraction(topic, speech):
punctuation = string.punctuation + '\n'
# This is a loop for count words apart from stop words and frequencies.
word_frequencies = {}
for word in Content:
if word.text.lower() not in stopwords:
......@@ -22,8 +20,6 @@ def keywordExrtraction(topic, speech):
else:
word_frequencies[word.text] += 1
# print(word_frequencies)
topicWords = []
for words in Topic:
......@@ -44,4 +40,3 @@ def keywordExrtraction(topic, speech):
"score": 50/100
}
# keywordExrtraction("dog", "The dog is a pet animal. A dog has sharp teeth so that it can eat flesh very easily, it has four legs, two ears, two eyes, a tail, a mouth, and a nose. It is a very clever animal and is very useful in catching thieves. It runs very fast, barks loudly and attacks the strangers. A dog saves the life of the master from danger. One can find dogs everywhere in the world. Dogs are a very faithful animal. It has a sharp mind and a strong sense of hearing smelling the things. It also has many qualities like swimming in the water, jumping from anywhere, good smelling sense.")
......@@ -7,6 +7,7 @@ nlp = spacy.load("en_core_web_sm")
stopwords = list(STOP_WORDS)
punctuation = punctuation + '\n'
def synonymsFunc(topic, speech):
Topic = nlp(topic)
Content = nlp(speech)
......
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