code: def tag(ctx, corpus, output):
      
      click.echo('chemdataextractor.chemdner.tag')
      for line in corpus:
          pmid, title, abstract = line.strip().split(u'\t')
          # print(pmid)
          counter = 1
          d = Document(Title(title), Paragraph(abstract))
          for t, section in [(d.elements[0], u'T'), (d.elements[1], u'A')]:
              for cem in t.cems:
                  code = u'%s:%s:%s' % (section, cem.start, cem.end)
                  output.write(u'\t'.join([pmid, code, six.text_type(counter), u'1']))
                  output.write(u'\n')
                  counter += 1
docs: Tag chemical entities and write CHEMDNER annotations predictions file.