class_docstr: Predictor for the :class:`~allennlp.models.bidaf.SemanticRoleLabeler` model.
code: def make_srl_string(words, tags):
      frame = []
      chunk = []
  
      for token, tag in izip(words, tags):
          if tag.startswith("I-"):
              chunk.append(token)
          else:
              if chunk:
                  frame.append("[" + " ".join(chunk) + "]")
                  chunk = []
  
              if tag.startswith("B-"):
                  chunk.append(tag[2:] + ": " + token)
              elif tag == "O":
                  frame.append(token)
  
      if chunk:
          frame.append("[" + " ".join(chunk) + "]")
  
      return " ".join(frame)
  
file_path: magnitude/pymagnitude/third_party/allennlp/predictors/semantic_role_labeler.py
imports: from __future__ import absolute_import
  from allennlp.common.util import JsonDict, sanitize, group_by_count
  from allennlp.data import DatasetReader, Instance
  from allennlp.data.tokenizers.word_splitter import SpacyWordSplitter
  from allennlp.models import Model
  from allennlp.predictors.predictor import Predictor
label_desc: Use image node_id 3 for calling the SemanticRoleLabelerPredictor obj's underlying member method code with example usage: obj.make_srl_string(words, tags) and returns: str