parse_conll()
Build documents from CoNLL content.
Usage
parse_conll(
content, *, scheme="bio", repair=False, text=None, comment_prefix=None
)Parameters
content: str-
The file content.
scheme: Scheme = "bio"-
The tag scheme:
"bio"(IOB2),"iob1","bioes"or"bilou". repair: bool = False-
Accept invalid tag sequences (e.g.
I-XafterO) by starting a new entity there, instead of raising. text: str | None = None-
The true raw text, if known. Tokens are aligned onto it (only whitespace may lie between them) and offsets refer to it. Only for content with exactly one document.
comment_prefix: str | None = None-
Treat lines starting with this prefix (e.g.
"#") as comments. A commentdoc_id = Xornewdoc id = Xstarts a new document with IDX; other comments are kept inmetadata["conll_comments"]. Off by default, since#can also be a token.