Skip to main content

A Python library for efficient corpus analysis, enabling corpus linguistic analysis in Jupyter notebooks.

Project description

Conc

Introduction to Conc

Conc is a Python library that brings tools for corpus linguistic analysis to Jupyter notebooks. Conc aims to allow researchers to analyse large corpora in efficient ways using standard hardware, with the ability to produce clear, publication-ready reports and extend analysis where required using standard Python libraries.

Example Concordance

A staple of data science, Jupyter notebooks allow researchers to present their analysis in an interactive form that combines code, reporting and discussion. They are an ideal format for collaborating with other researchers during research or to share analysis in a way others can reproduce and interact with.

Conc uses spaCy for tokenising texts. SpaCy functionality to annotate texts will be supported soon.

Conc uses well-supported Python libraries for processing data and prioritises the fastest code libraries and data structures. The library produces clear reports with important information to interpret result by default. Conc makes it easy to extend analysis using other libraries or software. Conc’s corpus format is well-documented and there are code examples to help you work with Conc results and data structures outside of Conc if you want to extend your analysis.

Conc’s documentation site has more information on Conc, why it was developed and the principles guiding Conc’s development.

Table of Contents

Direct links to Conc documentation

Acknowledgements

Conc is developed by Dr Geoff Ford.

Work to create this Python library has been made possible by funding/support from:

  • “Mapping LAWS: Issue Mapping and Analyzing the Lethal Autonomous Weapons Debate” (Royal Society of New Zealand’s Marsden Fund Grant 19-UOC-068)
  • “Into the Deep: Analysing the Actors and Controversies Driving the Adoption of the World’s First Deep Sea Mining Governance” (Royal Society of New Zealand’s Marsden Fund Grant 22-UOC-059)
  • Sabbatical, University of Canterbury, Semester 1 2025.

Thanks to the Mapping LAWS project team for their support and feedback as first users of ConText (a web-based application built on an earlier version of Conc).

Dr Ford is a researcher with Te Pokapū Aronui ā-Matihiko | UC Arts Digital Lab (ADL). Thanks to the ADL team and the ongoing support of the University of Canterbury’s Faculty of Arts who make work like this possible.

Thanks to Dr Chris Thomson and Karin Stahel for their feedback on early versions of Conc.

Development Status

Conc is in active development. It is currently released for beta testing. See the CHANGELOG for notes on releases and the Roadmap for planned updates.

Although this is a Beta release, I’m currently using Conc for research and postgraduate teaching. I’m keen to support new users. If you have any questions, encounter hurdles using Conc or have feature requests, create an issue.

Installation

Installing Conc is simple. Below is the essential information if you want to use Conc. The installation page has more information. You can also install the development version of Conc, which may include new functionality and bug fixes. If you want to download sample corpora you will need to install optional dependencies. If you have an older computer with a pre-2013 CPU, you will probably need to install a version of Polars compiled for older machines, see the install page for details.

1. Install via pip

Conc is tested with Python 3.10+. You can install Conc from pypi using this command:

pip install conc

Add the -U flag to upgrade if you are already running Conc.

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

Using Conc

Getting started

A good place to start is the Get started with Conc tutorial, which demonstrates how to build a corpus and output Conc reports. There are also simple code recipes for common Conc tasks.

Conc Documentation

There is a dedicated Conc documentation site. This includes tutorials, examples demonstrating how to create reports for analysis, explanation of Conc functionality and its Corpus format, and a reference to Conc’s classes and methods. Here are links to the documentation site sections:

  • Tutorials to get you started with Conc
  • The Explanations section includes information on how Conc works, how to work with the Conc corpus format and Conc results with other Python libraries
  • The Conc API Reference provides detailed documentation of Conc classes and functions
  • The Development section gives information on Conc development, including a Roadmap and Developer’s Guide

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

conc-0.1.7.tar.gz (60.1 kB view details)

Uploaded Source

Built Distribution

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

conc-0.1.7-py3-none-any.whl (63.9 kB view details)

Uploaded Python 3

File details

Details for the file conc-0.1.7.tar.gz.

File metadata

  • Download URL: conc-0.1.7.tar.gz
  • Upload date:
  • Size: 60.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for conc-0.1.7.tar.gz
Algorithm Hash digest
SHA256 adf75ff44b02f6f1b35b7f3266fb2933b0a38b66b11ef9ff8d1be631f5690bd5
MD5 a7525ad9fdc8c540b2a3896668cb6021
BLAKE2b-256 fda21adeeae5876f9469070bd6ae4deecef01e1261054e32481adfbaea3a8ca6

See more details on using hashes here.

File details

Details for the file conc-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: conc-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 63.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for conc-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b856ad0b53672d081050ac8110b8abc66204705974420d20795e3b2f7e691f10
MD5 82e5d28b568f12ce008ba878fce435eb
BLAKE2b-256 bec80f4a45ec91406a440b23e4c3cc06c54d9391885e544cb77bd9e41555e2eb

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