Download scripts/test_extract.py from linhhuonglinux/linhhuonglinux-office: direct link, hf CLI and curl.
- Browser
- Download file 398 Bytes
-
https://huggingface.co/linhhuonglinux/linhhuonglinux-office/resolve/main/scripts/test_extract.py
- Command line
-
hf download hf://linhhuonglinux/linhhuonglinux-office/scripts/test_extract.py
-
curl -L -o test_extract.py https://huggingface.co/linhhuonglinux/linhhuonglinux-office/resolve/main/scripts/test_extract.py
398 Bytes
| from datasets import load_dataset | |
| ds = load_dataset("th1nhng0/vietnamese-legal-documents", "content", split="data", streaming=True) | |
| count = 0 | |
| for item in ds: | |
| print("--- SAMPLE ---") | |
| print(item.keys()) | |
| if "title" in item: | |
| print("TITLE:", item["title"][:100]) | |
| if "text" in item: | |
| print("TEXT:", item["text"][:200]) | |
| count += 1 | |
| if count >= 2: | |
| break | |