update
This commit is contained in:
parent
2992f4f408
commit
4f46de8d00
3330 changed files with 394553 additions and 76939 deletions
23
.config/Code/User/History/-4c5aef8e/1dYl.py
Normal file
23
.config/Code/User/History/-4c5aef8e/1dYl.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, "")
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
16
.config/Code/User/History/-4c5aef8e/4KlH.py
Normal file
16
.config/Code/User/History/-4c5aef8e/4KlH.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, "")
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
|
||||
27
.config/Code/User/History/-4c5aef8e/9gS1.py
Normal file
27
.config/Code/User/History/-4c5aef8e/9gS1.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
text.replace(',', '')
|
||||
# for mark in punctuation_marks:
|
||||
# text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
# sentence = input('enter a sentence:\n')
|
||||
# sentence = removePunctuationMarks(sentence)
|
||||
# # sentence = removeStopWords(sentence)
|
||||
|
||||
# print('sentence with removed stuff is:\n', sentence)
|
||||
a = './,.,.'
|
||||
a = a.replace(",", '')
|
||||
print(a)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
16
.config/Code/User/History/-4c5aef8e/A1FO.py
Normal file
16
.config/Code/User/History/-4c5aef8e/A1FO.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, "")
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
|
||||
23
.config/Code/User/History/-4c5aef8e/AH04.py
Normal file
23
.config/Code/User/History/-4c5aef8e/AH04.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, "")
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
27
.config/Code/User/History/-4c5aef8e/EOqg.py
Normal file
27
.config/Code/User/History/-4c5aef8e/EOqg.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
text.replace(',', '')
|
||||
# for mark in punctuation_marks:
|
||||
# text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
# sentence = input('enter a sentence:\n')
|
||||
# sentence = removePunctuationMarks(sentence)
|
||||
# # sentence = removeStopWords(sentence)
|
||||
|
||||
# print('sentence with removed stuff is:\n', sentence)
|
||||
a = './,.,.'
|
||||
a = a.replace(',', '')
|
||||
print(a)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
1
.config/Code/User/History/-4c5aef8e/F6ZP.py
Normal file
1
.config/Code/User/History/-4c5aef8e/F6ZP.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
stop_words = ["a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with"]
|
||||
23
.config/Code/User/History/-4c5aef8e/H6BG.py
Normal file
23
.config/Code/User/History/-4c5aef8e/H6BG.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
# sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
26
.config/Code/User/History/-4c5aef8e/Habi.py
Normal file
26
.config/Code/User/History/-4c5aef8e/Habi.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, "")
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
# sentence = input('enter a sentence:\n')
|
||||
# sentence = removePunctuationMarks(sentence)
|
||||
# sentence = removeStopWords(sentence)
|
||||
|
||||
# print('sentence with removed stuff is:\n', sentence)
|
||||
a = 'test thing'
|
||||
a = a.replace('test ', '')
|
||||
print(a)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
24
.config/Code/User/History/-4c5aef8e/IdDu.py
Normal file
24
.config/Code/User/History/-4c5aef8e/IdDu.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
stop_words = (" a ", " an ", " and ", " are ", " as ", " at ", " be ", " but ", " by ", " for ", " if ", " in ", " is ", " it ", " of ", " on ", " or ", " so ", " that ", " the ", " to ", " with ", " i ")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text = text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text = text.replace(word, ' ')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = ' ' + sentence
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
24
.config/Code/User/History/-4c5aef8e/JxWl.py
Normal file
24
.config/Code/User/History/-4c5aef8e/JxWl.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, '')
|
||||
print(mark)
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
# sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
9
.config/Code/User/History/-4c5aef8e/Jxqy.py
Normal file
9
.config/Code/User/History/-4c5aef8e/Jxqy.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
|
||||
24
.config/Code/User/History/-4c5aef8e/KvAC.py
Normal file
24
.config/Code/User/History/-4c5aef8e/KvAC.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
text.replace(',', '')
|
||||
# for mark in punctuation_marks:
|
||||
# text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
# sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
23
.config/Code/User/History/-4c5aef8e/KxVl.py
Normal file
23
.config/Code/User/History/-4c5aef8e/KxVl.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
2
.config/Code/User/History/-4c5aef8e/QNvh.py
Normal file
2
.config/Code/User/History/-4c5aef8e/QNvh.py
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
stop_words = ["a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with"]
|
||||
|
||||
23
.config/Code/User/History/-4c5aef8e/R5fP.py
Normal file
23
.config/Code/User/History/-4c5aef8e/R5fP.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
# sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
23
.config/Code/User/History/-4c5aef8e/T0PN.py
Normal file
23
.config/Code/User/History/-4c5aef8e/T0PN.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text = text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text = text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
23
.config/Code/User/History/-4c5aef8e/T8l7.py
Normal file
23
.config/Code/User/History/-4c5aef8e/T8l7.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a ", "an ", "and ", "are ", "as ", "at ", "be ", "but ", "by ", "for ", "if ", "in ", "is ", "it ", "of ", "on ", "or ", "so ", "that ", "the ", "to ", "with ")
|
||||
punctuation_marks = (". ", ", ", "? ", "! ", ": ", "; ", "' ", "\" ", "'' ", "( ", ") ", "[ ", "] ", "{ ", "} ", "- ", "— ", "... ", "/ ", "\\ ", "& ", "* ", "@ ", "# ", "_ ", "~ ", "| ", "< ", "> ", "= ", "+ ")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text = text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text = text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
23
.config/Code/User/History/-4c5aef8e/TAng.py
Normal file
23
.config/Code/User/History/-4c5aef8e/TAng.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
# sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
26
.config/Code/User/History/-4c5aef8e/VyAq.py
Normal file
26
.config/Code/User/History/-4c5aef8e/VyAq.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, "")
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
# sentence = input('enter a sentence:\n')
|
||||
# sentence = removePunctuationMarks(sentence)
|
||||
# sentence = removeStopWords(sentence)
|
||||
|
||||
# print('sentence with removed stuff is:\n', sentence)
|
||||
a = 'test thing'
|
||||
a = a.replace('test', '')
|
||||
print(a)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
23
.config/Code/User/History/-4c5aef8e/WJKR.py
Normal file
23
.config/Code/User/History/-4c5aef8e/WJKR.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, "")
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
23
.config/Code/User/History/-4c5aef8e/Yn1n.py
Normal file
23
.config/Code/User/History/-4c5aef8e/Yn1n.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text = text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text = text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
23
.config/Code/User/History/-4c5aef8e/aZFe.py
Normal file
23
.config/Code/User/History/-4c5aef8e/aZFe.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = (" a ", " an ", " and ", " are ", " as ", " at ", " be ", " but ", " by ", " for ", " if ", " in ", " is ", " it ", " of ", " on ", " or ", " so ", " that ", " the ", " to ", " with ")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text = text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text = text.replace(word, ' ')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
24
.config/Code/User/History/-4c5aef8e/dxG8.py
Normal file
24
.config/Code/User/History/-4c5aef8e/dxG8.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, '')
|
||||
print(text)
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
# sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
6
.config/Code/User/History/-4c5aef8e/eKx8.py
Normal file
6
.config/Code/User/History/-4c5aef8e/eKx8.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark)
|
||||
1
.config/Code/User/History/-4c5aef8e/entries.json
Normal file
1
.config/Code/User/History/-4c5aef8e/entries.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":1,"resource":"file:///home/rafayahmad/Stuff/Coding/Python/IDS/Assg1/q3.py","entries":[{"id":"F6ZP.py","timestamp":1725343936534},{"id":"QNvh.py","timestamp":1725343951280},{"id":"v1j5.py","timestamp":1725344060202},{"id":"jmZa.py","timestamp":1725344079709},{"id":"mvAc.py","timestamp":1725344091619},{"id":"eKx8.py","timestamp":1725344169461},{"id":"Jxqy.py","timestamp":1725344196933},{"id":"seQt.py","timestamp":1725344239015},{"id":"A1FO.py","timestamp":1725344280318},{"id":"sJh4.py","timestamp":1725344304694},{"id":"4KlH.py","timestamp":1725344322304},{"id":"l9x0.py","timestamp":1725344602103},{"id":"WJKR.py","timestamp":1725344706721},{"id":"wBT5.py","timestamp":1725345238798},{"id":"AH04.py","timestamp":1725345260035},{"id":"1dYl.py","timestamp":1725345335279},{"id":"VyAq.py","timestamp":1725345454744},{"id":"Habi.py","timestamp":1725345465171},{"id":"jzzL.py","timestamp":1725345475324},{"id":"KxVl.py","timestamp":1725345499881},{"id":"dxG8.py","timestamp":1725345522155},{"id":"JxWl.py","timestamp":1725345536335},{"id":"TAng.py","timestamp":1725345579032},{"id":"KvAC.py","timestamp":1725345592333},{"id":"EOqg.py","timestamp":1725345636360},{"id":"9gS1.py","timestamp":1725345708161},{"id":"R5fP.py","timestamp":1725345729428},{"id":"wXQO.py","timestamp":1725345768875},{"id":"H6BG.py","timestamp":1725345788339},{"id":"mmlm.py","timestamp":1725345816553},{"id":"Yn1n.py","timestamp":1725345912914},{"id":"T0PN.py","timestamp":1725345966872},{"id":"iq2S.py","timestamp":1725346000499},{"id":"T8l7.py","timestamp":1725346051053},{"id":"iXRB.py","timestamp":1725346081444},{"id":"aZFe.py","timestamp":1725346199622},{"id":"wpYp.py","timestamp":1725346270517},{"id":"IdDu.py","timestamp":1725346291164}]}
|
||||
26
.config/Code/User/History/-4c5aef8e/iXRB.py
Normal file
26
.config/Code/User/History/-4c5aef8e/iXRB.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
stop_words = ("a ", "an ", "and ", "are ", "as ", "at ", "be ", "but ", "by ", "for ", "if ", "in ", "is ", "it ", "of ", "on ", "or ", "so ", "that ", "the ", "to ", "with ")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
|
||||
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text = text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text = text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
23
.config/Code/User/History/-4c5aef8e/iq2S.py
Normal file
23
.config/Code/User/History/-4c5aef8e/iq2S.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text = text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text = text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
4
.config/Code/User/History/-4c5aef8e/jmZa.py
Normal file
4
.config/Code/User/History/-4c5aef8e/jmZa.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
23
.config/Code/User/History/-4c5aef8e/jzzL.py
Normal file
23
.config/Code/User/History/-4c5aef8e/jzzL.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, "")
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
# sentence = input('enter a sentence:\n')
|
||||
# sentence = removePunctuationMarks(sentence)
|
||||
# sentence = removeStopWords(sentence)
|
||||
|
||||
# print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
20
.config/Code/User/History/-4c5aef8e/l9x0.py
Normal file
20
.config/Code/User/History/-4c5aef8e/l9x0.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, "")
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
23
.config/Code/User/History/-4c5aef8e/mmlm.py
Normal file
23
.config/Code/User/History/-4c5aef8e/mmlm.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
# sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
5
.config/Code/User/History/-4c5aef8e/mvAc.py
Normal file
5
.config/Code/User/History/-4c5aef8e/mvAc.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
|
||||
16
.config/Code/User/History/-4c5aef8e/sJh4.py
Normal file
16
.config/Code/User/History/-4c5aef8e/sJh4.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str, list:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, "")
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
|
||||
14
.config/Code/User/History/-4c5aef8e/seQt.py
Normal file
14
.config/Code/User/History/-4c5aef8e/seQt.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, "")
|
||||
return text
|
||||
|
||||
|
||||
3
.config/Code/User/History/-4c5aef8e/v1j5.py
Normal file
3
.config/Code/User/History/-4c5aef8e/v1j5.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
23
.config/Code/User/History/-4c5aef8e/wBT5.py
Normal file
23
.config/Code/User/History/-4c5aef8e/wBT5.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, "")
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word)
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
23
.config/Code/User/History/-4c5aef8e/wXQO.py
Normal file
23
.config/Code/User/History/-4c5aef8e/wXQO.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
stop_words = ("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "is", "it", "of", "on", "or", "so", "that", "the", "to", "with")
|
||||
punctuation_marks = [".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+"]
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text.replace(word, '')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
# sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
24
.config/Code/User/History/-4c5aef8e/wpYp.py
Normal file
24
.config/Code/User/History/-4c5aef8e/wpYp.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
stop_words = (" a ", " an ", " and ", " are ", " as ", " at ", " be ", " but ", " by ", " for ", " if ", " in ", " is ", " it ", " of ", " on ", " or ", " so ", " that ", " the ", " to ", " with ")
|
||||
punctuation_marks = (".", ",", "?", "!", ":", ";", "'", "\"", "''", "(", ")", "[", "]", "{", "}", "-", "—", "...", "/", "\\", "&", "*", "@", "#", "_", "~", "|", "<", ">", "=", "+")
|
||||
|
||||
def removePunctuationMarks(text: str) -> str:
|
||||
for mark in punctuation_marks:
|
||||
text = text.replace(mark, '')
|
||||
return text
|
||||
|
||||
def removeStopWords(text: str) -> str:
|
||||
for word in stop_words:
|
||||
text = text.replace(word, ' ')
|
||||
return text
|
||||
|
||||
def main():
|
||||
print('welcome')
|
||||
sentence = input('enter a sentence:\n')
|
||||
sentence = ' ' + sentence
|
||||
sentence = removePunctuationMarks(sentence)
|
||||
sentence = removeStopWords(sentence)
|
||||
|
||||
print('sentence with removed stuff is:\n', sentence)
|
||||
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue