to_jsonl#
- scikitplot.corpus.to_jsonl(documents)[source]#
Yield documents as newline-delimited JSON strings.
- Parameters:
- documentsSequence[CorpusDocument]
Source documents.
- Yields:
- str
One JSON object per line (no trailing newline).
- Parameters:
- Return type:
Notes
User note: Write to a file for streaming ingestion:
with open("corpus.jsonl", "w") as f: for line in to_jsonl(docs): f.write(line + "\\n")
Gallery examples#
corpus WHO European Region local or url per file with examples
corpus WHO European Region local or url per file with examples