UCDP-AEC

Models and data for the UCDP Abstractive Event analysis Corpus paper
git clone https://esimon.eu/repos/UCDP-AEC.git
Log | Files | Refs | README | LICENSE

aec_setup.py (968B)


      1 """Define a simple template for generative models."""
      2 
      3 transformer = "google/flan-t5-small"
      4 
      5 dataset = {
      6     "name": "UCDP-AEC",
      7     "processing": "generative",
      8     "tokenizer": transformer,
      9     "input_template": """
     10 {source_date} <extra_id_0>
     11 {source_article}
     12 """.strip(),
     13     "output_template": """
     14 side A: {side_a_name} <extra_id_0>
     15 side B: {side_b_name} <extra_id_0>
     16 start date: {start_date} <extra_id_0>
     17 end date: {end_date} <extra_id_0>
     18 country: {location_root_name} <extra_id_0>
     19 ADM1: {location_adm1_name} <extra_id_0>
     20 ADM2: {location_adm2_name} <extra_id_0>
     21 where: {location_where_name} <extra_id_0>
     22 deaths side A: {deaths_side_a} <extra_id_0>
     23 deaths side B: {deaths_side_b} <extra_id_0>
     24 deaths civilian: {deaths_civilian} <extra_id_0>
     25 deaths unknown: {deaths_unknown} <extra_id_0>
     26 deaths low: {deaths_low} <extra_id_0>
     27 deaths high: {deaths_high}
     28 """.strip().replace("\n", " "),
     29 }
     30 
     31 model = {
     32     "transformer": transformer,
     33     "generation_max_length": 150,
     34 }