def process_text(self, text):
stopwords = set([i.lower() for i in self.stopwords])<EOL>flags = (re.UNICODE if sys.version < '<STR_LIT:3>' and type(text) is unicode  <EOL>else <NUM_LIT:0>)<EOL>regexp = self.regexp if self.regexp is not None else r"<STR_LIT>"<EOL>words = re.findall(regexp, text, flags)<EOL>words = [word for word in words if word.lower() not in stopwords]<EOL>words = [word[:-<NUM_LIT:2>] if word.lower().endswith("<STR_LIT>") else word<EOL>for word in words]<EOL>if not self.include_numbers:<EOL><INDENT>words = [word for word in words if not word.isdigit()]<EOL><DEDENT>if self.min_word_length:<EOL><INDENT>words = [word for word in words if len(word) >= self.min_word_length]<EOL><DEDENT>if self.collocations:<EOL><INDENT>word_counts = unigrams_and_bigrams(words, self.normalize_plurals)<EOL><DEDENT>else:<EOL><INDENT>word_counts, _ = process_tokens(words, self.normalize_plurals)<EOL><DEDENT>return word_counts<EOL>
Splits a long text into words, eliminates the stopwords.

        Parameters
        ----------
        text : string
            The text to be processed.

        Returns
        -------
        words : dict (string, int)
            Word tokens with associated frequency.

        ..versionchanged:: 1.2.2
            Changed return type from list of tuples to dict.

        Notes
        -----
        There are better ways to do word tokenization, but I don't want to
        include all those things.