class_docstr: Builder class for BertExample objects.
class_docstr_tok: ["Builder","class","for","BertExample","objects","."]
docstr: Computes tags needed for converting the source into the target.
  
  Args:
      task: tagging.EditingTask that specifies the input.
      target: Target text.
  
  Returns:
      List of tagging.Tag objects.
docstr_tok: ["Computes","tags","needed","for","converting","the","source","into","the","target",".","Args",":","task",":","tagging.EditingTask","that","specifies","the","input",".","target",":","Target","text",".","Returns",":","List","of","tagging.Tag","objects","."]
code: def _compute_tags(task: EditingTask, target: str) -> List[Tag]:
      """Computes tags needed for converting the source into the target.
  
      Args:
          task: tagging.EditingTask that specifies the input.
          target: Target text.
  
      Returns:
          List of tagging.Tag objects.
      """
      target_tokens = target.split(" ")
      if len(target_tokens) != len(task.source_tokens):
          raise ValueError(
              "Length mismatch: "
              + str(task.source_tokens)
              + "\n"
              + target
          )
      tags = []
      for t in target_tokens:
          if t == "<SELF>":
              tags.append(Tag("KEEP"))
          elif t == "<DELETE>":
              tags.append(Tag("DELETE"))
          else:
              tags.append(Tag("DELETE|" + t))
      return tags
  
imports: import logging
  from collections import OrderedDict
  from os import path
  from typing import Dict, List, Optional, Tuple, Union
  from transformers import PreTrainedTokenizerBase
  from nemo.collections.nlp.data.text_normalization_as_tagging.tagging import EditingTask, Tag
  from nemo.collections.nlp.data.text_normalization_as_tagging.utils import yield_sources_and_targets
label_desc: Use image node_id 6 for calling the BertExampleBuilder obj's underlying member method code with example usage: obj._compute_tags(task, target) and returns: tags