Skip to main content

Quick Tour

See how easy it is to working with SALT datasets.

Loading a Dataset

Here is a simple example of how to load a dataset configuration using SALT.
import salt.dataset
import yaml

# Define a simple configuration
yaml_config = '''
huggingface_load:
  path: Sunbird/salt
  split: train
  name: text-all
source:
  type: text
  language: eng
  preprocessing:
      - prefix_target_language
target:
  type: text
  language: [lug]
'''

# Load and create the dataset
config = yaml.safe_load(yaml_config)
ds = salt.dataset.create(config)

# Peek at the first 3 examples
print(list(ds.take(3)))

What’s Next?