Skip to content

Redundant check in the code #6

Description

@kovvalsky

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;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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