Installing Conc
Conc is tested with Python 3.10+. Before installing Conc, create a new environment (with venv, conda or similiar).
Install via pip
You can install Conc from pypi using this command:
pip install conc
Add the -U
flag to upgrade if you are already running Conc.
Install a spaCy model for tokenization
Conc uses a SpaCy language model for tokenization. After installing Conc, install a model. If you are working with English-language texts, install SpaCy’s small English model (which is Conc’s default) like this:
python -m spacy download en_core_web_sm
If you are working with a different language or want to use a different ‘en’ model, check the SpaCy models documentation for the relevant model name.
Install the development version
The Github site may be ahead of the Pypi version, so for latest functionality install from Github. The Github code is pre-release and may change. The documentation reflects the most recent functionality.
To install the pre-release/development version of Conc, which will be ahead of the version on Pypi, you can install from the repository:
pip install git+https://github.com/polsci/conc.git
Install optional dependencies
Conc has some optional dependencies you can install to download source texts to create sample corpora. These are primarily intended for creating corpora for development. To minimize Conc’s requirements these are not installed by default. If you want to get sample corpora to test out Conc’s functionality you can install these with the following command.
pip install nltk requests datasets
Pre-2013 CPU? Install Polars with support for older machines
Polars is optimized for modern CPUs with support for AVX2 instructions. If you get kernel crashes running Conc on an older machine (probably pre-2013), this is likely to be an issue with Polars. Polars has an alternate installation option to support older machines, which installs a Polars build compiled without AVX2 support. Replace the standard Polars package with the legacy-support package to use Conc on older machines.
pip uninstall polars
pip install polars-lts-cpu