ArneBinder / dialam-2024-shared-task

see http://dialam.arg.tech/
0 stars 0 forks source link

Sort l-nodes by hierarchy during visualization #13

Closed ArneBinder closed 5 months ago

ArneBinder commented 5 months ago

This implements sort_nodes_by_hierarchy:

Sort nodes in reversed depth-first order. The nodes are sorted in such a way that parents
are always before children.

Args:
    node_ids (Collection[str]): List of ids of nodes to sort.
    edges (Collection[Edge]): List of edges.

Returns:
    List[str]: List of sorted node ids.

This is used in create_visualization() to sort the L-nodes.

Edit: we also sort the I-nodes by the order of the anchoring L-nodes.

ArneBinder commented 5 months ago

result for nodeset 23594: nodeset23594 gv

and for 21388 (indirect speech in L-node 713357): nodeset21388 gv