Commit f02fd143 authored by Kavindu Jayawardana 's avatar Kavindu Jayawardana

Delete unnescry

parent fb7195db
**Main objective**
Build the best modern solution for practice English Public Speaking in a proper way.
**Main Research questions**
What is the best modern solution for practice English Public Speaking in a proper way?
** Individual research questions**
* How to analyze content of the speech and give proper feedback for the speaker?
* How to check grammar and richness of grammar use and give proper feedback for the speaker?
* How to check the user’s facial expressions according to the speech content and give proper feedback for the speaker?
* How to check the user’s eye contact continuity throughout the speech and give proper feedback for the speaker?
* How to check identify the user’s pause fillers, filler words, interjections, exclamations, etc
**Individual Objectives**
* Analyze content of the speech and give proper feedback for the speaker.
* Check grammar and richness of grammar use and give proper feedback for the speaker
* Check the user’s facial expressions according to the speech content and give proper feedback for the speaker.
* Check the user’s eye contact continuity throughout the speech and give proper feedback for the speaker
* Check identify the user’s pause fillers, filler words, interjections, exclamations, etc.
import spacy
from gingerit.gingerit import GingerIt
nlp = spacy.load("en_core_web_sm")
text1 = ("We needed to play Cricket, but we was unable to buy ball, then we came back to hostel and start study")
parser = GingerIt()
result = parser.parse(text1)
print(result)
scoreForGrammerAccracy = 70/100
text = ("I'll be there in time, but I also have to do my homhomework too,although I should finish them,so I may be late. And one more thing, can I use your car ?. Anyway after today I also need to work hard because my exam is in the next month.")
doc = nlp(text)
Mcount = 0
for token in doc:
(token.text, token.dep_, token.head.text, token.head.pos_,
[child for child in token.children])
if token.dep_ == 'mark':
Mcount = Mcount + 1
#print(f"\n tagged as mark {Mcount}\n\n\n\n")
for sent in doc.sents:
word_count = 0
(sent.text)
print(f"\n >>>> SENTECNSENTENCE : {(sent.text)}.\n")
for words in sent:
# print(words.text)
word_count = word_count + 1
# print(word_count)
if word_count < 20:
print(f"\n**** GOOD SENTECNSENTENCE **** This sentence contains efficient number of words\n")
if word_count >= 20:
print(f"\n**** LENGTHY SENTECNSENTENCE **** This sentence contains {word_count} WORDS.\n")
nlp = spacy.load("en_core_web_sm")
if word_count >= 20:
transitionWordCount = 0
for token in doc:
if token.text == "also" or token.text == "although" or token.text == "so" or token.text == "however" or token.text == "then" or token.text == "because":
transitionWordCount = transitionWordCount + 1
a = token.text
print(f"\n** {a.upper()}")
if word_count >= 20 and Mcount >= 1 :
print(f"\n**** This sentence contained above {transitionWordCount} TRANSITION words in it, and {Mcount} CONJUNCTION words \n")
print("## Sentence is too long! You shoud not use more than 20 words in a single sentence!\n")
if word_count >= 20:
print(f"\n**** This sentence contained above {transitionWordCount} transition words in it.\n")
print("## Sentence is too long! You shoud not use more than 20 words in a single sentence!\n")
if transitionWordCount == 1 and word_count > 20:
print("## Try to split senetce to two sesentences from transition word!\n")
if transitionWordCount >= 2 and word_count > 20:
print("## To make your English perfect make sure you don't use two transition words in a single sentence. Try to split senetce to two sesentences from transition words or conjunction!\n\n")
scoreForLengthySentences = 80/100
\ No newline at end of file
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