Skip to main content

Sparv – Språkbanken's Analysis Platform

Sparv is a text analysis tool run from the command line. The documentation can be found here: https://spraakbanken.gu.se/sparv.

Check the changelog to see what's new!

Sparv is developed by Språkbanken. The source code is available under the MIT license.

If you have any questions, problems or suggestions please contact sb-sparv@svenska.gu.se.

Prerequisites

  • A Unix-like environment (e.g. Linux, OS X or Windows Subsystem for Linux) Note: Most of Sparv's features should work in a Windows environment as well, but since we don't do any testing on Windows we cannot guarantee anything.
  • Python 3.10 or newer.

Installation

Sparv is available on PyPI and can be installed using pip or pipx. We recommend using pipx, which will install Sparv in an isolated environment while still making it available to be run from anywhere.

python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install sparv

Now you should be ready to run the Sparv command! Try it by typing sparv --help.

Sparv can be used together with several plugins and third-party software. Please check the Sparv user manual for more details!

Running tests

If you want to run the tests you will need to clone this project from GitHub since the test data is not distributed with pip.

Before cloning the repository with git make sure you have Git Large File Storage installed (apt install git-lfs). Some files will not be downloaded correctly otherwise. If you happen to clone the repository before installing Git Large File Storage you will have to run git lfs fetch in order to update the corpus and annotation files.

Install the dependencies, including the dev dependencies. We recommend that you first set up a virtual environment:

python3 -m venv venv
source venv/bin/activate
pip install -e .[dev]

Now with the virtual environment activated you can run pytest from the sparv directory. You can run particular tests using the provided markers (e.g. pytest -m swe to run the Swedish tests only) or via substring matching (e.g. pytest -k "not slow" to skip the slow tests).

Metadata

Release files for sparv 5.3.1

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 5.3.1
File Size Uploaded
sparv-5.3.1.tar.gz 293.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sparv 5.3.1
File Interpreter ABI Platform
sparv-5.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 655.4 kB

Release files / sparv-5.3.1.tar.gz

Download URL sparv-5.3.1.tar.gz
Size 293.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7afc6358afb6ab05da4b26f4cef37feb888c6326afd53c88ff27189e686e2feb
BLAKE2b-256 checksum
How to use checksums
cdd5d1d364e84d9d15c1904ee15007169732312ee7853f092a7d02f3a46b3443
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release files / sparv-5.3.1-py3-none-any.whl

Download URL sparv-5.3.1-py3-none-any.whl
Size 362.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
debae4fa36c685ba6fe2070a510b0700d8070944d1f565e36361ea07c2248e58
BLAKE2b-256 checksum
How to use checksums
7043f694a30a43d973f14f33d59a3c097e9e14de91821b9bda57213f62c4bf94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release history Release notifications | RSS feed

This release

5.3.1 This release

2 release files

5.3.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