From 7d20fa8e64faa6dd85ef20b9a4d4f1a79f7af47d Mon Sep 17 00:00:00 2001 From: Alexandre Quemy Date: Thu, 17 Feb 2022 09:35:11 +0100 Subject: [PATCH] Adjust the datasett creation to use base_article #186 --- echr/steps/generate_datasets.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/echr/steps/generate_datasets.py b/echr/steps/generate_datasets.py index 5f0e54f..304bf18 100644 --- a/echr/steps/generate_datasets.py +++ b/echr/steps/generate_datasets.py @@ -236,16 +236,16 @@ def run(console, build, title, doc_ids=None, articles=[], processed_folder='all' ccl = c[conclusion_key] for e in ccl: if e['type'] in ['violation', 'no-violation']: - if e['article'] not in outcomes: - outcomes[e['article']] = { + if e['base_article'] not in outcomes: + outcomes[e['base_article']] = { 'violation': 0, 'no-violation': 0, 'total': 0 } # if e['article'] == '8' and e['type'] == 'no-violation': # print(c['docname']) - outcomes[e['article']][e['type']] += 1 - outcomes[e['article']]['total'] += 1 + outcomes[e['base_article']][e['type']] += 1 + outcomes[e['base_article']]['total'] += 1 # Determine output encoded_outcomes = {} count = 1