Skip to main content

Språkbanken's analysis platform

Project description

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

Project details


Download files

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

Source Distribution

sparv-5.3.1.tar.gz (293.3 kB view details)

Uploaded Source

Built Distribution

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

sparv-5.3.1-py3-none-any.whl (362.1 kB view details)

Uploaded Python 3

File details

Details for the file sparv-5.3.1.tar.gz.

File metadata

  • Download URL: sparv-5.3.1.tar.gz
  • Upload date:
  • Size: 293.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for sparv-5.3.1.tar.gz
Algorithm Hash digest
SHA256 7afc6358afb6ab05da4b26f4cef37feb888c6326afd53c88ff27189e686e2feb
MD5 da765f2bc556e30414b0691ef0e38eee
BLAKE2b-256 cdd5d1d364e84d9d15c1904ee15007169732312ee7853f092a7d02f3a46b3443

See more details on using hashes here.

File details

Details for the file sparv-5.3.1-py3-none-any.whl.

File metadata

  • Download URL: sparv-5.3.1-py3-none-any.whl
  • Upload date:
  • Size: 362.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for sparv-5.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 debae4fa36c685ba6fe2070a510b0700d8070944d1f565e36361ea07c2248e58
MD5 82c84cf418b3294211b32dbf1608f010
BLAKE2b-256 7043f694a30a43d973f14f33d59a3c097e9e14de91821b9bda57213f62c4bf94

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