Skip to content

Commit

Permalink
Added special behavior for 'BAD ANNOTATION' adjudication flags
Browse files Browse the repository at this point in the history
  • Loading branch information
hbredin committed Oct 27, 2010
1 parent d352704 commit b87c16f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def eval_events(reference_events, submission_events, skipTwoDaysEvents, fingerpr
hole.dtStart = prev_event.dtEnd
hole.dtEnd = next_event.dtStart
hole.id = -1
hole.adjudication = ""
holes.append(hole)

# add a hole at the beginning if submitted events starts before first reference event
Expand All @@ -91,6 +92,7 @@ def eval_events(reference_events, submission_events, skipTwoDaysEvents, fingerpr
hole.dtStart = first_sub_event.dtStart
hole.dtEnd = first_ref_event.dtStart
hole.id = -1
hole.adjudication = ""
holes.append(hole)

# add a hole at the end if submitted events ends after last reference event
Expand All @@ -101,6 +103,7 @@ def eval_events(reference_events, submission_events, skipTwoDaysEvents, fingerpr
hole.dtStart = last_ref_event.dtEnd
hole.dtEnd = last_sub_event.dtEnd
hole.id = -1
hole.adjudication = ""
holes.append(hole)

# add holes
Expand All @@ -112,6 +115,18 @@ def eval_events(reference_events, submission_events, skipTwoDaysEvents, fingerpr
# for each event in reference
for cur_event in filled_reference_events:

if cur_event.adjudication == "BAD ANNOTATION":
if verbosity > 1:
print cur_event.description() + " ==> BAD ANNOTATION"
e.number = e.number - 1
cur_event.id = -1

# if cur_event.adjudication == "DOUBLE ANNOTATION":
# if verbosity > 1:
# print cur_event.description() + " ==> SKIP (DOUBLE ANNOTATION)"
# e.number = e.number - 1
# continue

# check if reference event is fully included in one calendar day
# if it is not and user specifically asked not to evaluate this kind of events, skip it
if cur_event.isFullyIncludedInOneCalendarDay() == False:
Expand Down

0 comments on commit b87c16f

Please sign in to comment.