<s> from . import datasources , features <EOL> from ... . dependencies import DependentSet <EOL> from ... . features import wikitext <EOL> class Stopwords ( DependentSet ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , name , stopword_set ) : <EOL> super ( ) . __init__ ( name ) <EOL> word_is_stopword = WordIsInStopwordSet ( stopword_set ) <EOL> self . revision = features . Revision ( <EOL> name + "<STR_LIT>" , <EOL> datasources . Revision ( name + "<STR_LIT>" , word_is_stopword , <EOL> wikitext . revision . datasources ) <EOL> ) <EOL> """<STR_LIT>""" <EOL> class WordIsInStopwordSet : <EOL> def __init__ ( self , stopword_set , cleanup = None ) : <EOL> self . stopword_set = stopword_set <EOL> def __call__ ( self , word ) : <EOL> return word . lower ( ) in self . stopword_set </s>
