class_docstr: Class for reading and processing standard format marker files and strings.
class_docstr_tok: ["Class","for","reading","and","processing","standard","format","marker","files","and","strings","."]
docstr: Return an iterator that returns the next field in a (marker, value)
  tuple. Linebreaks and trailing white space are preserved except
  for the final newline in each field.
  
  :rtype: iter(tuple(str, str))
docstr_tok: ["Return","an","iterator","that","returns","the","next","field","in","a","(","marker",",","value",")","tuple",".","Linebreaks","and","trailing","white","space","are","preserved","except","for","the","final","newline","in","each","field",".",":","rtype",":","iter","(","tuple","(","str",",","str",")",")"]
code: def raw_fields(self):
      """
      Return an iterator that returns the next field in a (marker, value)
      tuple. Linebreaks and trailing white space are preserved except
      for the final newline in each field.
  
      :rtype: iter(tuple(str, str))
      """
      join_string = "\n"
      line_regexp = r"^%s(?:\\(\S+)\s*)?(.*)$"
      # discard a BOM in the first line
      first_line_pat = re.compile(line_regexp % "(?:\xef\xbb\xbf)?")
      line_pat = re.compile(line_regexp % "")
      # need to get first line outside the loop for correct handling
      # of the first marker if it spans multiple lines
      file_iter = iter(self._file)
      # PEP 479, prevent RuntimeError when StopIteration is raised inside generator
      try:
          line = next(file_iter)
      except StopIteration:
          # no more data is available, terminate the generator
          return
      mobj = re.match(first_line_pat, line)
      mkr, line_value = mobj.groups()
      value_lines = [line_value]
      self.line_num = 0
      for line in file_iter:
          self.line_num += 1
          mobj = re.match(line_pat, line)
          line_mkr, line_value = mobj.groups()
          if line_mkr:
              yield (mkr, join_string.join(value_lines))
              mkr = line_mkr
              value_lines = [line_value]
          else:
              value_lines.append(line_value)
      self.line_num += 1
      yield (mkr, join_string.join(value_lines))
  
imports: import codecs
  import re
  from io import StringIO
  from xml.etree.ElementTree import Element, ElementTree, SubElement, TreeBuilder
  from nltk.data import PathPointer, find
label_desc: Use image node_id 4 for calling the StandardFormat obj's underlying member method code with example usage: obj.raw_fields() without return types