def parse_ents(doc, options={}):
ents = [<EOL>{"<STR_LIT:start>": ent.start_char, "<STR_LIT:end>": ent.end_char, "<STR_LIT:label>": ent.label_}<EOL>for ent in doc.ents<EOL>]<EOL>if not ents:<EOL><INDENT>user_warning(Warnings.W006)<EOL><DEDENT>title = doc.user_data.get("<STR_LIT:title>", None) if hasattr(doc, "<STR_LIT>") else None<EOL>settings = get_doc_settings(doc)<EOL>return {"<STR_LIT:text>": doc.text, "<STR_LIT>": ents, "<STR_LIT:title>": title, "<STR_LIT>": settings}<EOL>
Generate named entities in [{start: i, end: i, label: 'label'}] format.

    doc (Doc): Document do parse.
    RETURNS (dict): Generated entities keyed by text (original text) and ents.