def parse_deps(orig_doc, options={}):
doc = Doc(orig_doc.vocab).from_bytes(orig_doc.to_bytes())<EOL>if not doc.is_parsed:<EOL><INDENT>user_warning(Warnings.W005)<EOL><DEDENT>if options.get("<STR_LIT>", False):<EOL><INDENT>with doc.retokenize() as retokenizer:<EOL><INDENT>for np in list(doc.noun_chunks):<EOL><INDENT>attrs = {<EOL>"<STR_LIT>": np.root.tag_,<EOL>"<STR_LIT>": np.root.lemma_,<EOL>"<STR_LIT>": np.root.ent_type_,<EOL>}<EOL>retokenizer.merge(np, attrs=attrs)<EOL><DEDENT><DEDENT><DEDENT>if options.get("<STR_LIT>", True):<EOL><INDENT>spans = []<EOL>for word in doc[:-<NUM_LIT:1>]:<EOL><INDENT>if word.is_punct or not word.nbor(<NUM_LIT:1>).is_punct:<EOL><INDENT>continue<EOL><DEDENT>start = word.i<EOL>end = word.i + <NUM_LIT:1><EOL>while end < len(doc) and doc[end].is_punct:<EOL><INDENT>end += <NUM_LIT:1><EOL><DEDENT>span = doc[start:end]<EOL>spans.append((span, word.tag_, word.lemma_, word.ent_type_))<EOL><DEDENT>with doc.retokenize() as retokenizer:<EOL><INDENT>for span, tag, lemma, ent_type in spans:<EOL><INDENT>attrs = {"<STR_LIT>": tag, "<STR_LIT>": lemma, "<STR_LIT>": ent_type}<EOL>retokenizer.merge(span, attrs=attrs)<EOL><DEDENT><DEDENT><DEDENT>if options.get("<STR_LIT>"):<EOL><INDENT>words = [{"<STR_LIT:text>": w.text, "<STR_LIT>": w.tag_} for w in doc]<EOL><DEDENT>else:<EOL><INDENT>words = [{"<STR_LIT:text>": w.text, "<STR_LIT>": w.pos_} for w in doc]<EOL><DEDENT>arcs = []<EOL>for word in doc:<EOL><INDENT>if word.i < word.head.i:<EOL><INDENT>arcs.append(<EOL>{"<STR_LIT:start>": word.i, "<STR_LIT:end>": word.head.i, "<STR_LIT:label>": word.dep_, "<STR_LIT>": "<STR_LIT:left>"}<EOL>)<EOL><DEDENT>elif word.i > word.head.i:<EOL><INDENT>arcs.append(<EOL>{<EOL>"<STR_LIT:start>": word.head.i,<EOL>"<STR_LIT:end>": word.i,<EOL>"<STR_LIT:label>": word.dep_,<EOL>"<STR_LIT>": "<STR_LIT:right>",<EOL>}<EOL>)<EOL><DEDENT><DEDENT>return {"<STR_LIT>": words, "<STR_LIT>": arcs, "<STR_LIT>": get_doc_settings(orig_doc)}<EOL>
Generate dependency parse in {'words': [], 'arcs': []} format.

    doc (Doc): Document do parse.
    RETURNS (dict): Generated dependency parse keyed by words and arcs.