A client for Nerdpool-Api
Project description
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_prefix
you can add a custom prefix to the default file namestrain.jsonl
andeval.jsonl
- The param
split
defines that eachsplit
sample should be saved intoeval.jsonl
and 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]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nerdpool-client-1.1.0.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file nerdpool-client-1.1.0.tar.gz
.
File metadata
- Download URL: nerdpool-client-1.1.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d0270de44e605684f275b518358fbe392242451b18a5cfa905a90b4d9650455 |
|
MD5 | 85af5c8291179e862ec14dad8f476a0c |
|
BLAKE2b-256 | 60783a155223c41e30babb61f16ee4b3bd7cb96dec01295c2b66a752e625ca2a |
File details
Details for the file nerdpool_client-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: nerdpool_client-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09cdef5114b592d14c83ef22698ee768fad31b63c13acec65da993d053f6908e |
|
MD5 | 636c412c302be8548cdcb50c94159410 |
|
BLAKE2b-256 | ddae32b85107dc552c112e93b9dbf3bc834296f487c0bd9b43b56e67fce99b7a |