write the equals function for entities/Collocation, fix a bug of using duplicating collocation pairs when composing poems