File size: 1,287 Bytes
d660683
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# βš™οΈ HousingMind Scripts

This directory contains utility scripts used to process, clean, and generate training data from housing-related documents and reference tables.

---

## πŸ“œ Script Index

### βœ… `generate_instruction_pairs.py`
- Converts structured data (FMR, income limits) into JSONL prompt-response pairs.
- Output is used for instruction-tuning language models.

### πŸ“„ `pdf_chunker.py`
- Reads HUD-related PDF documents and splits them into text chunks (~1000 characters).
- Useful for preprocessing documents for annotation, summarization, or RAG ingestion.

### πŸ›οΈ `generate_notice_qa.py`
- Demonstrates how to manually convert HUD Notice excerpts into QA instruction data.
- Generates JSONL-formatted prompt-response entries from policy summaries.

---

## ⛓️ Dependencies

To run these scripts, install the following:

```bash
pip install pandas PyMuPDF
```

---

## πŸ’‘ Notes

- Ensure paths to `/lookup_tables`, `/raw_documents`, and `/instruction_data` are correct before execution.
- Outputs are typically saved as `.jsonl` for easy integration into training pipelines.

---

## 🀝 Contributions

If you create a new script (e.g., tokenizer, tokenizer-aware chunker, metadata tagger), please add a section here explaining its purpose and usage.