text: """
  Processor for performing part-of-speech tagging
  """
  
  from classla.models.common.pretrain import Pretrain
  from classla.models.common.utils import unsort
  from classla.models.pos.data import DataLoader
  from classla.models.pos.trainer import Trainer
  from classla.pipeline._constants import *
  from classla.pipeline.processor import UDProcessor
  
  
  class POSProcessor(UDProcessor):
  
      # set of processor requirements this processor fulfills
      PROVIDES_DEFAULT = set([POS])
      # set of processor requirements for this processor
      REQUIRES_DEFAULT = set([TOKENIZE])
  
      def _set_up_model(self, config, use_gpu):
          # get pretrained word vectors
          self._pretrain = Pretrain(config['pretrain_path'])
          # set up trainer
          self._trainer = Trainer(pretrain=self.pretrain, model_file=config['model_path'], use_cuda=use_gpu)
  
      def process(self, doc):
          batch = DataLoader(
              doc, self.config['batch_size'], self.config, self.pretrain, vocab=self.vocab, evaluation=True,
              sort_during_eval=True)
          preds = []
          for i, b in enumerate(batch):
              preds += self.trainer.predict(b)
          preds = unsort(preds, batch.data_orig_idx)
          batch.conll.set(['upos', 'xpos', 'feats'], [y for x in preds for y in x])
  