Korp API library for Python
Project description
This library provides an easy way to query Korp systems for language corpora. This library is brought to you by Mika Hämäläinen.
Usage
You can initialise Korp with either service_name (språkbanken, kielipankki or GT) or url to your Korp’s API interface such as https://korp.csc.fi/cgi-bin/korp.cgi .
An example for getting all concordances for North Sami corpora in Giellatekno Korp for query [pos=”A”] “go” [pos=”N”].
from korp import Korp
korppi = Korp(service_name="GT") #uses Giellatekno
corpora = korppi.list_corpora("SME") #lists corpora returns the ones starting with the North Sami language code
number_of_results, concordances = korppi.all_concordances('[pos="A"] "go" [pos="N"]', corpora)
More information
For more information, see the GitHub page and Wiki for tutorials.
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
Built Distribution
File details
Details for the file korp-1.0.3.tar.gz
.
File metadata
- Download URL: korp-1.0.3.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.13.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a43be9d794becf2c88a56999bd1f703d8fe1d01bd0fcf2342f61910a7393db3 |
|
MD5 | 3ec54cf2b1ee1f6a91749263a8410d04 |
|
BLAKE2b-256 | 9a676a6b4ec3ff1133ec544d157ac65e416e9efe74e7e05d799b52374778cd8b |
File details
Details for the file korp-1.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: korp-1.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.13.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 276bac5070cf5657fff3e2350eafdee0481ca435633253af1689d1b5953ff2a2 |
|
MD5 | 81c090401e1e23425dfa240e3b701d57 |
|
BLAKE2b-256 | 9b9b9232a73da02b058dd9c3f7d01b230f99a9bd094f52c9bf6e5556c95401e1 |