how to add header when using a parser I trained rather than provided by conllu #22
-
Hi,
But how to do the same if I trained a parser myself and want to include a header? The document does not seem to have explicitly said how to do so, like in:
Thank you so much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @toufiglu thanks for the question. If you load your own spaCy model, you'll need to add the spacy_conll component separately, like so: nlp = spacy.load(...) # load your own trained parser
# add spacy_conll
config = {"include_headers": True}
nlp.add_pipe("conll_formatter", config=config, last=True)
# parse
doc = nlp ("كنت كتعصب فاش مكتبغيش تصيب ليك")
print (doc._.conll_pd) This is described in Usage. |
Beta Was this translation helpful? Give feedback.
Hi @toufiglu thanks for the question. If you load your own spaCy model, you'll need to add the spacy_conll component separately, like so:
This is described in Usage.