Skip to main content
This is a Python wrapper to the low-level API of CQP which allows
you to access CQP corpora in the same way as Perl's CWB::CL

If you installed CQP in a non-standard location (which is the default for
newer versions of CQP), point the setup in the right direction with, e.g.
export CWB_DIR=/usr/local/cwb-3.4.10

To install the module, use the standard
python setup.py build
sudo python setup.py install
command sequence.

As a prerequisite, install Cython with
pip install Cython

If you use an old version of CQP (CWB 2.99 and older), you need to
change the value of the "extra_libs" variable in setup.py.

To give you an idea how to use the library, see the following sample:

--- 8< ---
from CWB.CL import Corpus

# open the corpus
corpus=Corpus('TUEPP')
# get sentences and words
sentences=corpus.attribute('s','s')
words=corpus.attribute('word','p')
postags=corpus.attribute('pos','p')
# retrieve offsets of the 1235th sentence (0-based)
s_1234=sentences[1234]

for w,p in zip(words[s_1234[0]:s_1234[1]+1],postags[s_1234[0]:s_1234[1]+1]):
print "%s/%s"%(w,p)

--- 8< ---

In order to test the CWB.CL module's correct installation
independently of any CQP corpora, you can do a
python -m doctest tests/idlist.txt
which should terminate with no output when everything is well.

Metadata

Release files for cwb-python 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cwb-python 0.2.2
File Size Uploaded
cwb-python-0.2.2.tar.gz 69.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for cwb-python 0.2.2
File
cwb_python-0.2.2-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
cwb_python-0.2.2-cp36-cp36m-macosx_10_12_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.12+ x86-64 Details
cwb_python-0.2.2-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
cwb_python-0.2.2-cp27-cp27mu-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 Details
cwb_python-0.2.2-cp27-cp27m-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64 Details
cwb_python-0.2.2-cp27-cp27m-macosx_10_12_x86_64.whl CPython 2.7 CPython 2.7 pymalloc macOS 10.12+ x86-64 Details

Total release size: 1.5 MB

Release files / cwb-python-0.2.2.tar.gz

Download URL cwb-python-0.2.2.tar.gz
Size 69.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1e45ed5ab2bd95838049505f0adf599ada5bf33989e789220b7ee7852cfbc178
BLAKE2b-256 checksum
How to use checksums
9dcb9f9faaf4ec9e73e32fc06403744e9a49192499636a9e8efeb876b939c74e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cwb_python-0.2.2-cp36-cp36m-manylinux1_x86_64.whl

Download URL cwb_python-0.2.2-cp36-cp36m-manylinux1_x86_64.whl
Size 302.6 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
e71f7cb194d865eaebd8bbf68ca6478fa3feb350b3e5953bada8380fad609002
BLAKE2b-256 checksum
How to use checksums
424670090003866fe92e3939e8c1753efe6180bae0411231c3303659cc909e22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cwb_python-0.2.2-cp36-cp36m-macosx_10_12_x86_64.whl

Download URL cwb_python-0.2.2-cp36-cp36m-macosx_10_12_x86_64.whl
Size 108.9 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
40286bb8bf3d18ba1b05503338cccf36ecf4015e298c7c287763d5a9c3e6e89a
BLAKE2b-256 checksum
How to use checksums
c3a3d1c1074db01a5af22d88720c079c7a8f52efe4b08fde61371b58d9b9f1cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cwb_python-0.2.2-cp35-cp35m-manylinux1_x86_64.whl

Download URL cwb_python-0.2.2-cp35-cp35m-manylinux1_x86_64.whl
Size 299.2 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
4280ef744ee740fd724c1bef0b4d8fe426ec7b020e2ca35f83f2a42caf5b6e2c
BLAKE2b-256 checksum
How to use checksums
8ff05a03a3da984354b886d8c0c11a5903869f35997dcacb1e18527a79ccf082
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cwb_python-0.2.2-cp27-cp27mu-manylinux1_x86_64.whl

Download URL cwb_python-0.2.2-cp27-cp27mu-manylinux1_x86_64.whl
Size 286.7 kB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
70c51d788779cdb699b02e683073b7d2babf1a574980d286e5f344c685a354a0
BLAKE2b-256 checksum
How to use checksums
6fd7bb6fa6acb8c238e89baf91194631dd1c7833513a62dea7974348af55ea29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cwb_python-0.2.2-cp27-cp27m-manylinux1_x86_64.whl

Download URL cwb_python-0.2.2-cp27-cp27m-manylinux1_x86_64.whl
Size 286.7 kB
Tags CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
0005a252727b9898e2f1af4ad93aae804142fc792fe26493ad99021cbcdaa6bf
BLAKE2b-256 checksum
How to use checksums
87526cc1b07473896999f0891bc32623130b4a0597d6d488b983dbf3bb920f49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cwb_python-0.2.2-cp27-cp27m-macosx_10_12_x86_64.whl

Download URL cwb_python-0.2.2-cp27-cp27m-macosx_10_12_x86_64.whl
Size 111.3 kB
Tags CPython 2.7 CPython 2.7 pymalloc macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
93e7b429e492840795ef9556890c141a5ef7ac485adb1d9bc99aa20daa8db9cc
BLAKE2b-256 checksum
How to use checksums
80e100f0f3e89082e2b778ff58ac304b5afcab44ade029c326ad4a49a8a94b9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.2 This release

7 release files

0.2.1

4 release files

0.2

1 release file

0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page