public override Dictionary <object, CCGCategory> CanUnify(CCGCategory other) { PrimitiveCategory primitiveCategory = (PrimitiveCategory)other; if (!other.IsPrimitive()) { return(null); } if (other.IsVar()) { return new Dictionary <object, CCGCategory>() { { other, this } } } ; if (primitiveCategory.Categ == Categ) { foreach (var item in Restrictions) { if (!primitiveCategory.Restrictions.Contains(item)) { return(null); } } return(new Dictionary <object, CCGCategory>()); } return(null); }
public override Dictionary <object, CCGCategory> CanUnify(CCGCategory other) { if (other.IsPrimitive() || !PrimOnly) { return(new Dictionary <object, CCGCategory>() { { this, other } }); } return(null); }