def __init__(self, attrs=None):
        """Create a Binder object, to hold serialized annotations.

        attrs (list): List of attributes to serialize. 'orth' and 'spacy' are
            always serialized, so they're not required. Defaults to None.
        """
        attrs = attrs or []
        self.attrs = list(attrs)
        # Ensure ORTH is always attrs[0]
        if ORTH in self.attrs:
            self.attrs.pop(ORTH)
        if SPACY in self.attrs:
            self.attrs.pop(SPACY)
        self.attrs.insert(0, ORTH)
        self.tokens = []
        self.spaces = []
        self.strings = set()
def __init__ ( self , attrs = None ) : attrs = attrs or [ ] self . attrs = list ( attrs ) if ORTH in self . attrs : self . attrs . pop ( ORTH ) if SPACY in self . attrs : self . attrs . pop ( SPACY ) self . attrs . insert ( 0 , ORTH ) self . tokens = [ ] self . spaces = [ ] self . strings = set ( )
Create a Binder object, to hold serialized annotations.

        attrs (list): List of attributes to serialize. 'orth' and 'spacy' are
            always serialized, so they're not required. Defaults to None.