An implementation of Structural Collocation Analysis (https://doi.org/10.1080/01615440.2024.2414259)
Project description
Structural Collocation Analysis
This is a python + sqlite implementation of the method Structural Collocation Analysis as described in Structural reading: Developing the method of Structural Collocation Analysis using a case study on parliamentary reporting and used in Democracy (Not) on Display: A Structural Collocation Analysis of the Mother of All Parliaments’ Reluctance to Broadcast Herself
Installation & Usage
User Installation
You can install the package directly from GitHub using pip:
python -m pip install git+https://github.com/matjoha/sca.git
python -m pip install scolan
Developer Setup
If you want to contribute to the development of SCA, follow these steps:
- Clone the repository:
git clone https://github.com/matjoha/sca.git
cd sca
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows use: .venv\Scripts\activate
- Install the package in editable mode with development dependencies:
python -m pip install -e ".[dev]"
- Install pre-commit hooks:
python -m pip install pre-commit
pre-commit install
pre-commit install --hook-type pre-push
Running Tests
The project uses pytest for testing and maintains 100% code coverage. To run the tests:
pytest
To run tests with coverage report:
pytest --cov=src/sca tests/
To run tests across different Python versions using tox:
tox
Code Quality
The project enforces code quality through:
- Black for code formatting
- isort for import sorting
- pytest for testing
- 100% test coverage requirement
These checks are automatically run through pre-commit hooks and CI/CD pipelines.
Citing SCA
If you use Structural Collocation Analysis in your research, please cite the following article:
@article{Johansson02072024,
author = {Mathias Johansson and Betto van Waarden},
title = {Structural reading: Developing the method of Structural Collocation Analysis using a case study on parliamentary reporting},
journal = {Historical Methods: A Journal of Quantitative and Interdisciplinary History},
volume = {57},
number = {3},
pages = {185-198},
year = {2024},
publisher = {Routledge},
doi = {10.1080/01615440.2024.2414259},
URL = {https://doi.org/10.1080/01615440.2024.2414259},
eprint = {https://doi.org/10.1080/01615440.2024.2414259}
}
License
The code is published under a Creative Commons Attribution-NonCommercial 4.0 International license CC BY-NC 4.0 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scolan-0.0.4.tar.gz.
File metadata
- Download URL: scolan-0.0.4.tar.gz
- Upload date:
- Size: 68.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9d1c677ca213615bf33168f9bc821b7790391e4e8f6204fea0fd88c39889aad
|
|
| MD5 |
94a87e2c46cbe8fa854956131514e799
|
|
| BLAKE2b-256 |
424f3dc5edc4010060e3959044b4276dfd6b51c23b898a63c0e814f9acbb0313
|
File details
Details for the file scolan-0.0.4-py3-none-any.whl.
File metadata
- Download URL: scolan-0.0.4-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab8ee296211a05d3a30f5b3501ea4b63af310da4203f13f8434b91cb62b0fc18
|
|
| MD5 |
fa91d5e50f6e9d27b7cd22b16516f09c
|
|
| BLAKE2b-256 |
8e9e570a344a0ce98731df50841bd490345ffe88d43eb722dda29440886b86a2
|