diff --git a/corpus/betz_rau.txt b/data/corpus/betz_rau.txt similarity index 100% rename from corpus/betz_rau.txt rename to data/corpus/betz_rau.txt diff --git a/corpus/bowell_kemp_ctcg.txt b/data/corpus/bowell_kemp_ctcg.txt similarity index 100% rename from corpus/bowell_kemp_ctcg.txt rename to data/corpus/bowell_kemp_ctcg.txt diff --git a/corpus/brucebarbone_jta.txt b/data/corpus/brucebarbone_jta.txt similarity index 100% rename from corpus/brucebarbone_jta.txt rename to data/corpus/brucebarbone_jta.txt diff --git a/corpus/morrow_weston_awfa.txt b/data/corpus/morrow_weston_awfa.txt similarity index 100% rename from corpus/morrow_weston_awfa.txt rename to data/corpus/morrow_weston_awfa.txt diff --git a/corpus/nagel_wdiam.txt b/data/corpus/nagel_wdiam.txt similarity index 100% rename from corpus/nagel_wdiam.txt rename to data/corpus/nagel_wdiam.txt diff --git a/corpus/singer_pract_ethics.txt b/data/corpus/singer_pract_ethics.txt similarity index 100% rename from corpus/singer_pract_ethics.txt rename to data/corpus/singer_pract_ethics.txt diff --git a/corpus/crtw_1.txt b/data/web/crtw_1.txt similarity index 100% rename from corpus/crtw_1.txt rename to data/web/crtw_1.txt diff --git a/corpus/crtw_10.txt b/data/web/crtw_10.txt similarity index 100% rename from corpus/crtw_10.txt rename to data/web/crtw_10.txt diff --git a/corpus/crtw_100.txt b/data/web/crtw_100.txt similarity index 100% rename from corpus/crtw_100.txt rename to data/web/crtw_100.txt diff --git a/corpus/crtw_101.txt b/data/web/crtw_101.txt similarity index 100% rename from corpus/crtw_101.txt rename to data/web/crtw_101.txt diff --git a/corpus/crtw_102.txt b/data/web/crtw_102.txt similarity index 100% rename from corpus/crtw_102.txt rename to data/web/crtw_102.txt diff --git a/corpus/crtw_103.txt b/data/web/crtw_103.txt similarity index 100% rename from corpus/crtw_103.txt rename to data/web/crtw_103.txt diff --git a/corpus/crtw_104.txt b/data/web/crtw_104.txt similarity index 100% rename from corpus/crtw_104.txt rename to data/web/crtw_104.txt diff --git a/corpus/crtw_105.txt b/data/web/crtw_105.txt similarity index 100% rename from corpus/crtw_105.txt rename to data/web/crtw_105.txt diff --git a/corpus/crtw_106.txt b/data/web/crtw_106.txt similarity index 100% rename from corpus/crtw_106.txt rename to data/web/crtw_106.txt diff --git a/corpus/crtw_107.txt b/data/web/crtw_107.txt similarity index 100% rename from corpus/crtw_107.txt rename to data/web/crtw_107.txt diff --git a/corpus/crtw_108.txt b/data/web/crtw_108.txt similarity index 100% rename from corpus/crtw_108.txt rename to data/web/crtw_108.txt diff --git a/corpus/crtw_109.txt b/data/web/crtw_109.txt similarity index 100% rename from corpus/crtw_109.txt rename to data/web/crtw_109.txt diff --git a/corpus/crtw_11.txt b/data/web/crtw_11.txt similarity index 100% rename from corpus/crtw_11.txt rename to data/web/crtw_11.txt diff --git a/corpus/crtw_110.txt b/data/web/crtw_110.txt similarity index 100% rename from corpus/crtw_110.txt rename to data/web/crtw_110.txt diff --git a/corpus/crtw_111.txt b/data/web/crtw_111.txt similarity index 100% rename from corpus/crtw_111.txt rename to data/web/crtw_111.txt diff --git a/corpus/crtw_112.txt b/data/web/crtw_112.txt similarity index 100% rename from corpus/crtw_112.txt rename to data/web/crtw_112.txt diff --git a/corpus/crtw_113.txt b/data/web/crtw_113.txt similarity index 100% rename from corpus/crtw_113.txt rename to data/web/crtw_113.txt diff --git a/corpus/crtw_114.txt b/data/web/crtw_114.txt similarity index 100% rename from corpus/crtw_114.txt rename to data/web/crtw_114.txt diff --git a/corpus/crtw_115.txt b/data/web/crtw_115.txt similarity index 100% rename from corpus/crtw_115.txt rename to data/web/crtw_115.txt diff --git a/corpus/crtw_116.txt b/data/web/crtw_116.txt similarity index 100% rename from corpus/crtw_116.txt rename to data/web/crtw_116.txt diff --git a/corpus/crtw_117.txt b/data/web/crtw_117.txt similarity index 100% rename from corpus/crtw_117.txt rename to data/web/crtw_117.txt diff --git a/corpus/crtw_118.txt b/data/web/crtw_118.txt similarity index 100% rename from corpus/crtw_118.txt rename to data/web/crtw_118.txt diff --git a/corpus/crtw_119.txt b/data/web/crtw_119.txt similarity index 100% rename from corpus/crtw_119.txt rename to data/web/crtw_119.txt diff --git a/corpus/crtw_12.txt b/data/web/crtw_12.txt similarity index 100% rename from corpus/crtw_12.txt rename to data/web/crtw_12.txt diff --git a/corpus/crtw_120.txt b/data/web/crtw_120.txt similarity index 100% rename from corpus/crtw_120.txt rename to data/web/crtw_120.txt diff --git a/corpus/crtw_121.txt b/data/web/crtw_121.txt similarity index 100% rename from corpus/crtw_121.txt rename to data/web/crtw_121.txt diff --git a/corpus/crtw_122.txt b/data/web/crtw_122.txt similarity index 100% rename from corpus/crtw_122.txt rename to data/web/crtw_122.txt diff --git a/corpus/crtw_123.txt b/data/web/crtw_123.txt similarity index 100% rename from corpus/crtw_123.txt rename to data/web/crtw_123.txt diff --git a/corpus/crtw_124.txt b/data/web/crtw_124.txt similarity index 100% rename from corpus/crtw_124.txt rename to data/web/crtw_124.txt diff --git a/corpus/crtw_125.txt b/data/web/crtw_125.txt similarity index 100% rename from corpus/crtw_125.txt rename to data/web/crtw_125.txt diff --git a/corpus/crtw_126.txt b/data/web/crtw_126.txt similarity index 100% rename from corpus/crtw_126.txt rename to data/web/crtw_126.txt diff --git a/corpus/crtw_127.txt b/data/web/crtw_127.txt similarity index 100% rename from corpus/crtw_127.txt rename to data/web/crtw_127.txt diff --git a/corpus/crtw_128.txt b/data/web/crtw_128.txt similarity index 100% rename from corpus/crtw_128.txt rename to data/web/crtw_128.txt diff --git a/corpus/crtw_129.txt b/data/web/crtw_129.txt similarity index 100% rename from corpus/crtw_129.txt rename to data/web/crtw_129.txt diff --git a/corpus/crtw_13.txt b/data/web/crtw_13.txt similarity index 100% rename from corpus/crtw_13.txt rename to data/web/crtw_13.txt diff --git a/corpus/crtw_130.txt b/data/web/crtw_130.txt similarity index 100% rename from corpus/crtw_130.txt rename to data/web/crtw_130.txt diff --git a/corpus/crtw_131.txt b/data/web/crtw_131.txt similarity index 100% rename from corpus/crtw_131.txt rename to data/web/crtw_131.txt diff --git a/corpus/crtw_132.txt b/data/web/crtw_132.txt similarity index 100% rename from corpus/crtw_132.txt rename to data/web/crtw_132.txt diff --git a/corpus/crtw_133.txt b/data/web/crtw_133.txt similarity index 100% rename from corpus/crtw_133.txt rename to data/web/crtw_133.txt diff --git a/corpus/crtw_134.txt b/data/web/crtw_134.txt similarity index 100% rename from corpus/crtw_134.txt rename to data/web/crtw_134.txt diff --git a/corpus/crtw_135.txt b/data/web/crtw_135.txt similarity index 100% rename from corpus/crtw_135.txt rename to data/web/crtw_135.txt diff --git a/corpus/crtw_136.txt b/data/web/crtw_136.txt similarity index 100% rename from corpus/crtw_136.txt rename to data/web/crtw_136.txt diff --git a/corpus/crtw_14.txt b/data/web/crtw_14.txt similarity index 100% rename from corpus/crtw_14.txt rename to data/web/crtw_14.txt diff --git a/corpus/crtw_15.txt b/data/web/crtw_15.txt similarity index 100% rename from corpus/crtw_15.txt rename to data/web/crtw_15.txt diff --git a/corpus/crtw_16.txt b/data/web/crtw_16.txt similarity index 100% rename from corpus/crtw_16.txt rename to data/web/crtw_16.txt diff --git a/corpus/crtw_17.txt b/data/web/crtw_17.txt similarity index 100% rename from corpus/crtw_17.txt rename to data/web/crtw_17.txt diff --git a/corpus/crtw_18.txt b/data/web/crtw_18.txt similarity index 100% rename from corpus/crtw_18.txt rename to data/web/crtw_18.txt diff --git a/corpus/crtw_19.txt b/data/web/crtw_19.txt similarity index 100% rename from corpus/crtw_19.txt rename to data/web/crtw_19.txt diff --git a/corpus/crtw_2.txt b/data/web/crtw_2.txt similarity index 100% rename from corpus/crtw_2.txt rename to data/web/crtw_2.txt diff --git a/corpus/crtw_20.txt b/data/web/crtw_20.txt similarity index 100% rename from corpus/crtw_20.txt rename to data/web/crtw_20.txt diff --git a/corpus/crtw_21.txt b/data/web/crtw_21.txt similarity index 100% rename from corpus/crtw_21.txt rename to data/web/crtw_21.txt diff --git a/corpus/crtw_22.txt b/data/web/crtw_22.txt similarity index 100% rename from corpus/crtw_22.txt rename to data/web/crtw_22.txt diff --git a/corpus/crtw_23.txt b/data/web/crtw_23.txt similarity index 100% rename from corpus/crtw_23.txt rename to data/web/crtw_23.txt diff --git a/corpus/crtw_24.txt b/data/web/crtw_24.txt similarity index 100% rename from corpus/crtw_24.txt rename to data/web/crtw_24.txt diff --git a/corpus/crtw_25.txt b/data/web/crtw_25.txt similarity index 100% rename from corpus/crtw_25.txt rename to data/web/crtw_25.txt diff --git a/corpus/crtw_26.txt b/data/web/crtw_26.txt similarity index 100% rename from corpus/crtw_26.txt rename to data/web/crtw_26.txt diff --git a/corpus/crtw_27.txt b/data/web/crtw_27.txt similarity index 100% rename from corpus/crtw_27.txt rename to data/web/crtw_27.txt diff --git a/corpus/crtw_28.txt b/data/web/crtw_28.txt similarity index 100% rename from corpus/crtw_28.txt rename to data/web/crtw_28.txt diff --git a/corpus/crtw_29.txt b/data/web/crtw_29.txt similarity index 100% rename from corpus/crtw_29.txt rename to data/web/crtw_29.txt diff --git a/corpus/crtw_3.txt b/data/web/crtw_3.txt similarity index 100% rename from corpus/crtw_3.txt rename to data/web/crtw_3.txt diff --git a/corpus/crtw_30.txt b/data/web/crtw_30.txt similarity index 100% rename from corpus/crtw_30.txt rename to data/web/crtw_30.txt diff --git a/corpus/crtw_31.txt b/data/web/crtw_31.txt similarity index 100% rename from corpus/crtw_31.txt rename to data/web/crtw_31.txt diff --git a/corpus/crtw_32.txt b/data/web/crtw_32.txt similarity index 100% rename from corpus/crtw_32.txt rename to data/web/crtw_32.txt diff --git a/corpus/crtw_33.txt b/data/web/crtw_33.txt similarity index 100% rename from corpus/crtw_33.txt rename to data/web/crtw_33.txt diff --git a/corpus/crtw_34.txt b/data/web/crtw_34.txt similarity index 100% rename from corpus/crtw_34.txt rename to data/web/crtw_34.txt diff --git a/corpus/crtw_35.txt b/data/web/crtw_35.txt similarity index 100% rename from corpus/crtw_35.txt rename to data/web/crtw_35.txt diff --git a/corpus/crtw_36.txt b/data/web/crtw_36.txt similarity index 100% rename from corpus/crtw_36.txt rename to data/web/crtw_36.txt diff --git a/corpus/crtw_37.txt b/data/web/crtw_37.txt similarity index 100% rename from corpus/crtw_37.txt rename to data/web/crtw_37.txt diff --git a/corpus/crtw_38.txt b/data/web/crtw_38.txt similarity index 100% rename from corpus/crtw_38.txt rename to data/web/crtw_38.txt diff --git a/corpus/crtw_39.txt b/data/web/crtw_39.txt similarity index 100% rename from corpus/crtw_39.txt rename to data/web/crtw_39.txt diff --git a/corpus/crtw_4.txt b/data/web/crtw_4.txt similarity index 100% rename from corpus/crtw_4.txt rename to data/web/crtw_4.txt diff --git a/corpus/crtw_40.txt b/data/web/crtw_40.txt similarity index 100% rename from corpus/crtw_40.txt rename to data/web/crtw_40.txt diff --git a/corpus/crtw_41.txt b/data/web/crtw_41.txt similarity index 100% rename from corpus/crtw_41.txt rename to data/web/crtw_41.txt diff --git a/corpus/crtw_42.txt b/data/web/crtw_42.txt similarity index 100% rename from corpus/crtw_42.txt rename to data/web/crtw_42.txt diff --git a/corpus/crtw_43.txt b/data/web/crtw_43.txt similarity index 100% rename from corpus/crtw_43.txt rename to data/web/crtw_43.txt diff --git a/corpus/crtw_44.txt b/data/web/crtw_44.txt similarity index 100% rename from corpus/crtw_44.txt rename to data/web/crtw_44.txt diff --git a/corpus/crtw_45.txt b/data/web/crtw_45.txt similarity index 100% rename from corpus/crtw_45.txt rename to data/web/crtw_45.txt diff --git a/corpus/crtw_46.txt b/data/web/crtw_46.txt similarity index 100% rename from corpus/crtw_46.txt rename to data/web/crtw_46.txt diff --git a/corpus/crtw_47.txt b/data/web/crtw_47.txt similarity index 100% rename from corpus/crtw_47.txt rename to data/web/crtw_47.txt diff --git a/corpus/crtw_48.txt b/data/web/crtw_48.txt similarity index 100% rename from corpus/crtw_48.txt rename to data/web/crtw_48.txt diff --git a/corpus/crtw_49.txt b/data/web/crtw_49.txt similarity index 100% rename from corpus/crtw_49.txt rename to data/web/crtw_49.txt diff --git a/corpus/crtw_5.txt b/data/web/crtw_5.txt similarity index 100% rename from corpus/crtw_5.txt rename to data/web/crtw_5.txt diff --git a/corpus/crtw_50.txt b/data/web/crtw_50.txt similarity index 100% rename from corpus/crtw_50.txt rename to data/web/crtw_50.txt diff --git a/corpus/crtw_51.txt b/data/web/crtw_51.txt similarity index 100% rename from corpus/crtw_51.txt rename to data/web/crtw_51.txt diff --git a/corpus/crtw_52.txt b/data/web/crtw_52.txt similarity index 100% rename from corpus/crtw_52.txt rename to data/web/crtw_52.txt diff --git a/corpus/crtw_53.txt b/data/web/crtw_53.txt similarity index 100% rename from corpus/crtw_53.txt rename to data/web/crtw_53.txt diff --git a/corpus/crtw_54.txt b/data/web/crtw_54.txt similarity index 100% rename from corpus/crtw_54.txt rename to data/web/crtw_54.txt diff --git a/corpus/crtw_55.txt b/data/web/crtw_55.txt similarity index 100% rename from corpus/crtw_55.txt rename to data/web/crtw_55.txt diff --git a/corpus/crtw_56.txt b/data/web/crtw_56.txt similarity index 100% rename from corpus/crtw_56.txt rename to data/web/crtw_56.txt diff --git a/corpus/crtw_57.txt b/data/web/crtw_57.txt similarity index 100% rename from corpus/crtw_57.txt rename to data/web/crtw_57.txt diff --git a/corpus/crtw_58.txt b/data/web/crtw_58.txt similarity index 100% rename from corpus/crtw_58.txt rename to data/web/crtw_58.txt diff --git a/corpus/crtw_59.txt b/data/web/crtw_59.txt similarity index 100% rename from corpus/crtw_59.txt rename to data/web/crtw_59.txt diff --git a/corpus/crtw_6.txt b/data/web/crtw_6.txt similarity index 100% rename from corpus/crtw_6.txt rename to data/web/crtw_6.txt diff --git a/corpus/crtw_60.txt b/data/web/crtw_60.txt similarity index 100% rename from corpus/crtw_60.txt rename to data/web/crtw_60.txt diff --git a/corpus/crtw_61.txt b/data/web/crtw_61.txt similarity index 100% rename from corpus/crtw_61.txt rename to data/web/crtw_61.txt diff --git a/corpus/crtw_62.txt b/data/web/crtw_62.txt similarity index 100% rename from corpus/crtw_62.txt rename to data/web/crtw_62.txt diff --git a/corpus/crtw_63.txt b/data/web/crtw_63.txt similarity index 100% rename from corpus/crtw_63.txt rename to data/web/crtw_63.txt diff --git a/corpus/crtw_64.txt b/data/web/crtw_64.txt similarity index 100% rename from corpus/crtw_64.txt rename to data/web/crtw_64.txt diff --git a/corpus/crtw_65.txt b/data/web/crtw_65.txt similarity index 100% rename from corpus/crtw_65.txt rename to data/web/crtw_65.txt diff --git a/corpus/crtw_66.txt b/data/web/crtw_66.txt similarity index 100% rename from corpus/crtw_66.txt rename to data/web/crtw_66.txt diff --git a/corpus/crtw_67.txt b/data/web/crtw_67.txt similarity index 100% rename from corpus/crtw_67.txt rename to data/web/crtw_67.txt diff --git a/corpus/crtw_68.txt b/data/web/crtw_68.txt similarity index 100% rename from corpus/crtw_68.txt rename to data/web/crtw_68.txt diff --git a/corpus/crtw_69.txt b/data/web/crtw_69.txt similarity index 100% rename from corpus/crtw_69.txt rename to data/web/crtw_69.txt diff --git a/corpus/crtw_7.txt b/data/web/crtw_7.txt similarity index 100% rename from corpus/crtw_7.txt rename to data/web/crtw_7.txt diff --git a/corpus/crtw_70.txt b/data/web/crtw_70.txt similarity index 100% rename from corpus/crtw_70.txt rename to data/web/crtw_70.txt diff --git a/corpus/crtw_71.txt b/data/web/crtw_71.txt similarity index 100% rename from corpus/crtw_71.txt rename to data/web/crtw_71.txt diff --git a/corpus/crtw_72.txt b/data/web/crtw_72.txt similarity index 100% rename from corpus/crtw_72.txt rename to data/web/crtw_72.txt diff --git a/corpus/crtw_73.txt b/data/web/crtw_73.txt similarity index 100% rename from corpus/crtw_73.txt rename to data/web/crtw_73.txt diff --git a/corpus/crtw_74.txt b/data/web/crtw_74.txt similarity index 100% rename from corpus/crtw_74.txt rename to data/web/crtw_74.txt diff --git a/corpus/crtw_75.txt b/data/web/crtw_75.txt similarity index 100% rename from corpus/crtw_75.txt rename to data/web/crtw_75.txt diff --git a/corpus/crtw_76.txt b/data/web/crtw_76.txt similarity index 100% rename from corpus/crtw_76.txt rename to data/web/crtw_76.txt diff --git a/corpus/crtw_77.txt b/data/web/crtw_77.txt similarity index 100% rename from corpus/crtw_77.txt rename to data/web/crtw_77.txt diff --git a/corpus/crtw_78.txt b/data/web/crtw_78.txt similarity index 100% rename from corpus/crtw_78.txt rename to data/web/crtw_78.txt diff --git a/corpus/crtw_79.txt b/data/web/crtw_79.txt similarity index 100% rename from corpus/crtw_79.txt rename to data/web/crtw_79.txt diff --git a/corpus/crtw_8.txt b/data/web/crtw_8.txt similarity index 100% rename from corpus/crtw_8.txt rename to data/web/crtw_8.txt diff --git a/corpus/crtw_80.txt b/data/web/crtw_80.txt similarity index 100% rename from corpus/crtw_80.txt rename to data/web/crtw_80.txt diff --git a/corpus/crtw_81.txt b/data/web/crtw_81.txt similarity index 100% rename from corpus/crtw_81.txt rename to data/web/crtw_81.txt diff --git a/corpus/crtw_82.txt b/data/web/crtw_82.txt similarity index 100% rename from corpus/crtw_82.txt rename to data/web/crtw_82.txt diff --git a/corpus/crtw_83.txt b/data/web/crtw_83.txt similarity index 100% rename from corpus/crtw_83.txt rename to data/web/crtw_83.txt diff --git a/corpus/crtw_84.txt b/data/web/crtw_84.txt similarity index 100% rename from corpus/crtw_84.txt rename to data/web/crtw_84.txt diff --git a/corpus/crtw_85.txt b/data/web/crtw_85.txt similarity index 100% rename from corpus/crtw_85.txt rename to data/web/crtw_85.txt diff --git a/corpus/crtw_86.txt b/data/web/crtw_86.txt similarity index 100% rename from corpus/crtw_86.txt rename to data/web/crtw_86.txt diff --git a/corpus/crtw_87.txt b/data/web/crtw_87.txt similarity index 100% rename from corpus/crtw_87.txt rename to data/web/crtw_87.txt diff --git a/corpus/crtw_88.txt b/data/web/crtw_88.txt similarity index 100% rename from corpus/crtw_88.txt rename to data/web/crtw_88.txt diff --git a/corpus/crtw_89.txt b/data/web/crtw_89.txt similarity index 100% rename from corpus/crtw_89.txt rename to data/web/crtw_89.txt diff --git a/corpus/crtw_9.txt b/data/web/crtw_9.txt similarity index 100% rename from corpus/crtw_9.txt rename to data/web/crtw_9.txt diff --git a/corpus/crtw_90.txt b/data/web/crtw_90.txt similarity index 100% rename from corpus/crtw_90.txt rename to data/web/crtw_90.txt diff --git a/corpus/crtw_91.txt b/data/web/crtw_91.txt similarity index 100% rename from corpus/crtw_91.txt rename to data/web/crtw_91.txt diff --git a/corpus/crtw_92.txt b/data/web/crtw_92.txt similarity index 100% rename from corpus/crtw_92.txt rename to data/web/crtw_92.txt diff --git a/corpus/crtw_93.txt b/data/web/crtw_93.txt similarity index 100% rename from corpus/crtw_93.txt rename to data/web/crtw_93.txt diff --git a/corpus/crtw_94.txt b/data/web/crtw_94.txt similarity index 100% rename from corpus/crtw_94.txt rename to data/web/crtw_94.txt diff --git a/corpus/crtw_95.txt b/data/web/crtw_95.txt similarity index 100% rename from corpus/crtw_95.txt rename to data/web/crtw_95.txt diff --git a/corpus/crtw_96.txt b/data/web/crtw_96.txt similarity index 100% rename from corpus/crtw_96.txt rename to data/web/crtw_96.txt diff --git a/corpus/crtw_97.txt b/data/web/crtw_97.txt similarity index 100% rename from corpus/crtw_97.txt rename to data/web/crtw_97.txt diff --git a/corpus/crtw_98.txt b/data/web/crtw_98.txt similarity index 100% rename from corpus/crtw_98.txt rename to data/web/crtw_98.txt diff --git a/corpus/crtw_99.txt b/data/web/crtw_99.txt similarity index 100% rename from corpus/crtw_99.txt rename to data/web/crtw_99.txt diff --git a/deepa2-corpus.py b/deepa2-corpus.py deleted file mode 100644 index ddc000a22f07131bd6122cd265e90652b621f14f..0000000000000000000000000000000000000000 --- a/deepa2-corpus.py +++ /dev/null @@ -1,166 +0,0 @@ -# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# TODO: Address all TODOs and remove all explanatory comments -"""Dataset with argument reconstructions (DA2) manually gathered from the literature.""" - -import logging -import json -import os - -logger = logging.getLogger(__name__) - -import datasets # pylint: disable=import-error -from huggingface_hub import hf_hub_download # pylint: disable=import-error - - - - -# Find for instance the citation on arxiv or on the dataset repo/website -_CITATION = """\ -@InProceedings{betz:dataset, -title = {A great new dataset}, -author={Betz, Gregor -}, -year={2020} -} -""" - -_DESCRIPTION = """\ -Dataset with argument reconstructions (DA2) manually gathered from the literature. -""" - -_HOMEPAGE = "" - -_LICENSE = "" - -_URLS = { - "all": ["corpus.zip"], - "books_only": ["corpus.zip"], -} - - -class DeepA2Corpus(datasets.GeneratorBasedBuilder): - """Dataset with argument reconstructions (DA2) manually gathered from the literature.""" - - VERSION = datasets.Version("0.1.0") - - # This is an example of a dataset with multiple configurations. - # If you don't want/need to define several sub-sets in your dataset, - # just remove the BUILDER_CONFIG_CLASS and the BUILDER_CONFIGS attributes. - - # If you need to make complex sub-parts in the datasets with configurable options - # You can create your own builder configuration class to store attribute, inheriting from datasets.BuilderConfig - # BUILDER_CONFIG_CLASS = MyBuilderConfig - - # You will be able to load one or the other configurations in the following list with - # data = datasets.load_dataset('my_dataset', 'first_domain') - # data = datasets.load_dataset('my_dataset', 'second_domain') - BUILDER_CONFIGS = [ - datasets.BuilderConfig(name="all", version=VERSION, description="This part of my dataset covers a first domain"), - datasets.BuilderConfig(name="books_only", version=VERSION, description="NOT IMPLEMENTED YET"), - ] - - DEFAULT_CONFIG_NAME = "all" # It's not mandatory to have a default configuration. Just use one if it make sense. - - def _info(self): - features = datasets.Features( - { - "text": datasets.Value("string"), - } - ) - - return datasets.DatasetInfo( - # This is the description that will appear on the datasets page. - description=_DESCRIPTION, - # This defines the different columns of the dataset and their types - features=features, # Here we define them above because they are different between the two configurations - # If there's a common (input, target) tuple from the features, uncomment supervised_keys line below and - # specify them. They'll be used if as_supervised=True in builder.as_dataset. - # supervised_keys=("sentence", "label"), - # Homepage of the dataset for documentation - homepage=_HOMEPAGE, - # License for the dataset if available - license=_LICENSE, - # Citation for the dataset - citation=_CITATION, - ) - - def _split_generators(self, dl_manager): - # This method is tasked with downloading/extracting the data and defining the splits depending on the configuration - # If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name - - # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS - # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files. - # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive - - #filenames = _URLS[self.config.name] - # - #filepaths = [] - #for filename in filenames: - # logger.info("Downloading %s", filename) - # filepaths.append( - # hf_hub_download( - # repo_id="debatelab/deepa2-harvest", - # repo_type="dataset", - # filename=filename, - # token=True, - # ) - # ) - - return [ - datasets.SplitGenerator( - name=datasets.Split.TRAIN, - # These kwargs will be passed to _generate_examples - gen_kwargs={ - "filepaths": ["corpus"], - "split": datasets.Split.TRAIN, - }, - ), - datasets.SplitGenerator( - name=datasets.Split.VALIDATION, - # These kwargs will be passed to _generate_examples - gen_kwargs={ - "filepaths": [], - "split": datasets.Split.VALIDATION, - }, - ), - datasets.SplitGenerator( - name=datasets.Split.TEST, - # These kwargs will be passed to _generate_examples - gen_kwargs={ - "filepaths": [], - "split": datasets.Split.TEST, - }, - ), - ] - - # method parameters are unpacked from `gen_kwargs` as given in `_split_generators` - def _generate_examples(self, filepaths, split): - # This method handles input defined in _split_generators to yield (key, example) tuples from the dataset. - # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example. - - - for filepath in filepaths: - dataset = datasets.load_dataset("debatelab/deepa2-corpus", datafiles=f"{filepath}/*.txt",split=split) - - - with open(filepath, encoding="utf-8") as f: - for key, row in enumerate(f): - data = json.loads(row) - data = { - k:v for k,v in data.items() - if k in _DA2_FEATURES - } - data["metadata"] = [] - yield key, data