def create_reader(md, gold_file=None):
    """
    Creates a TextReader object for the given task and loads its dictionary.
    :param md: a metadata object describing the task
    :param gold_file: path to a file with gold standard data, if
        the reader will be used for testing.
    """
    logger = logging.getLogger('Logger')
    logger.info('Loading text reader...')
    
    if md.task == 'pos':
        tr = POSReader(md, filename=gold_file)
    
    elif 'dependency' in md.task:
        labeled = md.task.startswith('labeled')
        tr = DependencyReader(md, filename=gold_file, labeled=labeled)
    
    elif md.task.startswith('srl'):
        tr = SRLReader(md, filename=gold_file, only_boundaries= (md.task == 'srl_boundary'),
                       only_classify= (md.task == 'srl_classify'),
                       only_predicates= (md.task == 'srl_predicates'))
    
    else:
        raise ValueError(md.task % "Unknown task: %s")
    
    logger.info('Done')
    return tr
dataset/ETHPy150Open erickrf/nlpnet/nlpnet/taggers.py/create_reader/swapped operands of `%`