Skip to main content

Språkbanken's Sparv Pipeline

The Sparv pipeline is a corpus annotation tool run from the command line. The documentation can be found here: https://spraakbanken.gu.se/sparv/docs.

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 things within Sparv should work in a Windows environment as well but we cannot guarantee anything since we do not test our software on Windows.
  • Python 3.6.1 or newer
  • Java (if you want to run Swedish dependency parsing, Swedish word sense disambiguation or the Stanford Parser)

Installation

The Sparv pipeline can be installed using pip. We even recommend using pipx so that you can install the sparv command globally:

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

Alternatively you can install Sparv from the latest release from GitHub:

pipx install https://github.com/spraakbanken/sparv-pipeline/archive/latest.tar.gz

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

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

Roadmap

  • Export of corpus metadata to META-SHARE format
  • Support for Swedish historic texts
  • Support for parallel corpora
  • Preprocessing of indata with automatic chunking

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.

We recommend that you set up a virtual environment and install the dependencies (including the dev dependencies) listed in setup.py:

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-pipeline 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).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sparv-pipeline-4.0.0.tar.gz (193.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sparv_pipeline-4.0.0-py3-none-any.whl (235.8 kB view details)

Uploaded Python 3

File details

Details for the file sparv-pipeline-4.0.0.tar.gz.

File metadata

  • Download URL: sparv-pipeline-4.0.0.tar.gz
  • Upload date:
  • Size: 193.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for sparv-pipeline-4.0.0.tar.gz
Algorithm Hash digest
SHA256 ba5dbdd3245b00916124df03fe5b722cc4fe53522c441d20ac8336adab7a40d1
MD5 f3b0c9fd13469160ca308da1c9c854ee
BLAKE2b-256 0899cf0f4e83634aab08ab23c692d32f1eb3693b94a8d2718363d6e26f0dbec2

See more details on using hashes here.

File details

Details for the file sparv_pipeline-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: sparv_pipeline-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 235.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for sparv_pipeline-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a11fbbbb61e0fb4b34145a6d0dbad36d75cbf256bd91c936939f2c3f0de40cbf
MD5 6d759892c1aa4d25bdb5b7c1adf23f49
BLAKE2b-256 46e5b7648a58923594cce2ed82415464cfe2d35b86bf191a665959b3ba8ebe2e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page