Skip to content

[Possible BUG] Span Distance Calculation #2

@gstoica27

Description

@gstoica27

Hi, thanks a lot for your work and dataset release!

I was looking at the "group_overview" jupyter notebook to investigate model errors, and noticed that in the "SPAN_DISTANCE" function under "tacrev/analysis/erudite/prim_funcs.py" (line 87), the following is listed:

def SPAN_DISTANCE(span1: Tuple[int, int], span2: Tuple[int, int], absolute=False) -> str:
    """
    The distance between two spans
    """
    output = None
    try:
        output = span2[0] - span1[0]
    except Exception as e:
        ex = Exception(f"Unknown exception from [ SPAN_DISTANCE ]: {e}")
        raise(ex)
    else:
        return output

I may be wrong, but this appears to be computing the distances between span beginnings, rather than between the spans themselves. Should it instead be:

def SPAN_DISTANCE(span1: Tuple[int, int], span2: Tuple[int, int], absolute=False) -> str:
    """
    The distance between two spans
    """
    output = None
    try:
        output = span2[0] - span1[1]

    except Exception as e:
        ex = Exception(f"Unknown exception from [ SPAN_DISTANCE ]: {e}")
        raise(ex)
    else:
        return output

?

I.e. computing the distance between the end of the first span and the beginning of the second instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions