from nltk.stem import PorterStemmer, LancasterStemmer
stemmer = PorterStemmer()


def stem(sentence):
    '''
        Given a stemmer and a sentence, stem each word in the sentence and return the sentence.
    '''
    words = sentence.split()
    words = [stemmer.stem(w) for w in words]
    return ' '.join(words)


def clean(text):
    '''
        Remove all special characters from the text. Only keep the characters from a-z and whitespaces.
    '''
    return re.sub(r'[^a-z\s]', '', text)

ce2a486f5f4b988099c7cb65d82dffcee7c10400
<mask token>


def clean(text):
    """
        Remove all special characters from the text. Only keep the characters from a-z and whitespaces.
    """
    return re.sub('[^a-z\\s]', '', text)

<mask token>


def stem(sentence):
    """
        Given a stemmer and a sentence, stem each word in the sentence and return the sentence.
    """
    words = sentence.split()
    words = [stemmer.stem(w) for w in words]
    return ' '.join(words)


def clean(text):
    """
        Remove all special characters from the text. Only keep the characters from a-z and whitespaces.
    """
    return re.sub('[^a-z\\s]', '', text)

<mask token>
stemmer = PorterStemmer()


def stem(sentence):
    """
        Given a stemmer and a sentence, stem each word in the sentence and return the sentence.
    """
    words = sentence.split()
    words = [stemmer.stem(w) for w in words]
    return ' '.join(words)


def clean(text):
    """
        Remove all special characters from the text. Only keep the characters from a-z and whitespaces.
    """
    return re.sub('[^a-z\\s]', '', text)

from nltk.stem import PorterStemmer, LancasterStemmer
stemmer = PorterStemmer()


def stem(sentence):
    """
        Given a stemmer and a sentence, stem each word in the sentence and return the sentence.
    """
    words = sentence.split()
    words = [stemmer.stem(w) for w in words]
    return ' '.join(words)


def clean(text):
    """
        Remove all special characters from the text. Only keep the characters from a-z and whitespaces.
    """
    return re.sub('[^a-z\\s]', '', text)

from nltk.stem import PorterStemmer, LancasterStemmer
stemmer = PorterStemmer()


def stem(sentence):
    '''
        Given a stemmer and a sentence, stem each word in the sentence and return the sentence.
    '''
    words = sentence.split()
    words = [stemmer.stem(w) for w in words]
    return ' '.join(words)


def clean(text):
    '''
        Remove all special characters from the text. Only keep the characters from a-z and whitespaces.
    '''
    return re.sub(r'[^a-z\s]', '', text)
