system HF staff commited on
Commit
5d592f8
1 Parent(s): b774e88

import from S3

Browse files
Files changed (2) hide show
  1. dataset_infos.json +1 -0
  2. europarl-mono.py +137 -0
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"europarl-bg": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-bg", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 117485681, "num_examples": 137173, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 117485681, "size_in_bytes": 1687947395}, "europarl-cs": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-cs", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 108483030, "num_examples": 228810, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 108483030, "size_in_bytes": 1678944744}, "europarl-da": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-da", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 351946635, "num_examples": 728453, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 351946635, "size_in_bytes": 1922408349}, "europarl-de": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-de", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 384400428, "num_examples": 710071, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 384400428, "size_in_bytes": 1954862142}, "europarl-el": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-el", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 499109208, "num_examples": 540827, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 499109208, "size_in_bytes": 2069570922}, "europarl-en": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-en", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 361321166, "num_examples": 756029, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 361321166, "size_in_bytes": 1931782880}, "europarl-es": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-es", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 381842291, "num_examples": 732127, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 381842291, "size_in_bytes": 1952304005}, "europarl-et": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-et", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 101583647, "num_examples": 229186, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 101583647, "size_in_bytes": 1672045361}, "europarl-fi": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-fi", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 351558645, "num_examples": 698900, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 351558645, "size_in_bytes": 1922020359}, "europarl-fr": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-fr", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 403372381, "num_examples": 744027, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 403372381, "size_in_bytes": 1973834095}, "europarl-hu": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-hu", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 115243273, "num_examples": 221822, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 115243273, "size_in_bytes": 1685704987}, "europarl-it": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-it", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 381892012, "num_examples": 739908, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 381892012, "size_in_bytes": 1952353726}, "europarl-lt": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-lt", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 102938027, "num_examples": 226182, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 102938027, "size_in_bytes": 1673399741}, "europarl-lv": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-lv", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 106345626, "num_examples": 225405, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 106345626, "size_in_bytes": 1676807340}, "europarl-nl": {"description": "Europarl Monolingual Dataset.\n\nThe Europarl parallel corpus is extracted from the proceedings of the\nEuropean Parliament (from 2000 to 2011). It includes versions in 21 European\nlanguages: Romanic (French, Italian, Spanish, Portuguese, Romanian),\nGermanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,\nCzech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),\nBaltic (Latvian, Lithuanian), and Greek.\n\nUpstream url: https://www.statmt.org/europarl/\n", "citation": "@inproceedings{koehn2005europarl,\n title={Europarl: A parallel corpus for statistical machine translation},\n author={Koehn, Philipp},\n booktitle={MT summit},\n volume={5},\n pages={79--86},\n year={2005},\n organization={Citeseer}\n}\n", "homepage": "https://www.statmt.org/europarl/", "license": "", "features": {"paragraph": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}, "chapter": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "int16", "id": null, "_type": "Value"}, "speaker_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "europarl_mono_dataset", "config_name": "europarl-nl", "version": {"version_str": "7.0.0", "description": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 382808694, "num_examples": 733481, "dataset_name": "europarl_mono_dataset"}}, "download_checksums": {"https://www.statmt.org/europarl/v7/europarl.tgz": {"num_bytes": 1570461714, "checksum": "d109549ff35623ded3d375dc04040e3f0b399665680ed726281f877ff5995330"}}, "download_size": 1570461714, "post_processing_size": null, "dataset_size": 382808694, "size_in_bytes": 1953270408}}
europarl-mono.py ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Europarl Monolingual Dataset."""
2
+
3
+ from __future__ import absolute_import, division, print_function
4
+ from dataclasses import dataclass
5
+
6
+ import json
7
+ import os
8
+ import re
9
+
10
+ import datasets
11
+
12
+
13
+ _CITATION = """\
14
+ @inproceedings{koehn2005europarl,
15
+ title={Europarl: A parallel corpus for statistical machine translation},
16
+ author={Koehn, Philipp},
17
+ booktitle={MT summit},
18
+ volume={5},
19
+ pages={79--86},
20
+ year={2005},
21
+ organization={Citeseer}
22
+ }
23
+ """
24
+
25
+ _DESCRIPTION = """\
26
+ Europarl Monolingual Dataset.
27
+
28
+ The Europarl parallel corpus is extracted from the proceedings of the
29
+ European Parliament (from 2000 to 2011). It includes versions in 21 European
30
+ languages: Romanic (French, Italian, Spanish, Portuguese, Romanian),
31
+ Germanic (English, Dutch, German, Danish, Swedish), Slavik (Bulgarian,
32
+ Czech, Polish, Slovak, Slovene), Finni-Ugric (Finnish, Hungarian, Estonian),
33
+ Baltic (Latvian, Lithuanian), and Greek.
34
+
35
+ Upstream url: https://www.statmt.org/europarl/
36
+ """
37
+
38
+ _HOMEPAGE = "https://www.statmt.org/europarl/"
39
+
40
+ _AVAILABLE_LANGUAGES = [
41
+ ("bg", "Bulgarian"), ("cs", "Czech"), ("da", "Danish"), ("de", "German"),
42
+ ("el", "Greek"), ("en", "English"), ("es", "Spanish"), ("et", "Estonian"),
43
+ ("fi", "Finnish"), ("fr", "French"), ("hu", "Hungarian"), ("it", "Italian"),
44
+ ("lt", "Lithuanian"), ("lv", "Latvian"), ("nl", "Dutch"), ("pl", "Polish"),
45
+ ("pt", "Portuguese"), ("ro", "Romanian"), ("sk", "Slovak"),
46
+ ("sl", "Slovene"), ("sv", "Swedish")
47
+ ]
48
+
49
+ @dataclass
50
+ class EuroparlMonoConfig(datasets.BuilderConfig):
51
+ """BuilderConfig for Europarl Monolingual."""
52
+ language: str = None
53
+
54
+
55
+ class EuroparlMonoDataset(datasets.GeneratorBasedBuilder):
56
+ """Europarl Monolingual Dataset."""
57
+
58
+ _TRAIN_FILE = "train.jsonl"
59
+ _VAL_FILE = "val.jsonl"
60
+ _TEST_FILE = "test.jsonl"
61
+
62
+ BUILDER_CONFIGS = [
63
+ EuroparlMonoConfig(
64
+ name="europarl-%s" % langISO2,
65
+ language=langISO2,
66
+ version=datasets.Version("7.0.0"),
67
+ description="Europarl %s Dataset." % langEnglish,
68
+ ) for langISO2, langEnglish in _AVAILABLE_LANGUAGES
69
+ ]
70
+
71
+ def _info(self):
72
+ return datasets.DatasetInfo(
73
+ description=_DESCRIPTION,
74
+ features=datasets.Features(
75
+ {
76
+ "paragraph": datasets.Value("string"),
77
+ "date": datasets.Value("string"),
78
+ "chapter": datasets.Value("string"),
79
+ "speaker": datasets.Value("int16"),
80
+ "speaker_name": datasets.Value("string")
81
+ }
82
+ ),
83
+ supervised_keys=None,
84
+ homepage=_HOMEPAGE,
85
+ citation=_CITATION,
86
+ )
87
+
88
+ def _split_generators(self, dl_manager):
89
+ arch_path = dl_manager.download_and_extract(os.path.join(_HOMEPAGE, "v%d" % self.config.version.major, "europarl.tgz"))
90
+ path_dir = os.path.join(arch_path, os.path.join("txt", self.config.language))
91
+ paths = [os.path.join(path_dir, file) for file in os.listdir(path_dir)]
92
+ return [
93
+ datasets.SplitGenerator(
94
+ name=datasets.Split.TRAIN, gen_kwargs={"filepath": paths}
95
+ )
96
+ ]
97
+
98
+ def _generate_examples(self, filepath):
99
+ """Generate Europarl Monolingual examples."""
100
+
101
+ id_ = 0
102
+ for file in filepath:
103
+ with open(file, "r") as f:
104
+ current_date = "-".join(os.path.basename(file).strip(".txt").split("-")[-4:-1])
105
+ current_paragraph = ""
106
+ current_paragraph_id = 0
107
+ current_chapter = 0
108
+ current_speaker_id = 0
109
+ current_speaker_name = ""
110
+ for line in f:
111
+ if not line.startswith("<"):
112
+ current_paragraph += line.strip("\n")
113
+ else:
114
+ if len(current_paragraph) != 0:
115
+ yield id_, {
116
+ "paragraph": current_paragraph,
117
+ "date": current_date,
118
+ "chapter": current_chapter,
119
+ "speaker": current_speaker_id,
120
+ "speaker_name": current_speaker_name,
121
+ }
122
+ current_paragraph = ""
123
+ id_ += 1
124
+ if line.startswith("<P>"):
125
+ current_paragraph_id += 1
126
+ if line.startswith("<CHAPTER"):
127
+ current_chapter = line.lstrip("<CHAPTER ID=").rstrip(">\n").strip("\"")
128
+ if line.startswith("<SPEAKER"):
129
+ current_speaker_id = "0"
130
+ current_speaker_name = ""
131
+ grps = re.findall("([^<\s]+)=([^\s\">]+|\"[^\">]+\")", line)
132
+ for attr, value in grps:
133
+ value = value.strip("\"")
134
+ if attr == "ID":
135
+ current_speaker_id = int(value)
136
+ elif attr == "NAME":
137
+ current_speaker_name = value