to_huggingface_dataset#
- scikitplot.corpus.to_huggingface_dataset(documents)[source]#
Convert documents to a HuggingFace
Dataset.- Parameters:
- documentsSequence[CorpusDocument]
Source documents.
- Returns:
- datasets.Dataset or dict[str, list]
HuggingFace Dataset. Falls back to a column-dict if
datasetsis not installed.
- Parameters:
- Return type:
Notes
User note: Directly usable for fine-tuning or upload:
ds = to_huggingface_dataset(docs) ds.push_to_hub("my-org/my-corpus")
Gallery examples#
corpus WHO European Region local or url per file with examples
corpus WHO European Region local or url per file with examples