Download tests/test_citation_validator.py from ZhangNguyen/Legislation_GraphRag: direct link, hf CLI and curl.
- Browser
- Download file 348 Bytes
-
https://huggingface.co/spaces/ZhangNguyen/Legislation_GraphRag/resolve/main/tests/test_citation_validator.py
- Command line
-
hf download hf://spaces/ZhangNguyen/Legislation_GraphRag/tests/test_citation_validator.py
-
curl -L -o test_citation_validator.py https://huggingface.co/spaces/ZhangNguyen/Legislation_GraphRag/resolve/main/tests/test_citation_validator.py
348 Bytes
| from src.rag.citation_validator import validate_citations | |
| def test_citation_validator_flags_unsupported_article(): | |
| result = validate_citations( | |
| "Theo Điều 6, người vi phạm bị xử lý.", | |
| [{"metadata": {"article": "Điều 5"}}], | |
| ) | |
| assert result["valid"] is False | |
| assert result["unsupported_references"] | |