code: def rank_remove(self, rank, items, cutoff):
  
          
  
          def remove(tokens):
              return [t for t in tokens if t not in to_remove]
  
          if rank == "df":
              to_remove = set([t[0] for t in self.df_ranking if t[1] <= cutoff])
          elif rank == "tfidf":
              to_remove = set([t[0] for t in self.tfidf_ranking
                               if t[1] <= cutoff])
          else:
              raise ValueError("Rank must be either \'df\' or \'tfidf\'.")
  
          if items == 'tokens':
              self.tokens = list(map(remove, self.tokens))
          elif items == 'bigrams':
              self.bigrams = list(map(remove, self.bigrams))
          elif items == 'stems':
              self.stems = list(map(remove, self.stems))
          else:
              raise ValueError("Items must be either \'tokens\', \'bigrams\' or \'stems\'.")
docs: remove tokens or stems (specified in items) based on rank's (df or
          tfidf) value being less than cutoff to remove all words with rank R or
          less, specify cutoff = self.xxx_ranking[R][1]