No project description provided
Project description
OpusCleaner
OpusCleaner is a machine translation/language model data cleaner and training scheduler. The Training scheduler has moved to OpusTrainer.
Cleaner
The cleaner bit takes care of downloading and cleaning multiple different datasets and preparing them for translation.
Installation for cleaning
If you just want to use OpusCleaner for cleaning, you can install it from PyPI, and then run it
pip3 install opuscleaner
opuscleaner-server serve
Then you can go to http://127.0.0.1:8000/ to show the interface.
You can also install and run OpusCleaner on a remote machine, and use SSH local forwarding (e.g. ssh -L 8000:localhost:8000 you@remote.machine
) to access the interface on your local machine.
Dependencies
(Mainly listed as shortcuts to documentation)
- FastAPI as the base for the backend part.
- Pydantic for conversion of untyped JSON to typed objects. And because FastAPI automatically supports it and gives you useful error messages if you mess up things.
- Vue for frontend
Screenshots
List and categorize the datasets you are going to use for training.
Download more datasets right from the interface.
Filter each individual dataset, showing you the results immediately.
Compare the dataset at different stages of filtering to see what the impact is of each filter.
Paths
data/train-parts
is scanned for datasets. You can change this by setting theDATA_PATH
environment variable, the default isdata/train-parts/*.*.gz
.filters
should contain filter json files. You can change theFILTER_PATH
environment variable, the default is<PYTHON_PACKAGE>/filters/*.json
.
Installation for development
cd frontend
npm clean-install
npm run build
cd ..
python3 -m venv .env
bash --init-file .env/bin/activate
pip install -e .
Finally you can run opuscleaner-server
as normal. The --reload
option will cause it to restart when any of the python files change.
opuscleaner-server serve --reload
Then go to http://127.0.0.1:8000/ for the "interface" or http://127.0.0.1:8000/docs for the API.
Frontend development
If you're doing frontend development, try also running:
cd frontend
npm run dev
Then go to http://127.0.0.1:5173/ for the "interface".
This will put vite in hot-reloading mode for easier Javascript dev. All API requests will be proxied to the python server running in 8000, which is why you need to run both at the same time.
Filters
If you want to use LASER, you will also need to download its assets:
python -m laserembeddings download-models
Packaging
Run npm build
in the frontend/
directory first, and then run hatch build .
in the project directory to build the wheel and source distribution.
Acknowledgements
This project has received funding from the European Union’s Horizon Europe research and innovation programme under grant agreement No 101070350 and from UK Research and Innovation (UKRI) under the UK government’s Horizon Europe funding guarantee [grant number 10052546]
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
Built Distribution
File details
Details for the file opuscleaner-0.2.2.tar.gz
.
File metadata
- Download URL: opuscleaner-0.2.2.tar.gz
- Upload date:
- Size: 296.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 540819474ec2e14dbb646e43eb55eb6bb0b64e57114cbaacf0959693eb1f6c62 |
|
MD5 | 86b524bad7e7bcf4ec24faca9e0d3738 |
|
BLAKE2b-256 | 5fcf4375a01c7ab24059f18bb3eb4144bfd94e32dea0683b611754a8f773566e |
File details
Details for the file opuscleaner-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: opuscleaner-0.2.2-py3-none-any.whl
- Upload date:
- Size: 326.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ba4f4399ef2236bf3ed189c43bd318fa5b987870f35765e075518ba90180e97 |
|
MD5 | f1c357fc436490f53b13294bcfb01758 |
|
BLAKE2b-256 | 76f3ef9c60dbdad4287918b944f45630a05fd5111548da0bf13d8cd1b6af7f3b |