+
+ def __eq__(self, other: Any) -> bool:
+ if not isinstance(other, SpecialPhrase):
+ return False
+
+ return self.p_label == other.p_label \
+ and self.p_class == other.p_class \
+ and self.p_type == other.p_type \
+ and self.p_operator == other.p_operator
+
+ def __hash__(self) -> int:
+ return hash((self.p_label, self.p_class, self.p_type, self.p_operator))