class_docstr: Class to read training datasets in CoNLL-2003 format
class_docstr_tok: ["Class","to","read","training","datasets","in","CoNLL-2003","format"]
code: def _iob2_to_iobes(tags):
      tag_map = {"BB": "S", "BO": "S", "IB": "E", "IO": "E"}
      tags = tags + ["O"]
      iobes_tags = []
      for i in range(len(tags) - 1):
          tagtag = tags[i][0] + tags[i + 1][0]
          if tagtag in tag_map:
              iobes_tags.append(tag_map[tagtag] + tags[i][1:])
          else:
              iobes_tags.append(tags[i])
      return iobes_tags
  
file_path: DeepPavlov/deeppavlov/dataset_readers/conll2003_reader.py
imports: from logging import getLogger
  from pathlib import Path
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.data.dataset_reader import DatasetReader
  from deeppavlov.core.data.utils import download_decompress
label_desc: Use image node_id 4 for calling the Conll2003DatasetReader obj's underlying member method code with example usage: obj._iob2_to_iobes(tags) and returns: iobes_tags