<s> __author__ = '<STR_LIT>' <EOL> __copyright__ = '<STR_LIT>' <EOL> __credits__ = [ '<STR_LIT>' ] <EOL> __license__ = '<STR_LIT>' <EOL> __version__ = '<STR_LIT>' <EOL> __maintainer__ = '<STR_LIT:->' <EOL> __email__ = '<STR_LIT>' <EOL> __status__ = '<STR_LIT>' <EOL> __date__ = '<STR_LIT>' <EOL> __description__ = '<STR_LIT>' <EOL> import re <EOL> from helper_wordcloud import ServiceToWordCloud <EOL> CSV_FIELD_NAME = '<STR_LIT>' <EOL> class TumblrServiceToWC ( ServiceToWordCloud ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> super ( TumblrServiceToWC , self ) . __init__ ( * args , ** kwargs ) <EOL> own_stopwords = { '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:c>' , '<STR_LIT>' , '<STR_LIT:s>' } <EOL> self . config_stopwords ( own_stopwords ) <EOL> self . wrangle_data ( ) <EOL> def wrangle_data ( self ) : <EOL> """<STR_LIT>""" <EOL> words = '<STR_LIT:U+0020>' . join ( self . df [ CSV_FIELD_NAME ] ) <EOL> reg_exp = '<STR_LIT>' <EOL> no_html_words = re . sub ( reg_exp , '<STR_LIT:U+0020>' , words ) <EOL> no_urls_words = '<STR_LIT:U+0020>' . join ( [ word for word in no_html_words . split ( ) <EOL> if '<STR_LIT:http>' not in word <EOL> ] ) <EOL> self . words = no_urls_words <EOL> print '<STR_LIT>' <EOL> def main ( ) : <EOL> """<STR_LIT>""" <EOL> data_file = '<STR_LIT>' <EOL> data_folder = '<STR_LIT>' <EOL> save_directory = '<STR_LIT>' <EOL> service_name = '<STR_LIT>' <EOL> fonts = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> masks = [ '<STR_LIT>' ] <EOL> service = TumblrServiceToWC ( data_file , data_folder , save_directory ) <EOL> service . process ( service_name , fonts , masks ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
