def to_bytes(self, **kwargs):
return srsly.msgpack_dumps(self.patterns)<EOL>
Serialize the entity ruler patterns to a bytestring.

        RETURNS (bytes): The serialized patterns.

        DOCS: https://spacy.io/api/entityruler#to_bytes