khmer-document-corpus / docs /CONTRIBUTING.md
darachhat
feat: build production-ready Khmer Document Corpus v0.2.0 with Typer CLI, PyMuPDF, Polars, and DI architecture
c4e128a
|
Raw
History Blame Contribute Delete
1.28 kB
# Contributing to Khmer Document Corpus
Thank you for your interest in contributing!
## Document Submission
Before submitting a document, please verify that:
1. The document can be legally redistributed (e.g., public domain, CC license, or explicit permission).
2. The document is relevant to the corpus scope (Khmer / English / Multilingual).
3. The document is an original-quality PDF (not a low-resolution scan if a native PDF exists).
## Adding a Document
```bash
# 1. Place your PDF under the correct category folder
pdf/<category>/<your-document>.pdf
# 2. Create or auto-generate metadata
kdc ingest --pdf-dir pdf/ --meta-dir metadata/
# 3. Edit the generated JSON to fill in accurate metadata
metadata/<your-document>.json
# 4. Validate the metadata
kdc validate --meta-dir metadata/
# 5. Generate a preview image
kdc preview --pdf-dir pdf/ --out-dir preview/
# 6. Open a Pull Request
```
## Metadata Fields
See [README.md](../README.md#metadata) for a full description of all metadata fields.
## Code Contributions
- Follow the existing code style (enforced by `ruff`).
- Write tests for new functionality under `tests/`.
- Run `pytest` before submitting a PR.
## License
By contributing, you agree that your contributions will be licensed under CC BY 4.0.