opensubtitles-dataloader
Download, preprocess and use sentences from the OpenSubtitles v2018 dataset without ever needing to load all of it into memory.
Download
See possible languages here.
opensubtitles-download en
Load tokenized version.
opensubtitles-download en --token
Use in Python
Load
opensubtites_dataset = OpenSubtitlesDataset('en')
Load only the first 1 million lines.
opensubtites_dataset = OpenSubtitlesDataset('en', first_n_lines=1_000_000)
Group sentences into groups of 5.
opensubtites_dataset = OpenSubtitlesDataset('en', 5)
Group sentences into groups ranging from 2 to 5.
opensubtites_dataset = OpenSubtitlesDataset('en', (2,5))
Split sentences using "\n".
opensubtites_dataset = OpenSubtitlesDataset('en', delimiter="\n")
Do preprocessing.
opensubtites_dataset = OpenSubtitlesDataset('en', preprocess_function=my_preprocessing_function)
Split for Training
train, valid, test = opensubtites_dataset.split()
Set the fractions of the original dataset.
train, valid, test = opensubtites_dataset.split([0.7, 0.15, 0.15])
Use a seed.
train, valid, test = opensubtites_dataset.split(seed=42)
Access
index.
train, valid, text = OpenSubtitlesDataset('en').splits()
train[20_000]
pytorch.
from torch.utils.data import DataLoader
train, valid, text = OpenSubtitlesDataset('en').splits()
train_loader = DataLoader(train, batch_size=16)
Metadata
Release files for opensubtitles-dataloader 0.1.4
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 |
|---|---|---|---|---|
| opensubtitles-dataloader-0.1.4.tar.gz | 4.5 kB | Without provenance | Details for opensubtitles-dataloader-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opensubtitles_dataloader-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for opensubtitles_dataloader-0.1.4-py3-none-any.whl |
Total release size: 9.6 kB
Release files / opensubtitles-dataloader-0.1.4.tar.gz
| Download URL | opensubtitles-dataloader-0.1.4.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a09b9d5fabd4c19d7cbcfe6456655dd1cc5268f28cf7f4fdb77142403f4c08f
|
|
BLAKE2b-256 checksum How to use checksums |
0e800744420e273b559c2b54ae477f5393a48a3238f54282cace0151fbe659d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.2 Linux/5.4.0-7629-generic
|
Release files / opensubtitles_dataloader-0.1.4-py3-none-any.whl
| Download URL | opensubtitles_dataloader-0.1.4-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e95e7a3a2f07e29eac0d25170294b4f0ede805cfe770870267e282b015d14876
|
|
BLAKE2b-256 checksum How to use checksums |
b151d701fa7ae54318e3464b78a1f8de23e3e98f7819264625f7c0647dabcbb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.2 Linux/5.4.0-7629-generic
|
Security for opensubtitles-dataloader 0.1.4
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.