def __getstate__(self):
        """Get state."""
        state = self.__dict__
        return {
            "regex": [regex.pattern for regex in state['regex']],
            "compositeof": [text_type(s) for s in state['compositeof']],
            "fieldcodes": state['fieldcodes'],
            "concept": state['concept'],
            "core": state['core'],
            "spires": state['spires'],
            "_KeywordToken__hash": state['_KeywordToken__hash'],
            "type": state['type'],
            "nostandalone": state['nostandalone'],
            "_composite": state['_composite'],
            "id": state['id'],
        }
def __getstate__ ( self ) : state = self . __dict__ return { "regex" : [ regex . pattern for regex in state [ 'regex' ] ] , "compositeof" : [ text_type ( s ) for s in state [ 'compositeof' ] ] , "fieldcodes" : state [ 'fieldcodes' ] , "concept" : state [ 'concept' ] , "core" : state [ 'core' ] , "spires" : state [ 'spires' ] , "_KeywordToken__hash" : state [ '_KeywordToken__hash' ] , "type" : state [ 'type' ] , "nostandalone" : state [ 'nostandalone' ] , "_composite" : state [ '_composite' ] , "id" : state [ 'id' ] , }
Get state.