system HF staff commited on
Commit
81f0d09
0 Parent(s):

Update files from the datasets library (from 1.0.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.0.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"cross_topic_1": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_topic_1", "version": {"version_str": "1.0.0", "description": "The Original DS with the cross-topic scenario no.1", "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 677054, "num_examples": 112, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1283126, "num_examples": 207, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 374390, "num_examples": 62, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2334570, "size_in_bytes": 5435319}, "cross_genre_1": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_genre_1", "version": {"version_str": "13.0.0", "description": "The Original DS with the cross-genre scenario no.1", "datasets_version_to_prepare": null, "major": 13, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 406144, "num_examples": 63, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1657512, "num_examples": 269, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 677054, "num_examples": 112, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2740710, "size_in_bytes": 5841459}, "cross_topic_2": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_topic_2", "version": {"version_str": "2.0.0", "description": "The Original DS with the cross-topic scenario no.2", "datasets_version_to_prepare": null, "major": 2, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 677054, "num_examples": 112, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1104764, "num_examples": 179, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 552752, "num_examples": 90, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2334570, "size_in_bytes": 5435319}, "cross_topic_3": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_topic_3", "version": {"version_str": "3.0.0", "description": "The Original DS with the cross-topic scenario no.3", "datasets_version_to_prepare": null, "major": 3, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 677054, "num_examples": 112, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 927138, "num_examples": 152, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 730378, "num_examples": 117, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2334570, "size_in_bytes": 5435319}, "cross_topic_4": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_topic_4", "version": {"version_str": "4.0.0", "description": "The Original DS with the cross-topic scenario no.4", "datasets_version_to_prepare": null, "major": 4, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 374390, "num_examples": 62, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1283126, "num_examples": 207, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 677054, "num_examples": 112, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2334570, "size_in_bytes": 5435319}, "cross_topic_5": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_topic_5", "version": {"version_str": "5.0.0", "description": "The Original DS with the cross-topic scenario no.5", "datasets_version_to_prepare": null, "major": 5, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 374390, "num_examples": 62, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1407428, "num_examples": 229, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 552752, "num_examples": 90, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2334570, "size_in_bytes": 5435319}, "cross_topic_6": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_topic_6", "version": {"version_str": "6.0.0", "description": "The Original DS with the cross-topic scenario no.6", "datasets_version_to_prepare": null, "major": 6, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 374390, "num_examples": 62, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1229802, "num_examples": 202, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 730378, "num_examples": 117, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2334570, "size_in_bytes": 5435319}, "cross_topic_7": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_topic_7", "version": {"version_str": "7.0.0", "description": "The Original DS with the cross-topic scenario no.7", "datasets_version_to_prepare": null, "major": 7, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 552752, "num_examples": 90, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1104764, "num_examples": 179, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 677054, "num_examples": 112, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2334570, "size_in_bytes": 5435319}, "cross_topic_8": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_topic_8", "version": {"version_str": "8.0.0", "description": "The Original DS with the cross-topic scenario no.8", "datasets_version_to_prepare": null, "major": 8, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 552752, "num_examples": 90, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1407428, "num_examples": 229, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 374390, "num_examples": 62, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2334570, "size_in_bytes": 5435319}, "cross_topic_9": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_topic_9", "version": {"version_str": "9.0.0", "description": "The Original DS with the cross-topic scenario no.9", "datasets_version_to_prepare": null, "major": 9, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 552752, "num_examples": 90, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1051440, "num_examples": 174, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 730378, "num_examples": 117, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2334570, "size_in_bytes": 5435319}, "cross_topic_10": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_topic_10", "version": {"version_str": "10.0.0", "description": "The Original DS with the cross-topic scenario no.10", "datasets_version_to_prepare": null, "major": 10, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 730378, "num_examples": 117, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 927138, "num_examples": 152, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 677054, "num_examples": 112, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2334570, "size_in_bytes": 5435319}, "cross_topic_11": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_topic_11", "version": {"version_str": "11.0.0", "description": "The Original DS with the cross-topic scenario no.11", "datasets_version_to_prepare": null, "major": 11, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 730378, "num_examples": 117, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1229802, "num_examples": 202, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 374390, "num_examples": 62, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2334570, "size_in_bytes": 5435319}, "cross_topic_12": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_topic_12", "version": {"version_str": "12.0.0", "description": "The Original DS with the cross-topic scenario no.12", "datasets_version_to_prepare": null, "major": 12, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 730378, "num_examples": 117, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1051440, "num_examples": 174, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 552752, "num_examples": 90, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2334570, "size_in_bytes": 5435319}, "cross_genre_2": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_genre_2", "version": {"version_str": "14.0.0", "description": "The Original DS with the cross-genre scenario no.2", "datasets_version_to_prepare": null, "major": 14, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 406144, "num_examples": 63, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1960176, "num_examples": 319, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 374390, "num_examples": 62, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2740710, "size_in_bytes": 5841459}, "cross_genre_3": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_genre_3", "version": {"version_str": "15.0.0", "description": "The Original DS with the cross-genre scenario no.3", "datasets_version_to_prepare": null, "major": 15, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 406144, "num_examples": 63, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1781814, "num_examples": 291, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 552752, "num_examples": 90, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2740710, "size_in_bytes": 5841459}, "cross_genre_4": {"description": "A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013. \n1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).\n2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).\n\n3- The same-topic/genre scenario is created by grouping all the datasts as follows. \nFor ex., to use same_topic and split the data 60-40 use:\ntrain_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[:60%]+validation[:60%]+test[:60%]')\ntests_ds = load_dataset('guardian_authorship', name=\"cross_topic_<<#>>\", \n split='train[-40%:]+validation[-40%:]+test[-40%:]') \n\nIMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced\n\n* See https://huggingface.co/docs/datasets/splits.html for detailed/more examples \n", "citation": "@article{article,\n author = {Stamatatos, Efstathios},\n year = {2013},\n month = {01},\n pages = {421-439},\n title = {On the robustness of authorship attribution based on character n-gram features},\n volume = {21},\n journal = {Journal of Law and Policy}\n}\n\n@inproceedings{stamatatos2017authorship,\n title={Authorship attribution using text distortion},\n author={Stamatatos, Efstathios},\n booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},\n volume={1}\n pages={1138--1149},\n year={2017}\n}\n", "homepage": "http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf", "license": "", "features": {"author": {"num_classes": 13, "names": ["catherinebennett", "georgemonbiot", "hugoyoung", "jonathanfreedland", "martinkettle", "maryriddell", "nickcohen", "peterpreston", "pollytoynbee", "royhattersley", "simonhoggart", "willhutton", "zoewilliams"], "names_file": null, "id": null, "_type": "ClassLabel"}, "topic": {"num_classes": 5, "names": ["Politics", "Society", "UK", "World", "Books"], "names_file": null, "id": null, "_type": "ClassLabel"}, "article": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": {"features": null, "resources_checksums": {"train": {}, "test": {}, "validation": {}}}, "supervised_keys": {"input": ["article", "author"], "output": ""}, "builder_name": "guardian_authorship", "config_name": "cross_genre_4", "version": {"version_str": "16.0.0", "description": "The Original DS with the cross-genre scenario no.4", "datasets_version_to_prepare": null, "major": 16, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 406144, "num_examples": 63, "dataset_name": "guardian_authorship"}, "test": {"name": "test", "num_bytes": 1604188, "num_examples": 264, "dataset_name": "guardian_authorship"}, "validation": {"name": "validation", "num_bytes": 730378, "num_examples": 117, "dataset_name": "guardian_authorship"}}, "download_checksums": {"https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1": {"num_bytes": 3100749, "checksum": "8bb1130a697ee5943bcb6e24989aa477341a8ce1b9e057955cf010b27e8a9d06"}}, "download_size": 3100749, "post_processing_size": 0, "dataset_size": 2740710, "size_in_bytes": 5841459}}
dummy/cross_genre_1/13.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19ed0eb8af98f57cb103cd8b951ab99072ab872837a7c8d7158d07a4b9c5476d
3
+ size 4532
dummy/cross_genre_2/14.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19ed0eb8af98f57cb103cd8b951ab99072ab872837a7c8d7158d07a4b9c5476d
3
+ size 4532
dummy/cross_genre_3/15.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19ed0eb8af98f57cb103cd8b951ab99072ab872837a7c8d7158d07a4b9c5476d
3
+ size 4532
dummy/cross_genre_4/16.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19ed0eb8af98f57cb103cd8b951ab99072ab872837a7c8d7158d07a4b9c5476d
3
+ size 4532
dummy/cross_topic_1/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44c3eb993c6cf76b66f16255c5fe66ead6b6809f83dc9873e21d2451eb6a48
3
+ size 3744
dummy/cross_topic_10/10.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44c3eb993c6cf76b66f16255c5fe66ead6b6809f83dc9873e21d2451eb6a48
3
+ size 3744
dummy/cross_topic_11/11.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44c3eb993c6cf76b66f16255c5fe66ead6b6809f83dc9873e21d2451eb6a48
3
+ size 3744
dummy/cross_topic_12/12.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44c3eb993c6cf76b66f16255c5fe66ead6b6809f83dc9873e21d2451eb6a48
3
+ size 3744
dummy/cross_topic_2/2.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44c3eb993c6cf76b66f16255c5fe66ead6b6809f83dc9873e21d2451eb6a48
3
+ size 3744
dummy/cross_topic_3/3.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44c3eb993c6cf76b66f16255c5fe66ead6b6809f83dc9873e21d2451eb6a48
3
+ size 3744
dummy/cross_topic_4/4.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44c3eb993c6cf76b66f16255c5fe66ead6b6809f83dc9873e21d2451eb6a48
3
+ size 3744
dummy/cross_topic_5/5.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44c3eb993c6cf76b66f16255c5fe66ead6b6809f83dc9873e21d2451eb6a48
3
+ size 3744
dummy/cross_topic_6/6.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44c3eb993c6cf76b66f16255c5fe66ead6b6809f83dc9873e21d2451eb6a48
3
+ size 3744
dummy/cross_topic_7/7.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44c3eb993c6cf76b66f16255c5fe66ead6b6809f83dc9873e21d2451eb6a48
3
+ size 3744
dummy/cross_topic_8/8.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44c3eb993c6cf76b66f16255c5fe66ead6b6809f83dc9873e21d2451eb6a48
3
+ size 3744
dummy/cross_topic_9/9.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b44c3eb993c6cf76b66f16255c5fe66ead6b6809f83dc9873e21d2451eb6a48
3
+ size 3744
guardian_authorship.py ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """This is an authorship attribution dataset based on the work of Stamatatos 2013. """
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import os
20
+
21
+ import datasets
22
+
23
+
24
+ _CITATION = """\
25
+ @article{article,
26
+ author = {Stamatatos, Efstathios},
27
+ year = {2013},
28
+ month = {01},
29
+ pages = {421-439},
30
+ title = {On the robustness of authorship attribution based on character n-gram features},
31
+ volume = {21},
32
+ journal = {Journal of Law and Policy}
33
+ }
34
+
35
+ @inproceedings{stamatatos2017authorship,
36
+ title={Authorship attribution using text distortion},
37
+ author={Stamatatos, Efstathios},
38
+ booktitle={Proc. of the 15th Conf. of the European Chapter of the Association for Computational Linguistics},
39
+ volume={1}
40
+ pages={1138--1149},
41
+ year={2017}
42
+ }
43
+ """
44
+
45
+ _DESCRIPTION = """\
46
+ A dataset cross-topic authorship attribution. The dataset is provided by Stamatatos 2013.
47
+ 1- The cross-topic scenarios are based on Table-4 in Stamatatos 2017 (Ex. cross_topic_1 => row 1:P S U&W ).
48
+ 2- The cross-genre scenarios are based on Table-5 in the same paper. (Ex. cross_genre_1 => row 1:B P S&U&W).
49
+
50
+ 3- The same-topic/genre scenario is created by grouping all the datasts as follows.
51
+ For ex., to use same_topic and split the data 60-40 use:
52
+ train_ds = load_dataset('guardian_authorship', name="cross_topic_<<#>>",
53
+ split='train[:60%]+validation[:60%]+test[:60%]')
54
+ tests_ds = load_dataset('guardian_authorship', name="cross_topic_<<#>>",
55
+ split='train[-40%:]+validation[-40%:]+test[-40%:]')
56
+
57
+ IMPORTANT: train+validation+test[:60%] will generate the wrong splits becasue the data is imbalanced
58
+
59
+ * See https://huggingface.co/docs/datasets/splits.html for detailed/more examples
60
+ """
61
+
62
+ _URL = "https://www.dropbox.com/s/lc5mje0owl9shms/Guardian.zip?dl=1"
63
+
64
+
65
+ # Using a specific configuration class is optional, you can also use the base class if you don't need
66
+ # to add specific attributes.
67
+ # here we give an example for three sub-set of the dataset with difference sizes.
68
+ class GuardianAuthorshipConfig(datasets.BuilderConfig):
69
+ """ BuilderConfig for NewDataset"""
70
+
71
+ def __init__(self, train_folder, valid_folder, test_folder, **kwargs):
72
+ """
73
+ Args:
74
+ Train_folder: Topic/genre used for training
75
+ valid_folder: ~ ~ for validation
76
+ test_folder: ~ ~ for testing
77
+
78
+ **kwargs: keyword arguments forwarded to super.
79
+ """
80
+ super(GuardianAuthorshipConfig, self).__init__(**kwargs)
81
+ self.train_folder = train_folder
82
+ self.valid_folder = valid_folder
83
+ self.test_folder = test_folder
84
+
85
+
86
+ class GuardianAuthorship(datasets.GeneratorBasedBuilder):
87
+ """dataset for same- and cross-topic authorship attribution"""
88
+
89
+ config_counter = 0
90
+ BUILDER_CONFIG_CLASS = GuardianAuthorshipConfig
91
+ BUILDER_CONFIGS = [
92
+ # cross-topic
93
+ GuardianAuthorshipConfig(
94
+ name="cross_topic_{}".format(1),
95
+ version=datasets.Version(
96
+ "{}.0.0".format(1), description="The Original DS with the cross-topic scenario no.{}".format(1)
97
+ ),
98
+ train_folder="Politics",
99
+ valid_folder="Society",
100
+ test_folder="UK,World",
101
+ ),
102
+ GuardianAuthorshipConfig(
103
+ name="cross_topic_{}".format(2),
104
+ version=datasets.Version(
105
+ "{}.0.0".format(2), description="The Original DS with the cross-topic scenario no.{}".format(2)
106
+ ),
107
+ train_folder="Politics",
108
+ valid_folder="UK",
109
+ test_folder="Society,World",
110
+ ),
111
+ GuardianAuthorshipConfig(
112
+ name="cross_topic_{}".format(3),
113
+ version=datasets.Version(
114
+ "{}.0.0".format(3), description="The Original DS with the cross-topic scenario no.{}".format(3)
115
+ ),
116
+ train_folder="Politics",
117
+ valid_folder="World",
118
+ test_folder="Society,UK",
119
+ ),
120
+ GuardianAuthorshipConfig(
121
+ name="cross_topic_{}".format(4),
122
+ version=datasets.Version(
123
+ "{}.0.0".format(4), description="The Original DS with the cross-topic scenario no.{}".format(4)
124
+ ),
125
+ train_folder="Society",
126
+ valid_folder="Politics",
127
+ test_folder="UK,World",
128
+ ),
129
+ GuardianAuthorshipConfig(
130
+ name="cross_topic_{}".format(5),
131
+ version=datasets.Version(
132
+ "{}.0.0".format(5), description="The Original DS with the cross-topic scenario no.{}".format(5)
133
+ ),
134
+ train_folder="Society",
135
+ valid_folder="UK",
136
+ test_folder="Politics,World",
137
+ ),
138
+ GuardianAuthorshipConfig(
139
+ name="cross_topic_{}".format(6),
140
+ version=datasets.Version(
141
+ "{}.0.0".format(6), description="The Original DS with the cross-topic scenario no.{}".format(6)
142
+ ),
143
+ train_folder="Society",
144
+ valid_folder="World",
145
+ test_folder="Politics,UK",
146
+ ),
147
+ GuardianAuthorshipConfig(
148
+ name="cross_topic_{}".format(7),
149
+ version=datasets.Version(
150
+ "{}.0.0".format(7), description="The Original DS with the cross-topic scenario no.{}".format(7)
151
+ ),
152
+ train_folder="UK",
153
+ valid_folder="Politics",
154
+ test_folder="Society,World",
155
+ ),
156
+ GuardianAuthorshipConfig(
157
+ name="cross_topic_{}".format(8),
158
+ version=datasets.Version(
159
+ "{}.0.0".format(8), description="The Original DS with the cross-topic scenario no.{}".format(8)
160
+ ),
161
+ train_folder="UK",
162
+ valid_folder="Society",
163
+ test_folder="Politics,World",
164
+ ),
165
+ GuardianAuthorshipConfig(
166
+ name="cross_topic_{}".format(9),
167
+ version=datasets.Version(
168
+ "{}.0.0".format(9), description="The Original DS with the cross-topic scenario no.{}".format(9)
169
+ ),
170
+ train_folder="UK",
171
+ valid_folder="World",
172
+ test_folder="Politics,Society",
173
+ ),
174
+ GuardianAuthorshipConfig(
175
+ name="cross_topic_{}".format(10),
176
+ version=datasets.Version(
177
+ "{}.0.0".format(10), description="The Original DS with the cross-topic scenario no.{}".format(10)
178
+ ),
179
+ train_folder="World",
180
+ valid_folder="Politics",
181
+ test_folder="Society,UK",
182
+ ),
183
+ GuardianAuthorshipConfig(
184
+ name="cross_topic_{}".format(11),
185
+ version=datasets.Version(
186
+ "{}.0.0".format(11), description="The Original DS with the cross-topic scenario no.{}".format(11)
187
+ ),
188
+ train_folder="World",
189
+ valid_folder="Society",
190
+ test_folder="Politics,UK",
191
+ ),
192
+ GuardianAuthorshipConfig(
193
+ name="cross_topic_{}".format(12),
194
+ version=datasets.Version(
195
+ "{}.0.0".format(12), description="The Original DS with the cross-topic scenario no.{}".format(12)
196
+ ),
197
+ train_folder="World",
198
+ valid_folder="UK",
199
+ test_folder="Politics,Society",
200
+ ),
201
+ # # cross-genre
202
+ GuardianAuthorshipConfig(
203
+ name="cross_genre_{}".format(1),
204
+ version=datasets.Version(
205
+ "{}.0.0".format(13), description="The Original DS with the cross-genre scenario no.{}".format(1)
206
+ ),
207
+ train_folder="Books",
208
+ valid_folder="Politics",
209
+ test_folder="Society,UK,World",
210
+ ),
211
+ GuardianAuthorshipConfig(
212
+ name="cross_genre_{}".format(2),
213
+ version=datasets.Version(
214
+ "{}.0.0".format(14), description="The Original DS with the cross-genre scenario no.{}".format(2)
215
+ ),
216
+ train_folder="Books",
217
+ valid_folder="Society",
218
+ test_folder="Politics,UK,World",
219
+ ),
220
+ GuardianAuthorshipConfig(
221
+ name="cross_genre_{}".format(3),
222
+ version=datasets.Version(
223
+ "{}.0.0".format(15), description="The Original DS with the cross-genre scenario no.{}".format(3)
224
+ ),
225
+ train_folder="Books",
226
+ valid_folder="UK",
227
+ test_folder="Politics,Society,World",
228
+ ),
229
+ GuardianAuthorshipConfig(
230
+ name="cross_genre_{}".format(4),
231
+ version=datasets.Version(
232
+ "{}.0.0".format(16), description="The Original DS with the cross-genre scenario no.{}".format(4)
233
+ ),
234
+ train_folder="Books",
235
+ valid_folder="World",
236
+ test_folder="Politics,Society,UK",
237
+ ),
238
+ ]
239
+
240
+ def _info(self):
241
+ # Specifies the datasets.DatasetInfo object
242
+ return datasets.DatasetInfo(
243
+ # This is the description that will appear on the datasets page.
244
+ description=_DESCRIPTION,
245
+ features=datasets.Features(
246
+ {
247
+ # These are the features of your dataset like images, labels ...
248
+ # There are 13 authors in this dataset
249
+ "author": datasets.features.ClassLabel(
250
+ names=[
251
+ "catherinebennett",
252
+ "georgemonbiot",
253
+ "hugoyoung",
254
+ "jonathanfreedland",
255
+ "martinkettle",
256
+ "maryriddell",
257
+ "nickcohen",
258
+ "peterpreston",
259
+ "pollytoynbee",
260
+ "royhattersley",
261
+ "simonhoggart",
262
+ "willhutton",
263
+ "zoewilliams",
264
+ ]
265
+ ),
266
+ # There are book reviews, and articles on the following four topics
267
+ "topic": datasets.features.ClassLabel(names=["Politics", "Society", "UK", "World", "Books"]),
268
+ "article": datasets.Value("string"),
269
+ }
270
+ ),
271
+ # If there's a common (input, target) tuple from the features,
272
+ # specify them here. They'll be used if as_supervised=True in
273
+ # builder.as_dataset.
274
+ supervised_keys=[("article", "author")],
275
+ # Homepage of the dataset for documentation
276
+ homepage="http://www.icsd.aegean.gr/lecturers/stamatatos/papers/JLP2013.pdf",
277
+ citation=_CITATION,
278
+ )
279
+
280
+ def _split_generators(self, dl_manager):
281
+ """Returns SplitGenerators."""
282
+ # dl_manager is a datasets.download.DownloadManager that can be used to
283
+ # download and extract URLs
284
+ dl_dir = dl_manager.download_and_extract(_URL)
285
+
286
+ # This folder contains the orginal/2013 dataset
287
+ data_dir = os.path.join(dl_dir, "Guardian", "Guardian_original")
288
+
289
+ return [
290
+ datasets.SplitGenerator(
291
+ name=datasets.Split.TRAIN,
292
+ # These kwargs will be passed to _generate_examples
293
+ gen_kwargs={"data_dir": data_dir, "samples_folders": self.config.train_folder, "split": "train"},
294
+ ),
295
+ datasets.SplitGenerator(
296
+ name=datasets.Split.TEST,
297
+ # These kwargs will be passed to _generate_examples
298
+ gen_kwargs={"data_dir": data_dir, "samples_folders": self.config.test_folder, "split": "test"},
299
+ ),
300
+ datasets.SplitGenerator(
301
+ name=datasets.Split.VALIDATION,
302
+ # These kwargs will be passed to _generate_examples
303
+ gen_kwargs={"data_dir": data_dir, "samples_folders": self.config.valid_folder, "split": "valid"},
304
+ ),
305
+ ]
306
+
307
+ def _generate_examples(self, data_dir, samples_folders, split):
308
+ """ Yields examples. """
309
+ # Yields (key, example) tuples from the dataset
310
+
311
+ # Training and validation are on 1 topic/genre, while testing is on multiple topics
312
+ # We convert the sample folders into list (from string)
313
+ if samples_folders.count(",") == 0:
314
+ samples_folders = [samples_folders]
315
+ else:
316
+ samples_folders = samples_folders.split(",")
317
+
318
+ # the dataset is structured as:
319
+ # |-Topic1
320
+ # |---author 1
321
+ # |------- article-1
322
+ # |------- article-2
323
+ # |---author 2
324
+ # |------- article-1
325
+ # |------- article-2
326
+ # |-Topic2
327
+ # ...
328
+
329
+ for topic in samples_folders:
330
+ full_path = os.path.join(data_dir, topic)
331
+
332
+ for author in os.listdir(full_path):
333
+
334
+ list_articles = os.listdir(os.path.join(full_path, author))
335
+ if len(list_articles) == 0:
336
+ # Some authors have no articles on certain topics
337
+ continue
338
+
339
+ for id_, article in enumerate(list_articles):
340
+ path_2_author = os.path.join(full_path, author)
341
+ path_2_article = os.path.join(path_2_author, article)
342
+
343
+ with open(path_2_article, "r", encoding="utf8", errors="ignore") as f:
344
+ art = f.readlines()
345
+
346
+ # The whole article is stored as one line. We access the 1st element of the list
347
+ # to store it as string, not as a list
348
+ yield id_, {
349
+ "article": art[0],
350
+ "author": author,
351
+ "topic": topic,
352
+ }