Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions easyPythonpi/methods/stringmainpulation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
"""
Simple string manipulation great for data cleaning and processing for e.g. tokenization or ML models. All methods are self-explanatory:
remove_punctuation removes all punctuation
count_vowels counts the number of vowels in a string and returns a dictionary with count
is_palindrome checks if the given string is a palindrome or not and returns a boolean value
"""

import easyPythonpi as pi
import regex as re


def remove_punctuation(my_str:'str')->'str':
punctuations = '''!()-[]{};:'"\,<>./?@#$%^&*_~'''
# remove punctuations from the string
Expand Down