Skip to main content

sparv-sbx-corpus-statistics

PyPI version PyPI license PyPI - Python Version

Maturity badge - level 2 Stage

codecov

CI(check) CI(release) CI(scheduled) CI(test)

A Sparv plugin to collect statistics about a corpus.

Install

First, install Sparv as suggested,

with pipx:

pipx install sparv

or, with uv-pipx:

uvpipx install sparv

Then install sparv-sbx-corpus-statistics with,

the suggested method:

sparv plugins install sparv-sbx-corpus-statistics

or, if you used pipx above:

pipx inject sparv sparv-sbx-corpus-statistics

or, if you used uv-pipx above:

uvpipx install sparv-sbx-corpus-statistics --inject sparv

Usage

To use this plugin add sbx_corpus_statistics:stat_highlights under export.default in your config.yaml

export:
  default:
    - xml_export:pretty
    - sbx_corpus_statistics:stat_highlights
    # - more exports

Minimum Supported Python Version Policy

The Minimum Supported Python Version is fixed for a given minor (1.x) version. However it can be increased when bumping minor versions, i.e. going from 1.0 to 1.1 allows us to increase the Minimum Supported Python Version. Users unable to increase their Python version can use an older minor version instead. Below is a list of sparv-sbx-corpus-statistics versions and their Minimum Supported Python Version:

  • v0.1: Python 3.11.

Note however that sparv-sbx-corpus-statistics also has dependencies, which might have different MSRV policies. We try to stick to the above policy when updating dependencies, but this is not always possible.

Changelog

This project keeps a changelog.

License

This repository is licensed under the MIT license.

Development

Development prerequisites

For starting to develop on this repository:

  • Clone the repo (in one of the ways below):
    • git clone git@github.com:spraakbanken/sparv-sbx-corpus-statistics.git
    • git clone https://github.com/spraakbanken/sparv-sbx-corpus-statistics.git
  • Setup environment: make dev
  • Install pre-commit hooks: pre-commit install

Do your work.

Tasks to do:

  • Test the code with make test or make test-w-coverage.
  • Lint the code with make lint.
  • Check formatting with make check-fmt.
  • Format the code with make fmt.
  • Type-check the code with make type-check.
  • Test the examples with:
    • make test-example-small-txt

This repo uses conventional commits.

Release a new version

[!NOTE] Requirements bump-my-version for make bumpversion, install with uv tool install bump-my-version. git-cliff for make prepare-release sparv-sbx-metadata for make generate-metadata, installed automaticly.

  • Prepare the CHANGELOG: make prepare-release.
  • Edit CHANGELOG.md to your liking. Keep the header [unreleased]
  • Add to git: git add --update
  • Commit with git commit -m 'chore(release): prepare release' or cog commit chore 'prepare release' release.
  • Bump version (depends on `bump-my-version)
    • Major: make bumpversion part=major
    • Minor: make bumpversion part=minor
    • Patch: make bumpversion part=patch or make bumpversion
  • Push main and tags to GitHub: git push main --tags or make publish
  • Add metadata for Språkbanken's resource

Metadata

Release files for sparv-sbx-corpus-statistics 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sparv-sbx-corpus-statistics 0.2.0
File Size Uploaded
sparv_sbx_corpus_statistics-0.2.0.tar.gz 19.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sparv-sbx-corpus-statistics 0.2.0
File Interpreter ABI Platform
sparv_sbx_corpus_statistics-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 40.7 kB

Release files / sparv_sbx_corpus_statistics-0.2.0.tar.gz

Download URL sparv_sbx_corpus_statistics-0.2.0.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5ed61a6df9765c11ca559193d012a303c74fe5cb1cb6e04c4520dbcaecef64e0
BLAKE2b-256 checksum
How to use checksums
989268fc444f3d25997a22fdcf6bb966281fed795facf706868966df6ec23f96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 17, 2026.

Transparency log

Release files / sparv_sbx_corpus_statistics-0.2.0-py3-none-any.whl

Download URL sparv_sbx_corpus_statistics-0.2.0-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
346233a269c4794eae56972a08b0a6f844b57824ce6a838031a6330e4e811daa
BLAKE2b-256 checksum
How to use checksums
c94aeb8e7ae3f8496409230e0833471f0c4910b676263454afc1800fc13dced9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page