Repository navigation
Tooling
- Packaging with hatchling and uv. The version comes from git tags.
- ruff for linting and formatting, pre-commit, and pytest with coverage (doctests included).
- GitHub Actions for CI (Python 3.11 to 3.14), versioned docs with MkDocs and mike on GitHub Pages, and PyPI trusted publishing on release. Dependabot and codecov are configured.
- Python 3.11 or newer and spaCy 3.8 or newer are required.
Breaking changes
- The stanza backend is removed.
spacy-stanzapinsstanza<1.7, which cannot load models with current versions of torch. init_parsertakes formatter options informatter_configinstead of**kwargs.parse_text_as_conllandparse_file_as_conlltake keyword-only options.no_force_countingis nowrenumber_sent_idsandno_split_on_newlineis nowsplit_on_newline, bothTrueby default. File encodings default to UTF-8.- The CLI options use hyphens, for example
--input-fileand--include-headers. - The formatter writes DEPREL
rootfor the root token, as UD requires, and_in HEAD and DEPREL for tokens without a head. - Whitespace tokens get no token line. Their whitespace goes to MISC as
SpacesAfterorSpacesBefore.
New
- CoNLL-U Plus: the formatter option
columnsand the CLI option--columnswrite the selected columns with a# global.columnsheader. The reader accepts that header and writes the doc back with the same columns. strict=Falseinparse_conll_text_as_spacyreads CoNLL-U without HEAD and DEPREL.sent_idsinparse_text_as_conlland--sent-ids-filein the CLI set your own sentence IDs.conll_pdis computed on access, so docs can be saved in aDocBinandn_process > 1works with pandas.
Fixes
- The CLI crashed on every run in 4.0.x (#30).
- Adding
conll_formatterfailed config validation with recent spaCy versions. - Newlines and tabs in the input gave invalid CoNLL-U (#35).
- MISC values that were read from CoNLL-U were overwritten when the doc was written again.
- Several crashes on empty input.
Bumps
- Bump astral-sh/setup-uv from 10.3.1 to 10.4.0 in the actions group by @dependabot[bot] in #41
Full Changelog: v4.0.1...v5.0.0