nerdpool-client
A Python client for downloading data from https://nerdpool-api.acdh-dev.oeaw.ac.at
install
pip install nerdpool_client
usage
list data set titles
from nerdpool_client import NerdPoolClient
client = NerdPoolClient()
print(client.data_sets)
# ['RTA', 'RITA', 'MRP', 'Chronik Aldersbach', 'DIPKO']
download samples as .jsonl file
- go to nerdpool-api and create/filter you'r prefered data sample; e.g. all samples from MRP:
from nerdpool_client import NerdPoolClient
url = "https://nerdpool-api.acdh-dev.oeaw.ac.at/api/ner-sample/?format=json&ner_ent_type__contains=&ner_source__title=MRP"
client = NerdPoolClient()
client.dump_to_jsonl(url)
# 'out.jsonl'
download samples as test.jsonl and eval.jsonl files
- With
file_name_prefixyou can add a custom prefix to the default file namestrain.jsonlandeval.jsonl - The param
splitdefines that eachsplitsample should be saved intoeval.jsonland not intotrain.jsonl
from nerdpool_client import NerdPoolClient
url = "https://nerdpool-api.acdh-dev.oeaw.ac.at/api/ner-sample/?format=json&ner_ent_type__contains=&ner_source__title=MRP"
client = NerdPoolClient()
client.dump_to_train_eval(url, file_name_prefix="mrp__", split=10)
# ['mrp__train.jsonl', 'mrp__eval.jsonl]
Metadata
Release files for nerdpool-client 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nerdpool-client-1.1.0.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nerdpool_client-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 kB
Release files / nerdpool-client-1.1.0.tar.gz
| Download URL | nerdpool-client-1.1.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d0270de44e605684f275b518358fbe392242451b18a5cfa905a90b4d9650455
|
|
BLAKE2b-256 checksum How to use checksums |
60783a155223c41e30babb61f16ee4b3bd7cb96dec01295c2b66a752e625ca2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|
Release files / nerdpool_client-1.1.0-py3-none-any.whl
| Download URL | nerdpool_client-1.1.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
09cdef5114b592d14c83ef22698ee768fad31b63c13acec65da993d053f6908e
|
|
BLAKE2b-256 checksum How to use checksums |
ddae32b85107dc552c112e93b9dbf3bc834296f487c0bd9b43b56e67fce99b7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|