This commit is contained in:
RafayAhmad7548 2024-09-09 16:59:28 +05:00
parent 2992f4f408
commit 4f46de8d00
3330 changed files with 394553 additions and 76939 deletions

View 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()

View 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')

View 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()

View 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')

View 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()

View 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()

View 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"]

View 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()

View 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()

View 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()

View 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()

View 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

View 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()

View 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()

View 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"]

View 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()

View 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()

View 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()

View 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()

View 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()

View 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()

View 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()

View 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()

View 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()

View 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)

View 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}]}

View 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()

View 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()

View 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:

View 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()

View 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)

View 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()

View 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:

View 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')

View 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

View 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:

View 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()

View 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()

View 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()