utils4text.py
def remove_marks(text):
    """
    Remove those unnecessary marks inside texts.

    Arg:
        text: A string that could be either posts or comments.
    Return:
        new_text: A string which is a clean sentence.
    """
    # remove HTML tags 
    new_text = re.sub('<.*?>', '', text) 

    # remove URL
    new_text = re.sub('http\S+', '', new_text)  

    # replace number with <NUM> token
    new_text = re.sub('\d+', ' NUM ', new_text)

    return new_text

    Remove those unnecessary marks inside texts.

    Arg:
        text: A string that could be either posts or comments.
    Return:
        new_text: A string which is a clean sentence.
    
Remove those unnecessary marks inside texts.
Arg:
text: A string that could be either posts or comments.
Return:
new_text: A string which is a clean sentence.
Remove those unnecessary marks inside texts . Arg : text : A string that could be either posts or comments . Return : new_text : A string which is a clean sentence .
def remove_marks(text):
    new_text = re.sub('<.*?>', '', text) 
    new_text = re.sub('http\S+', '', new_text)  
    new_text = re.sub('\d+', ' NUM ', new_text)
    return new_text
def remove_marks ( text ) : new_text = re . sub ( '<.*?>' , '' , text ) new_text = re . sub ( 'http\S+' , '' , new_text ) new_text = re . sub ( '\d+' , ' NUM ' , new_text ) return new_text
Remove those unnecessary marks inside texts.
Remove those unnecessary marks inside texts .
"""
    Remove those unnecessary marks inside texts.

    Arg:
        text: A string that could be either posts or comments.
    Return:
        new_text: A string which is a clean sentence.
    """ # remove HTML tags  # remove URL # replace number with <NUM> token
text