def spacy2dict(self, doc: spacy.tokens.Doc, fields: List[str] = None) -> List[Dict[Any, Any]]:
if fields is None:<EOL><INDENT>fields = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:text>']<EOL><DEDENT>return [{field: getattr(token, field) for field in fields} for token in doc]<EOL>
Convert SpaCy doc into list of tokens with `fields` properties only