Commit 063e48c9 authored by Chalika Mihiran's avatar Chalika Mihiran

Delete DoubleWords.py

parent f129fed2
import spacy
# In here we are importing stop words from spacy. there are already spefied stop words there in the spacy
from spacy.lang.en.stop_words import STOP_WORDS
from string import punctuation
from heapq import nlargest
# text = """
# Surprisingly Abraham really did nothing nothing important in his life.
# He was not not a great writer, king, inventor or military leader.
# Josh was always that boy with the same haircut and a small little smile-the the one that says he is pleased with himself.
# He did nothing except camp out out where he was told to to go and father a few children.
# """
text = open('wordslist.txt', encoding='utf-8').read()
stopwords = list(STOP_WORDS)
# print(stopwords)
nlp = spacy.load('en_core_web_sm')
doc = nlp(text)
# Tokenization
tokens = [token.text for token in doc]
print("***** Analyze Repeted Words in you're Speech *****");
for i in range(len(tokens)):
if tokens[i] == tokens[i + 1]:
print(f" You stuck in this word :{tokens[i]}");
ScoreforRepetedwords = 70/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