def get_char_count(text):
    """
    Get the number of characters in the text.

    Args:
        text (str): Input text.

    Returns:
        int: Number of characters in the text.
    """
    # Using regular expression to remove punctuation and spaces
    cleaned_text = re.sub(r"[,.!?\"'，。！？“”‘’ ]", "", text)
    char_count = len(cleaned_text)
    return char_count
Get the number of characters in the text.

Args:
text (str): Input text.

Returns:
int: Number of characters in the text.
preprocessors/Emilia/utils/tool.py