File size: 1,282 Bytes
c4e128a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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.