Class DatasetParser

java.lang.Object
dev.dokimos.core.DatasetParser

public final class DatasetParser extends Object
  • Method Details

    • parseJson

      public static Dataset parseJson(String json)
    • parseJsonl

      public static Dataset parseJsonl(Path path, String name) throws IOException
      Parses a dataset from a JSONL file, streaming line-by-line from disk.
      Parameters:
      path - the file path
      name - the dataset name
      Returns:
      the parsed dataset
      Throws:
      IOException - if reading the file fails
    • parseJsonl

      public static Dataset parseJsonl(String jsonl, String name)
      Parses a dataset from a JSONL string. Each line is a separate JSON object representing an example.
      Parameters:
      jsonl - the JSONL content
      name - the dataset name
      Returns:
      the parsed dataset
    • parseCsv

      public static Dataset parseCsv(String csv, String name)
    • parseCsv

      public static Dataset parseCsv(String csv, String name, char delimiter)