class_docstr: Base class for CoNLL-like formatted datasets.
  
  It provides functionalities to ease the processing of CoNLL-like datasets.
  Users can overwrite `_generate_examples` to customize the pipeline.
class_docstr_tok: ["Base","class","for","CoNLL-like","formatted","datasets",".","It","provides","functionalities","to","ease","the","processing","of","CoNLL-like","datasets",".","Users","can","overwrite","`","_generate_examples","`","to","customize","the","pipeline","."]
docstr: Processes CoNLL-like datasets and generate examples.
  
  Args:
    filepaths: The filepaths of the input data. Could be a list of paths for
      multiple input files, or a single path.
  
  Yields:
    Generated examples.
docstr_tok: ["Processes","CoNLL-like","datasets","and","generate","examples",".","Args",":","filepaths",":","The","filepaths","of","the","input","data",".","Could","be","a","list","of","paths","for","multiple","input","files",",","or","a","single","path",".","Yields",":","Generated","examples","."]
code: def _generate_examples(
      self,
      filepaths: Union[epath.PathLike, list[epath.PathLike]],
  ) -> split_builder_lib.SplitGenerator:
      """Processes CoNLL-like datasets and generate examples.
  
      Args:
        filepaths: The filepaths of the input data. Could be a list of paths for
          multiple input files, or a single path.
  
      Yields:
        Generated examples.
      """
      path = filepaths if isinstance(filepaths, list) else [filepaths]
  
      input_sequences = {feature: [] for feature in self.info.features}
  
      example_id = 0
      for filepath in path:
          with epath.Path(filepath).open() as f:
              for line in f:
                  if (
                      line.startswith("-DOCSTART-")
                      or line == "\n"
                      or not line
                  ):
                      if input_sequences["tokens"]:
                          yield example_id, input_sequences
                          example_id += 1
                          input_sequences = {
                              feature: []
                              for feature in self.info.features
                          }
                  else:
                      splits = line.split(self.builder_config.separator)
                      if len(splits) != len(
                          self.builder_config.ordered_features
                      ):
                          raise ValueError(
                              f"Mismatch in the number of features found in line: {line}\n"
                              f"Should be {len(self.builder_config.ordered_features)}, "
                              f"but found {len(splits)}"
                          )
                      for index, feature in enumerate(
                          self.builder_config.ordered_features.keys()
                      ):
                          input_sequences[feature].append(
                              splits[index].rstrip()
                          )
  
          # Last example from file.
          yield example_id, input_sequences
  
          # Initializing a new empty example in case of multiple filepaths in path.
          example_id += 1
          input_sequences = {
              feature: [] for feature in self.info.features
          }
  
file_path: datasets/tensorflow_datasets/core/dataset_builders/conll/conll_dataset_builder.py
imports: import collections
  from collections.abc import Sequence
  from typing import Optional, Union
  from etils import epath
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import split_builder
  from tensorflow_datasets.core.features import feature
  from tensorflow_datasets.core.features.features_dict import FeaturesDict
label_desc: Use image node_id 3 for calling the ConllDatasetBuilder obj's underlying member method code with example usage: obj._generate_examples(filepaths) without return types