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

Redundant check in the code #6

Open
kovvalsky opened this issue Oct 29, 2019 · 1 comment
Open

Redundant check in the code #6

kovvalsky opened this issue Oct 29, 2019 · 1 comment

Comments

@kovvalsky
Copy link
Member

If left.getLeft().isFunctor() is true than left.getLeft().isNounOrNP() is false, right?

@Override
public boolean canApply(Category left, Category right)
{
if (left.isFunctor() && right.isFunctor() && left.getLeft().isFunctor()) {
Category leftLeft = left.getLeft();
return right.getRight().matches(leftLeft.getLeft()) && leftLeft.getSlash() == leftSlash && right.getSlash() == rightSlash
&& !(english && left.getLeft().isNounOrNP()); // Additional constraint from Steedman (2000)
} else {
return false;
}
}

@texttheater
Copy link

True. Seems this was copy and pasted from BackwardComposition – here, in the case of GeneralizedBackwardComposition, left should probably be changed to leftLeft on line 524. But would have to find the rule restriction in Steedman (2000) to be completely sure. :)

@kovvalsky kovvalsky changed the title Rudundant check in the code Redundant check in the code Oct 31, 2019
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