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

ForwardEvaluator Bug #18

Open
rubby33 opened this issue Apr 3, 2017 · 1 comment
Open

ForwardEvaluator Bug #18

rubby33 opened this issue Apr 3, 2017 · 1 comment

Comments

@rubby33
Copy link

rubby33 commented Apr 3, 2017

In the class "ForwardEvaluator" in the evaluator.py, there is a function:
class ForwardEvaluator(Evaluator):

    def _get2(context, xi, span):
        if len(xi) <= span[0][0]:
            return ""
        if len(xi[span[0][0]]) <= span[1][1]: 
            return ""
        return get_phrase(context, xi, span)

I think
if len(xi[span[0][0]]) <= span[1][1]:
should be
if len(xi[span[0][0]]) <span[1][1]:

In some cases, len(xi[span[0][0]]) is equal to span[1][1], e.g., the answer is from somewhere to the end of context.

@seominjoon
Copy link
Contributor

seominjoon commented Apr 3, 2017

I think you are right. In fact, I will change it to new_span[1][1] = min(len(xi[span[0][0]), span[1][1]) so that it won't output "" just because it extends one more word for some reason. I will let you know if this makes any change to the results. Thanks!

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

2 participants