10-dim / README.md
AndersGiovanni's picture
Update README.md
23573c1 verified
metadata
language:
  - en
license: mit
size_categories:
  - 1K<n<10K
task_categories:
  - text-classification
pretty_name: 10 Social Dimensions
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
      - split: validation
        path: data/validation-*
      - split: test
        path: data/test-*
dataset_info:
  features:
    - name: text
      dtype: string
    - name: labels
      sequence: int64
  splits:
    - name: train
      num_bytes: 2237355.6300445576
      num_examples: 5498
    - name: validation
      num_bytes: 479375.2150222788
      num_examples: 1178
    - name: test
      num_bytes: 479782.1549331636
      num_examples: 1179
  download_size: 1723668
  dataset_size: 3196513

Dataset Card for "10-dim"

Map labels to strings

# Here's the list of labels and mappings between id and label.

labels = [
    "social_support",
    "conflict",
    "trust",
    "fun",
    "similarity",
    "identity",
    "respect",
    "romance",
    "knowledge",
    "power",
]
id2label = {i: label for i, label in enumerate(labels)}
label2id = {label: i for i, label in enumerate(labels)}

# Given an examples, this is how you map
sample = {
    "text": "This is just a made up text"
    "labels": [0, 0, 0, 1, 0, 0, 0, 0, 0, 1]
}

labels_str = [id2label[i] for i, label in enumerate(sample['labels']) if label == 1]

More Information needed