<jupyter_start><jupyter_text>Enrich a DTA-TCF document<jupyter_code>import spacy
from enrich.tfc import Tcf
from enrich.spacy_utils.ner import fetch_ner_samples, format_iob_tag
from enrich.custom_renderers import doc_to_tokenlist
from enrich.custom_parsers import process_tokenlist
file = "data/nn_nrhz001_1848.tcf.xml"
# file = "http://www.deutschestextarchiv.de/book/download_fulltcf/31732"
tcf = Tcf(file)
words = tcf.create_tokenlist()
nlp = spacy.load('de_core_news_sm')
enriched_doc = process_tokenlist(nlp, words)
for name, proc in nlp.pipeline[1:]:
    enriched_doc = proc(enriched_doc)
TRAIN_SET = fetch_ner_samples(enriched_doc)
TRAIN_SET[71]
len(TRAIN_SET)<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup