Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Possible BUG] Span Distance Calculation #2

Open
gstoica27 opened this issue Oct 6, 2020 · 0 comments
Open

[Possible BUG] Span Distance Calculation #2

gstoica27 opened this issue Oct 6, 2020 · 0 comments

Comments

@gstoica27
Copy link

gstoica27 commented Oct 6, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant