Skip to content

Commit ba25321

Browse files
committed
Update expected evaluation: normalization now flattens Hs
1 parent 5e22a2a commit ba25321

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ucca/normalization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def flatten_scenes(node):
269269
"""
270270
if node.tag == L1Tags.Foundational:
271271
for ps in node.parallel_scenes:
272-
if ps.parallel_scenes:
272+
if ps and all(TOP_CATEGORIES.intersection(edge.tags) for edge in ps.outgoing):
273273
for edge in ps.outgoing:
274274
copy_edge(edge, parent=node)
275275
destroy(edge)

ucca/tests/test_evaluation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@ def test_evaluate_self(create, units, errors, normalize):
299299

300300

301301
@pytest.mark.parametrize("create1, create2, f1", (
302-
(passage1, passage2, {(LABELED, PRIMARY): 0.5, (LABELED, REMOTE): 0.4, (LABELED, IMPLICIT): 1,
303-
(UNLABELED, PRIMARY): 0.75, (UNLABELED, REMOTE): 0.8, (UNLABELED, IMPLICIT): 1,
304-
(WEAK_LABELED, PRIMARY): 7/12, (WEAK_LABELED, REMOTE): 0.8, (WEAK_LABELED, IMPLICIT): 1}),
302+
(passage1, passage2, {(LABELED, PRIMARY): 6/11, (LABELED, REMOTE): 0.4, (LABELED, IMPLICIT): 1,
303+
(UNLABELED, PRIMARY): 9/11, (UNLABELED, REMOTE): 0.8, (UNLABELED, IMPLICIT): 1,
304+
(WEAK_LABELED, PRIMARY): 7/11, (WEAK_LABELED, REMOTE): 0.8, (WEAK_LABELED, IMPLICIT): 1}),
305305
(simple1, simple2, {(LABELED, PRIMARY): 0.6, (LABELED, REMOTE): 0, (LABELED, IMPLICIT): 0,
306306
(UNLABELED, PRIMARY): 1, (UNLABELED, REMOTE): 1, (UNLABELED, IMPLICIT): 0,
307307
(WEAK_LABELED, PRIMARY): 0.8, (WEAK_LABELED, REMOTE): 0, (WEAK_LABELED, IMPLICIT): 0}),

0 commit comments

Comments
 (0)