Skip to content

v5.0.0 spacy-stanza removed, bug fixes, tooling updated, conll-u-plus support

Latest

Choose a tag to compare

@BramVanroy BramVanroy released this 26 Nov 13:00
a1949ed

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-stanza pins stanza<1.7, which cannot load models with current versions of torch.
  • init_parser takes formatter options in formatter_config instead of **kwargs.
  • parse_text_as_conll and parse_file_as_conll take keyword-only options. no_force_counting is now renumber_sent_ids and no_split_on_newline is now split_on_newline, both True by default. File encodings default to UTF-8.
  • The CLI options use hyphens, for example --input-file and --include-headers.
  • The formatter writes DEPREL root for 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 SpacesAfter or SpacesBefore.

New

  • CoNLL-U Plus: the formatter option columns and the CLI option --columns write the selected columns with a # global.columns header. The reader accepts that header and writes the doc back with the same columns.
  • strict=False in parse_conll_text_as_spacy reads CoNLL-U without HEAD and DEPREL.
  • sent_ids in parse_text_as_conll and --sent-ids-file in the CLI set your own sentence IDs.
  • conll_pd is computed on access, so docs can be saved in a DocBin and n_process > 1 works with pandas.

Fixes

  • The CLI crashed on every run in 4.0.x (#30).
  • Adding conll_formatter failed 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