UD_v2_17_DEP / README.md
AnastasiaLarionova's picture
Update README.md
d941da1 verified
|
Raw
History Blame Contribute Delete
6.5 kB
metadata
dataset_info:
  features:
    - name: sent_id
      dtype: string
    - name: tokens
      list: string
    - name: head
      list: string
    - name: deprel
      list:
        class_label:
          names:
            '0': acl
            '1': acl:relcl
            '2': advcl
            '3': advcl:cleft
            '4': advmod
            '5': amod
            '6': appos
            '7': aux
            '8': aux:caus
            '9': aux:pass
            '10': aux:tense
            '11': case
            '12': cc
            '13': ccomp
            '14': compound
            '15': conj
            '16': cop
            '17': csubj
            '18': csubj:pass
            '19': dep
            '20': dep:comp
            '21': det
            '22': discourse
            '23': dislocated
            '24': expl:comp
            '25': expl:pass
            '26': expl:subj
            '27': fixed
            '28': flat:foreign
            '29': flat:name
            '30': iobj
            '31': mark
            '32': nmod
            '33': nsubj
            '34': nsubj:caus
            '35': nsubj:outer
            '36': nsubj:pass
            '37': nummod
            '38': obj
            '39': obj:lvc
            '40': obl
            '41': obl:agent
            '42': obl:arg
            '43': obl:mod
            '44': orphan
            '45': parataxis
            '46': parataxis:insert
            '47': punct
            '48': reparandum
            '49': root
            '50': vocative
            '51': xcomp
  splits:
    - name: train
      num_bytes: 9916993
      num_examples: 17925
    - name: dev
      num_bytes: 1361562
      num_examples: 2950
    - name: test_fr_gsd
      num_bytes: 231864
      num_examples: 415
    - name: test_fr_rhapsodie
      num_bytes: 261360
      num_examples: 812
    - name: test_fr_sequoia
      num_bytes: 239070
      num_examples: 456
  download_size: 2551975
  dataset_size: 12010849
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
      - split: dev
        path: data/dev-*
      - split: test_fr_gsd
        path: data/test_fr_gsd-*
      - split: test_fr_rhapsodie
        path: data/test_fr_rhapsodie-*
      - split: test_fr_sequoia
        path: data/test_fr_sequoia-*

Dataset Information

This dataset is designed for the Dependency parsing task and is used to train the Airudit multitask model.

Dataset Description

The dataset combines Universal Dependencies v2.17 French corpora available at
commul/universal_dependencies.

Included corpora:

  • commul/universal_dependencies/fr_gsd
  • commul/universal_dependencies/fr_sequoia
  • commul/universal_dependencies/fr_rhapsodie

Nb. Other corpora, as 'fr_parisstories', 'fr_partut', 'fr_poitevindivital', 'fr_pud' are excluded because of too large difference in labels sets.

Dataset Structure

The dataset contains the following splits:

DatasetDict({
    train: Dataset({
        features: ['sent_id', 'tokens', 'head', 'deprel'],
        num_rows: 17925
    })
    dev: Dataset({
        features: ['sent_id', 'tokens', 'head', 'deprel'],
        num_rows: 2950
    })
    test_fr_gsd: Dataset({
        features: ['sent_id', 'tokens', 'head', 'deprel'],
        num_rows: 415
    })
    test_fr_rhapsodie: Dataset({
        features: ['sent_id', 'tokens', 'head', 'deprel'],
        num_rows: 812
    })
    test_fr_sequoia: Dataset({
        features: ['sent_id', 'tokens', 'head', 'deprel'],
        num_rows: 456
    })
})

Labels

Labels are encoded in the dataset and can be retrieved as following :

from datasets import load_dataset
ds = load_dataset('airudit/UD_v2_17_DEP')
ds["train"].features["deprel"].feature.names
# ['acl', 'acl:relcl', 'advcl', 'advcl:cleft', 'advmod', 'amod', 'appos', 'aux', 'aux:caus', 'aux:pass', 'aux:tense', 'case', 'cc', 'ccomp', 'compound', 'conj', 'cop', 'csubj', 'csubj:pass', 'dep', 'dep:comp', 'det', 'discourse', 'dislocated', 'expl:comp', 'expl:pass', 'expl:subj', 'fixed', 'flat:foreign', 'flat:name', 'iobj', 'mark', 'nmod', 'nsubj', 'nsubj:caus', 'nsubj:outer', 'nsubj:pass', 'nummod', 'obj', 'obj:lvc', 'obl', 'obl:agent', 'obl:arg', 'obl:mod', 'orphan', 'parataxis', 'parataxis:insert', 'punct', 'reparandum', 'root', 'vocative', 'xcomp']

🔍 Quick usage example:

from datasets import load_dataset
ds = load_dataset('airudit/UD_v2_17_DEP')
ds["train"][0]
# {'sent_id': [...], 'tokens': [...], 'head': [...], 'deprel': [...]}

📦 Dataset Pre-Processing :

Dependency Relation Filtering :

Sentences containing the following dependency relations are removed:

  • flat This relation does not appear in Sequoia treebank beacause the annotation always uses a subtype (e.g. flat:name). When flat is not subtyped it is difficult to automatically map it to a consistent subype.
  • parataxis:parenth is used to annotate parenthetical clauses. Only present in Rhapsodie treebank. The number of occurrences is small (39 occ), and parentical are currently not cosidered essential for target multitask model.

In total, removed 14 sentences for GSD treebank and 78 sentences for Rhapsodie treebank.

Dependency Relation Normalization :

To harmonize the annotation schemes across treebanks, the following mapping is applied:

{
  "goeswith": "compound",
  "expl:pv": "expl:pass",
  "obj:agent": "obj",
  "iobj:agent": "iobj",
  "nmod:appos": "nmod"
}

Occurrences affected by this normalization:

fr_gsd
{'expl:pv': 1016, 'obj:agent': 111, 'goeswith': 38, 'iobj:agent': 24}
fr_rhapsodie
{'nmod:appos': 115}
fr_sequoia
{'expl:pv': 242, 'obj:agent': 12, 'goeswith': 2, 'iobj:agent': 1}

Additional Label

The relation reparandum is added to the final vocabulary.

  • The label appears only in Rhapsodie treebank (1205 occ).
  • It is used to annotate speech disfluencies and self-corrections.
  • This information can be useful for ASR post-processing tasks.

Structure

  • Train and dev splits from all corpora are merged into unified train and dev splits.
  • Test splits are preserved and renamed according to their source corpus.
  • Only the relevant columns are kept: ["sent_id", "tokens", "head", "deprel"].
  • The dataset was generated using the following script: multitask-nlp/src/multitask_nlp/datasets/dependency_dataset_preparation.py