Skip to content

Commit

Permalink
Adjust the datasett creation to use base_article #186
Browse files Browse the repository at this point in the history
  • Loading branch information
aquemy committed Feb 17, 2022
1 parent 910dc4d commit 16c02e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions echr/steps/generate_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 16c02e3

Please sign in to comment.