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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cwb-python-0.2.2.tar.gz | 69.2 kB | Without provenance | Details for cwb-python-0.2.2.tar.gz |
Built distributions (wheels)
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 |
Security for cwb-python 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.