A Python library for the IMS Open Corpus Workbench (CWB) corpus query interface (CQi) API.
Project description
CQi SDK for Python
A Python library for the IMS Open Corpus Workbench (CWB) Corpus Query Interface (CQi) API.
Installation
The latest stable version is available on PyPI. Either add cqi to your requirements.txt file or install with pip:
pip install cqi
Version compatibility
| Package version | Protocol version |
|---|---|
| 0.1.0 - 0.1.7 | 0.1 |
Usage
import cqi
client = cqi.CQiClient('127.0.0.1')
client.connect(username='anonymous', password='') # <class 'cqi.status.StatusConnectOk'>
client.ping() # <class 'cqi.status.StatusPingOk'>
corpus = client.corpora.get('CORPUS') # <Corpus: CORPUS>
corpus.query('"and" []* "the";', 'Results') # <class 'cqi.status.StatusOk'>
results = corpus.subcorpora.get('Results') # <Subcorpus: CORPUS:Results>
client.disconnect() # <class 'cqi.status.StatusByeOk'>
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
cqi-0.1.7.tar.gz
(14.7 kB
view details)
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
cqi-0.1.7-py3-none-any.whl
(18.6 kB
view details)
File details
Details for the file cqi-0.1.7.tar.gz.
File metadata
- Download URL: cqi-0.1.7.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f09b9a0fb479ee859c4dd35b7ca74d3128c7b745e6b282b359c1cd4afe60dfc
|
|
| MD5 |
91c62686e9f151f6745f8e32ae7c21f7
|
|
| BLAKE2b-256 |
fc95a57def4427743fb97bff62212855f858499b849632f778f6e25ce09cc251
|
File details
Details for the file cqi-0.1.7-py3-none-any.whl.
File metadata
- Download URL: cqi-0.1.7-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f24caaae4011f2bc083518c99a83aae744d7773a9a702e9aad1d8e9f5f7ac1ce
|
|
| MD5 |
6faf54a5a9c2136737e6e961a908c66a
|
|
| BLAKE2b-256 |
3c52f7f8cc13a386c80838cbcc276fde3d72c0e076d4e2cb898f578b1fb8fe32
|